| 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 |
|
|---|
| 15 | typedef 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 |
|
|---|
| 31 | #define DRIVE_SetCurrentDrive(a) _chdrive(a)
|
|---|
| 32 | #define DRIVE_GetCurrentDrive() _getdrive()
|
|---|
| 33 | #define DRIVE_Chdir(a,b) chdir(b)
|
|---|
| 34 | #define DRIVE_GetDosCwd(a, b) _getdcwd(b, a, sizeof(a))
|
|---|
| 35 |
|
|---|
| 36 | #if 0
|
|---|
| 37 | extern int DRIVE_Init(void);
|
|---|
| 38 | extern int DRIVE_IsValid( int drive );
|
|---|
| 39 | extern int DRIVE_GetCurrentDrive(void);
|
|---|
| 40 | extern int DRIVE_SetCurrentDrive( int drive );
|
|---|
| 41 | extern int DRIVE_FindDriveRoot( const char **path );
|
|---|
| 42 | extern const char * DRIVE_GetRoot( int drive );
|
|---|
| 43 | extern const char * DRIVE_GetDosCwd( int drive );
|
|---|
| 44 | extern const char * DRIVE_GetUnixCwd( int drive );
|
|---|
| 45 | extern const char * DRIVE_GetLabel( int drive );
|
|---|
| 46 | extern DWORD DRIVE_GetSerialNumber( int drive );
|
|---|
| 47 | extern int DRIVE_SetSerialNumber( int drive, DWORD serial );
|
|---|
| 48 | extern DRIVETYPE DRIVE_GetType( int drive );
|
|---|
| 49 | extern UINT DRIVE_GetFlags( int drive );
|
|---|
| 50 | extern int DRIVE_Chdir( int drive, const char *path );
|
|---|
| 51 | extern int DRIVE_Disable( int drive );
|
|---|
| 52 | extern int DRIVE_Enable( int drive );
|
|---|
| 53 | extern int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive );
|
|---|
| 54 | extern int DRIVE_OpenDevice( int drive, int flags );
|
|---|
| 55 | extern int DRIVE_RawRead(BYTE drive, DWORD begin, DWORD length, BYTE *dataptr, BOOL fake_success );
|
|---|
| 56 | extern int DRIVE_RawWrite(BYTE drive, DWORD begin, DWORD length, BYTE *dataptr, BOOL fake_success );
|
|---|
| 57 | #endif
|
|---|
| 58 |
|
|---|
| 59 | #endif /* __WINE_DRIVE_H */
|
|---|