Release 950706
[wine/multimedia.git] / include / msdos.h
blob1a94bca3ebc9e5242e2bfe00a4504e2e76f3ec49
1 #ifndef __MSDOS_H
2 #define __MSDOS_H
4 #include <dirent.h>
5 #include <windows.h>
6 #include "comm.h"
8 struct dosdirent {
9 int inuse;
10 DIR *ds;
11 char unixpath[256];
12 char filename[256];
13 char filemask[13];
14 char attribute;
15 char search_attribute;
16 long filesize;
17 long filetime;
18 int telldirnum;
19 short entnum; /* Directory entry number */
22 struct fcb {
23 BYTE drive;
24 char name[8];
25 char extension[3];
26 BYTE dummy1[4];
27 int filesize;
28 WORD date_write;
29 WORD time_write;
30 struct dosdirent *directory;
31 BYTE dummy2[9];
34 #define DOSVERSION 0x0005 /* Major version in low byte: DOS 5.00 */
35 #define WINVERSION 0x0a03 /* Windows version 3.10 */
37 #define MAX_DOS_DRIVES 26
39 extern WORD ExtendedError;
40 extern struct DosDeviceStruct COM[MAX_PORTS];
41 extern struct DosDeviceStruct LPT[MAX_PORTS];
43 #define setword(a,b) *(BYTE*)(a) = (b) & 0xff; \
44 *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;
46 #define setdword(a,b) *(BYTE*)(a) = (b) & 0xff; \
47 *((BYTE*)(a)+1) = ((b)>>8) & 0xff; \
48 *((BYTE*)(a)+2) = ((b)>>16) & 0xff; \
49 *((BYTE*)(a)+3) = ((b)>>24) & 0xff;
51 #define getword(a) (WORD) *(BYTE*)(a) + \
52 (*((BYTE*)(a) + 1) << 8)
54 #define getdword(a) (DWORD) (*(BYTE*)(a) + \
55 (*((BYTE*)(a) + 1) << 8) + \
56 (*((BYTE*)(a) + 2) << 16) + \
57 (*((BYTE*)(a) + 3) << 24))
59 /* dos file attributes */
61 #define FA_NORMAL 0x00 /* Normal file, no attributes */
62 #define FA_RDONLY 0x01 /* Read only attribute */
63 #define FA_HIDDEN 0x02 /* Hidden file */
64 #define FA_SYSTEM 0x04 /* System file */
65 #define FA_LABEL 0x08 /* Volume label */
66 #define FA_DIREC 0x10 /* Directory */
67 #define FA_ARCH 0x20 /* Archive */
69 /* extended error codes */
71 #define NoError 0x00
72 #define InvalidFunction 0x01
73 #define FileNotFound 0x02
74 #define PathNotFound 0x03
75 #define AccessDenied 0x05
76 #define InvalidHandle 0x06
77 #define MCBDestroyed 0x07
78 #define OutOfMemory 0x08
79 #define MCBInvalid 0x09
80 #define DataInvalid 0x0d
81 #define InvalidDrive 0x0f
82 #define CanNotRemoveCwd 0x10
83 #define NotSameDevice 0x11
84 #define NoMoreFiles 0x12
85 #define WriteProtected 0x13
86 #define UnknownUnit 0x14
87 #define DriveNotReady 0x15
88 #define UnknownCommand 0x16
89 #define CRCError 0x17
90 #define BadRqLength 0x18
91 #define SeekError 0x19
92 #define UnknownMedia 0x1a
93 #define SectorNotFound 0x1b
94 #define OutOfPaper 0x1c
95 #define WriteFault 0x1d
96 #define ReadFault 0x1e
97 #define GeneralFailure 0x1f
98 #define ShareViolation 0x20
99 #define LockViolation 0x21
100 #define DiskFull 0x27
101 #define NoNetwork 0x49
102 #define FileExists 0x50
103 #define CanNotMakeDir 0x52
105 /* Error classes */
107 #define EC_Temporary 0x02
108 #define EC_AccessDenied 0x03
109 #define EC_AppError 0x04
110 #define EC_SystemFailure 0x06
111 #define EC_NotFound 0x08
112 #define EC_MediaError 0x0b
113 #define EC_Exists 0x0c
114 #define EC_Unknown 0x0d
116 /* Suggested actions */
118 #define SA_Retry 0x01
119 #define SA_Abort 0x04
120 #define SA_Ignore 0x06
121 #define SA_Ask4Retry 0x07
123 /* Error locus */
125 #define EL_Unknown 0x01
126 #define EL_Disk 0x02
127 #define EL_Network 0x03
128 #define EL_Memory 0x05
130 #endif /* __MSDOS_H */