source: trunk/include/win/drive.h@ 10367

Last change on this file since 10367 was 5257, checked in by sandervl, 25 years ago

DRIVE_GetDosCwd fix

File size: 2.2 KB
Line 
1/*
2 * DOS drive handling declarations
3 *
4 * Copyright 1995 Alexandre Julliard
5 */
6
7#ifndef __WINE_DRIVE_H
8#define __WINE_DRIVE_H
9
10#include "windef.h"
11#include <direct.h>
12
13#define MAX_DOS_DRIVES 26
14
15typedef enum
16{
17 TYPE_FLOPPY,
18 TYPE_HD,
19 TYPE_CDROM,
20 TYPE_NETWORK,
21 TYPE_INVALID
22} DRIVETYPE;
23
24/* Drive flags */
25
26#define DRIVE_DISABLED 0x0001 /* Drive is disabled */
27#define DRIVE_SHORT_NAMES 0x0002 /* Drive fs has 8.3 file names */
28#define DRIVE_CASE_SENSITIVE 0x0004 /* Drive fs is case sensitive */
29#define DRIVE_CASE_PRESERVING 0x0008 /* Drive fs is case preserving */
30
31inline int DRIVE_SetCurrentDrive(char drive)
32{
33 int ret;
34 USHORT sel = GetFS();
35 ret = _chdrive(drive);
36 SetFS(sel);
37 return ret;
38}
39
40inline int DRIVE_GetCurrentDrive()
41{
42 int ret;
43 USHORT sel = GetFS();
44 ret = _getdrive();
45 SetFS(sel);
46 return ret;
47}
48
49#define DRIVE_Chdir(a,b) SetCurrentDirectoryA(b)
50
51inline char *DRIVE_GetDosCwd (char *buffer, int drive, int size)
52{
53 char * ret;
54 USHORT sel = GetFS();
55 ret = _getdcwd(drive, buffer, size);
56 SetFS(sel);
57 return ret;
58}
59
60#if 0
61extern int DRIVE_Init(void);
62extern int DRIVE_IsValid( int drive );
63extern int DRIVE_GetCurrentDrive(void);
64extern int DRIVE_SetCurrentDrive( int drive );
65extern int DRIVE_FindDriveRoot( const char **path );
66extern const char * DRIVE_GetRoot( int drive );
67extern const char * DRIVE_GetDosCwd( int drive );
68extern const char * DRIVE_GetUnixCwd( int drive );
69extern const char * DRIVE_GetLabel( int drive );
70extern DWORD DRIVE_GetSerialNumber( int drive );
71extern int DRIVE_SetSerialNumber( int drive, DWORD serial );
72extern DRIVETYPE DRIVE_GetType( int drive );
73extern UINT DRIVE_GetFlags( int drive );
74extern int DRIVE_Chdir( int drive, const char *path );
75extern int DRIVE_Disable( int drive );
76extern int DRIVE_Enable( int drive );
77extern int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive );
78extern int DRIVE_OpenDevice( int drive, int flags );
79extern int DRIVE_RawRead(BYTE drive, DWORD begin, DWORD length, BYTE *dataptr, BOOL fake_success );
80extern int DRIVE_RawWrite(BYTE drive, DWORD begin, DWORD length, BYTE *dataptr, BOOL fake_success );
81#endif
82
83#endif /* __WINE_DRIVE_H */
Note: See TracBrowser for help on using the repository browser.