Implemented (Register|Get|Revoke)ActiveObject from the docs.
[wine.git] / include / msdos.h
blob0a9d3c6af12d54d16d753eb4e6d13a34451f2391
1 #ifndef __WINE_MSDOS_H
2 #define __WINE_MSDOS_H
4 #include "winnt.h"
5 #include "comm.h"
7 struct fcb {
8 BYTE drive;
9 char name[8];
10 char extension[3];
11 BYTE dummy1[4];
12 int filesize;
13 WORD date_write;
14 WORD time_write;
15 struct dosdirent *directory;
16 BYTE dummy2[9];
19 /* DTA layout for FindFirst/FindNext */
20 typedef struct
22 BYTE drive; /* 00 drive letter */
23 char mask[11]; /* 01 search template */
24 BYTE search_attr; /* 0c search attributes */
25 WORD count WINE_PACKED; /* 0d entry count within directory */
26 WORD cluster WINE_PACKED; /* 0f cluster of parent directory */
27 char *unixPath WINE_PACKED; /* 11 unix path (was: reserved) */
28 BYTE fileattr; /* 15 file attributes */
29 WORD filetime; /* 16 file time */
30 WORD filedate; /* 18 file date */
31 DWORD filesize WINE_PACKED; /* 1a file size */
32 char filename[13]; /* 1e file name + extension */
33 } FINDFILE_DTA;
35 /* FCB layout for FindFirstFCB/FindNextFCB */
36 typedef struct
38 BYTE drive; /* 00 drive letter */
39 char filename[11]; /* 01 filename 8+3 format */
40 int count; /* 0c entry count (was: reserved) */
41 char *unixPath; /* 10 unix path (was: reserved) */
42 } FINDFILE_FCB;
44 /* DOS directory entry for FindFirstFCB/FindNextFCB */
45 typedef struct
47 char filename[11]; /* 00 filename 8+3 format */
48 BYTE fileattr; /* 0b file attributes */
49 BYTE reserved[10]; /* 0c reserved */
50 WORD filetime; /* 16 file time */
51 WORD filedate; /* 18 file date */
52 WORD cluster; /* 1a file first cluster */
53 DWORD filesize; /* 1c file size */
54 } DOS_DIRENTRY_LAYOUT;
56 typedef struct
58 DWORD next_dev;
59 WORD attr;
60 WORD strategy;
61 WORD interrupt;
62 char name[8];
63 } DOS_DEVICE_HEADER;
65 typedef struct _DOS_LISTOFLISTS
67 WORD CX_Int21_5e01; /* contents of CX from INT 21/AX=5E01h */
68 WORD LRU_count_FCB_cache;
69 WORD LRU_count_FCB_open;
70 DWORD OEM_func_handler WINE_PACKED; /* OEM function of INT 21/AH=F8h */
71 WORD INT21_offset;/* offset in DOS CS of code to return from INT 21 call */
72 WORD sharing_retry_count;
73 WORD sharing_retry_delay;
74 DWORD ptr_disk_buf; /* ptr to current disk buf */
75 WORD offs_unread_CON; /* pointer in DOS data segment of unread CON input */
76 WORD seg_first_MCB;
77 DWORD ptr_first_DPB;
78 DWORD ptr_first_SysFileTable;
79 DWORD ptr_clock_dev_hdr;
80 DWORD ptr_CON_dev_hdr;
81 WORD max_byte_per_sec; /* maximum bytes per sector of any block device */
82 DWORD ptr_disk_buf_info WINE_PACKED;
83 DWORD ptr_array_CDS WINE_PACKED; /* current directory structure */
84 DWORD ptr_sys_FCB WINE_PACKED;
85 WORD nr_protect_FCB;
86 BYTE nr_block_dev;
87 BYTE nr_avail_drive_letters;
88 DOS_DEVICE_HEADER NUL_dev WINE_PACKED;
89 BYTE nr_drives_JOINed;
90 WORD ptr_spec_prg_names WINE_PACKED;
91 DWORD ptr_SETVER_prg_list WINE_PACKED;
92 WORD DOS_HIGH_A20_func_offs WINE_PACKED;
93 WORD PSP_last_exec WINE_PACKED; /* if DOS in HMA: PSP of program executed last; if DOS low: 0000h */
94 WORD BUFFERS_val WINE_PACKED;
95 WORD BUFFERS_nr_lookahead WINE_PACKED;
96 BYTE boot_drive WINE_PACKED;
97 BYTE flag_DWORD_moves WINE_PACKED; /* 01h for 386+, 00h otherwise */
98 WORD size_extended_mem WINE_PACKED; /* size of extended mem in KB */
99 } DOS_LISTOFLISTS;
101 #define MAX_DOS_DRIVES 26
103 extern struct DosDeviceStruct COM[MAX_PORTS];
104 extern struct DosDeviceStruct LPT[MAX_PORTS];
106 #define setword(a,b) do { *(BYTE*)(a) = (b) & 0xff; \
107 *((BYTE*)((a)+1)) = ((b)>>8) & 0xff;\
108 } while(0)
111 /* dos file attributes */
113 #define FA_NORMAL 0x00 /* Normal file, no attributes */
114 #define FA_RDONLY 0x01 /* Read only attribute */
115 #define FA_HIDDEN 0x02 /* Hidden file */
116 #define FA_SYSTEM 0x04 /* System file */
117 #define FA_LABEL 0x08 /* Volume label */
118 #define FA_DIRECTORY 0x10 /* Directory */
119 #define FA_ARCHIVE 0x20 /* Archive */
120 #define FA_UNUSED 0x40 /* Unused */
122 /* Error codes */
124 #define ER_NoError 0x00
125 #define ER_InvalidFunction 0x01
126 #define ER_FileNotFound 0x02
127 #define ER_PathNotFound 0x03
128 #define ER_TooManyOpenFiles 0x04
129 #define ER_AccessDenied 0x05
130 #define ER_InvalidHandle 0x06
131 #define ER_MCBDestroyed 0x07
132 #define ER_OutOfMemory 0x08
133 #define ER_MCBInvalid 0x09
134 #define ER_EnvironInvalid 0x0a
135 #define ER_FormatInvalid 0x0b
136 #define ER_AccessCodeInvalid 0x0c
137 #define ER_DataInvalid 0x0d
138 #define ER_InvalidDrive 0x0f
139 #define ER_CanNotRemoveCwd 0x10
140 #define ER_NotSameDevice 0x11
141 #define ER_NoMoreFiles 0x12
142 #define ER_WriteProtected 0x13
143 #define ER_UnknownUnit 0x14
144 #define ER_DriveNotReady 0x15
145 #define ER_UnknownCommand 0x16
146 #define ER_CRCError 0x17
147 #define ER_BadRqLength 0x18
148 #define ER_SeekError 0x19
149 #define ER_UnknownMedia 0x1a
150 #define ER_SectorNotFound 0x1b
151 #define ER_OutOfPaper 0x1c
152 #define ER_WriteFault 0x1d
153 #define ER_ReadFault 0x1e
154 #define ER_GeneralFailure 0x1f
155 #define ER_ShareViolation 0x20
156 #define ER_LockViolation 0x21
157 #define ER_DiskFull 0x27
158 #define ER_NoNetwork 0x49
159 #define ER_FileExists 0x50
160 #define ER_CanNotMakeDir 0x52
162 /* Error classes */
164 #define EC_OutOfResource 0x01
165 #define EC_Temporary 0x02
166 #define EC_AccessDenied 0x03
167 #define EC_InternalError 0x04
168 #define EC_HardwareFailure 0x05
169 #define EC_SystemFailure 0x06
170 #define EC_ProgramError 0x07
171 #define EC_NotFound 0x08
172 #define EC_MediaError 0x0b
173 #define EC_Exists 0x0c
174 #define EC_Unknown 0x0d
176 /* Suggested actions */
178 #define SA_Retry 0x01
179 #define SA_DelayedRetry 0x02
180 #define SA_Abort 0x04
181 #define SA_Ignore 0x06
182 #define SA_Ask4Retry 0x07
184 /* Error locus */
186 #define EL_Unknown 0x01
187 #define EL_Disk 0x02
188 #define EL_Network 0x03
189 #define EL_Serial 0x04
190 #define EL_Memory 0x05
192 void WINAPI DOS3Call( CONTEXT86 *context );
194 #define DOSCONF_MEM_HIGH 0x0001
195 #define DOSCONF_MEM_UMB 0x0002
196 #define DOSCONF_NUMLOCK 0x0004
197 #define DOSCONF_KEYB_CONV 0x0008
199 typedef struct {
200 char lastdrive;
201 int brk_flag;
202 int files;
203 int stacks_nr;
204 int stacks_sz;
205 int buf;
206 int buf2;
207 int fcbs;
208 int flags;
209 char *shell;
210 char *country;
211 } DOSCONF;
213 extern DOSCONF DOSCONF_config;
215 #endif /* __WINE_MSDOS_H */