[KERNEL32]: Mark Get/SetEnvironmentVariableA/W as hotpatchable since it's needed...
[reactos.git] / rossubsys / os2 / include / os2.h
1 /* os2emx.h (emx+gcc) */
2
3 #ifndef _OS2EMX_H
4 #define _OS2EMX_H
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif /* __cplusplus */
9
10 #pragma pack(1)
11
12 /* ------------------------ INCL_ SYMBOLS --------------------------------- */
13
14 #if defined (INCL_BASE)
15 #define INCL_DOS
16 #define INCL_DOSERRORS
17 #define INCL_SUB
18 #endif
19
20 #if defined (INCL_DOS)
21 #define INCL_DOSDATETIME
22 #define INCL_DOSDEVICES
23 #define INCL_DOSEXCEPTIONS
24 #define INCL_DOSFILEMGR
25 #define INCL_DOSMEMMGR
26 #define INCL_DOSMISC
27 #define INCL_DOSMVDM
28 #define INCL_DOSMODULEMGR
29 #define INCL_DOSNLS
30 #define INCL_DOSPROCESS
31 #define INCL_DOSPROFILE
32 #define INCL_DOSRAS
33 #define INCL_DOSQUEUES
34 #define INCL_DOSRESOURCES
35 #define INCL_DOSSEMAPHORES
36 #define INCL_DOSSESMGR
37 #endif
38
39 #if defined (INCL_REXXSAA)
40 #define INCL_RXSUBCOM
41 #define INCL_RXSHV
42 #define INCL_RXFUNC
43 #define INCL_RXSYSEXIT
44 #define INCL_RXMACRO
45 #define INCL_RXARI
46 #endif
47
48 #if defined (INCL_SUB)
49 #define INCL_KBD
50 #define INCL_VIO
51 #define INCL_MOU
52 #endif
53
54 #if defined (INCL_PM)
55 #define INCL_AVIO
56 #define INCL_FONTFILEFORMAT
57 #define INCL_GPI
58 #define INCL_SPL
59 #define INCL_WIN
60 #define INCL_WINWORKPLACE
61 #endif
62
63 #if defined (INCL_WIN) || defined (RC_INVOKED)
64 #define INCL_WINACCELERATORS
65 #define INCL_WINBUTTONS
66 #define INCL_WINDIALOGS
67 #define INCL_WINENTRYFIELDS
68 #define INCL_WINFRAMECTLS
69 #define INCL_WINFRAMEMGR
70 #define INCL_WINHELP
71 #define INCL_WININPUT
72 #define INCL_WINLISTBOXES
73 #define INCL_WINMENUS
74 #define INCL_WINMESSAGEMGR
75 #define INCL_WINMLE
76 #define INCL_WINPOINTERS
77 #define INCL_WINSCROLLBARS
78 #define INCL_WINSTATICS
79 #define INCL_WINSTDDLGS
80 #define INCL_WINSYS
81 #endif /* INCL_WIN || RC_INVOKED */
82
83 #if defined (INCL_WIN)
84 #define INCL_WINATOM
85 #define INCL_WINCLIPBOARD
86 #define INCL_WINCOUNTRY
87 #define INCL_WINCURSORS
88 #define INCL_WINDDE
89 #define INCL_WINDESKTOP
90 #define INCL_WINERRORS
91 #define INCL_WINHOOKS
92 #define INCL_WINLOAD
93 #define INCL_WINPALETTE
94 #define INCL_WINPROGRAMLIST
95 #define INCL_WINRECTANGLES
96 #define INCL_WINSHELLDATA
97 #define INCL_WINSWITCHLIST
98 #define INCL_WINTHUNKAPI
99 #define INCL_WINTIMER
100 #define INCL_WINTRACKRECT
101 #define INCL_WINTYPES
102 #define INCL_WINWINDOWMGR
103 #endif /* INCL_WIN */
104
105 #if defined (INCL_WINCOMMON)
106 #define INCL_WINWINDOWMGR
107 #endif
108
109 #if defined (INCL_WINSTDDLGS)
110 #define INCL_WINCIRCULARSLIDER
111 #define INCL_WINSTDBOOK
112 #define INCL_WINSTDCNR
113 #define INCL_WINSTDDRAG
114 #define INCL_WINSTDFILE
115 #define INCL_WINSTDFONT
116 #define INCL_WINSTDSLIDER
117 #define INCL_WINSTDSPIN
118 #define INCL_WINSTDVALSET
119 #endif
120
121 #if defined (INCL_WINSTDCNR) || defined (INCL_WINSTDVALSET)
122 #define INCL_WINSTDDRAG
123 #endif
124
125 #if defined (INCL_WINMLE) && !defined (INCL_WINENTRYFIELDS)
126 #define INCL_WINENTRYFIELDS
127 #endif
128
129 #if defined (INCL_WINWORKPLACE)
130 #define INCL_WPCLASS
131 #endif
132
133 #if defined (INCL_GPI)
134 #define INCL_GPIBITMAPS
135 #define INCL_GPICONTROL
136 #define INCL_GPICORRELATION
137 #define INCL_GPIINK
138 #define INCL_GPISEGMENTS
139 #endif
140
141 #if defined (INCL_ERRORS)
142 #define INCL_DOSERRORS
143 #define INCL_GPIERRORS
144 #define INCL_SHLERRORS
145 #define INCL_WINERRORS
146 #endif
147
148 #if defined (INCL_DDIDEFS)
149 #define INCL_GPIBITMAPS
150 #define INCL_GPIERRORS
151 #endif
152
153 #if defined (INCL_CIRCULARSLIDER) && !defined (INCL_WINCIRCULARSLIDER)
154 #define INCL_WINCIRCULARSLIDER
155 #endif
156
157 /* ------------------------ DISABLE KEYWORDS ------------------------------ */
158
159 #define APIENTRY
160 #define EXPENTRY
161 #define FAR
162
163 /* ------------------------ CONSTANTS AND TYPES --------------------------- */
164
165 #if !defined (FALSE)
166 #define FALSE 0
167 #endif
168
169 #if !defined (TRUE)
170 #define TRUE 1
171 #endif
172
173 #define VOID void
174
175 #define NULLHANDLE ((LHANDLE)0)
176 #define NULLSHANDLE ((SHANDLE)0)
177
178 #if !defined (NULL)
179 #if defined (__cplusplus)
180 #define NULL 0
181 #else
182 #define NULL ((void *)0)
183 #endif
184 #endif
185
186 typedef int INT; /* Required for Toolkit sample programs */
187 typedef unsigned UINT;
188 typedef unsigned long APIRET;
189
190 typedef unsigned long BOOL;
191 typedef BOOL *PBOOL;
192
193 typedef unsigned long BOOL32;
194 typedef BOOL *PBOOL32;
195
196 typedef char CHAR;
197 typedef CHAR *PCHAR;
198
199 #if !defined (OS2EMX_PLAIN_CHAR)
200
201 typedef unsigned char BYTE;
202 typedef unsigned char *PCH;
203 typedef unsigned char *PSZ;
204 typedef __const__ unsigned char *PCCH;
205 typedef __const__ unsigned char *PCSZ;
206
207 #else
208
209 typedef char BYTE;
210 typedef char *PCH;
211 typedef char *PSZ;
212 typedef __const__ char *PCCH;
213 typedef __const__ char *PCSZ;
214
215 #endif
216
217 typedef BYTE *PBYTE;
218
219 typedef unsigned char UCHAR;
220 typedef UCHAR *PUCHAR;
221
222 typedef short SHORT;
223 typedef SHORT *PSHORT;
224
225 typedef unsigned short USHORT;
226 typedef USHORT *PUSHORT;
227
228 typedef long LONG;
229 typedef LONG *PLONG;
230
231 typedef unsigned long ULONG;
232 typedef ULONG *PULONG;
233
234 typedef VOID *PVOID;
235 typedef PVOID *PPVOID;
236
237 typedef __const__ VOID *CPVOID;
238
239 typedef CHAR STR8[8];
240 typedef STR8 *PSTR8;
241
242 typedef CHAR STR16[16];
243 typedef STR16 *PSTR16;
244 typedef CHAR STR32[32];
245 typedef STR32 *PSTR32;
246 typedef CHAR STR64[64];
247 typedef STR64 *PSTR64;
248
249 typedef unsigned short SHANDLE;
250 typedef unsigned long LHANDLE;
251
252 typedef LHANDLE HPIPE;
253 typedef HPIPE *PHPIPE;
254
255 typedef LHANDLE HQUEUE;
256 typedef HQUEUE *PHQUEUE;
257
258 typedef LHANDLE HMODULE;
259 typedef HMODULE *PHMODULE;
260
261 typedef VOID *HSEM;
262 typedef HSEM *PHSEM;
263
264 typedef LHANDLE HOBJECT;
265
266 typedef ULONG PID;
267 typedef PID *PPID;
268
269 typedef ULONG TID;
270 typedef TID *PTID;
271
272 typedef int (*PFN)();
273 typedef PFN *PPFN;
274
275 typedef USHORT SEL;
276 typedef SEL *PSEL;
277
278 typedef ULONG HMTX;
279 typedef HMTX *PHMTX;
280
281 typedef ULONG HMUX;
282 typedef HMUX *PHMUX;
283
284
285 #define FIELDOFFSET(t,f) ((SHORT)&(((t *)0)->f))
286
287 #define MAKETYPE(v,t) (*((t *)&v))
288
289 #define MAKEUSHORT(l,h) (((USHORT)(l)) | ((USHORT)(h))<<8)
290 #define MAKESHORT(l,h) ((SHORT)MAKEUSHORT(l, h))
291
292 #define MAKEULONG(l,h) ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h)))<<16))
293 #define MAKELONG(l,h) ((LONG)MAKEULONG(l, h))
294
295 #define LOUCHAR(w) ((UCHAR)(w))
296 #define HIUCHAR(w) ((UCHAR)((USHORT)(w)>>8))
297
298 #define LOBYTE(x) LOUCHAR(x)
299 #define HIBYTE(x) HIUCHAR(x)
300
301 #define LOUSHORT(x) ((USHORT)((ULONG)(x)))
302 #define HIUSHORT(x) ((USHORT)((ULONG)(x)>>16))
303
304 /* ---------------------------- ERROR CODES ------------------------------- */
305
306 #define WINERR_BASE 0x1000
307 #define GPIERR_BASE 0x2000
308 #define DEVERR_BASE 0x3000
309 #define SPLERR_BASE 0x4000
310
311 #define SEVERITY_NOERROR 0x0000
312 #define SEVERITY_WARNING 0x0004
313 #define SEVERITY_ERROR 0x0008
314 #define SEVERITY_SEVERE 0x000c
315 #define SEVERITY_UNRECOVERABLE 0x0010
316
317 #if defined (INCL_DOSERRORS)
318
319 #define NO_ERROR 0
320 #define ERROR_INVALID_FUNCTION 1
321 #define ERROR_FILE_NOT_FOUND 2
322 #define ERROR_PATH_NOT_FOUND 3
323 #define ERROR_TOO_MANY_OPEN_FILES 4
324 #define ERROR_ACCESS_DENIED 5
325 #define ERROR_INVALID_HANDLE 6
326 #define ERROR_ARENA_TRASHED 7
327 #define ERROR_NOT_ENOUGH_MEMORY 8
328 #define ERROR_INVALID_BLOCK 9
329 #define ERROR_BAD_ENVIRONMENT 10
330 #define ERROR_BAD_FORMAT 11
331 #define ERROR_INVALID_ACCESS 12
332 #define ERROR_INVALID_DATA 13
333 #define ERROR_INVALID_DRIVE 15
334 #define ERROR_CURRENT_DIRECTORY 16
335 #define ERROR_NOT_SAME_DEVICE 17
336 #define ERROR_NO_MORE_FILES 18
337 #define ERROR_WRITE_PROTECT 19
338 #define ERROR_BAD_UNIT 20
339 #define ERROR_NOT_READY 21
340 #define ERROR_BAD_COMMAND 22
341 #define ERROR_CRC 23
342 #define ERROR_BAD_LENGTH 24
343 #define ERROR_SEEK 25
344 #define ERROR_NOT_DOS_DISK 26
345 #define ERROR_SECTOR_NOT_FOUND 27
346 #define ERROR_OUT_OF_PAPER 28
347 #define ERROR_WRITE_FAULT 29
348 #define ERROR_READ_FAULT 30
349 #define ERROR_GEN_FAILURE 31
350 #define ERROR_SHARING_VIOLATION 32
351 #define ERROR_LOCK_VIOLATION 33
352 #define ERROR_WRONG_DISK 34
353 #define ERROR_FCB_UNAVAILABLE 35
354 #define ERROR_SHARING_BUFFER_EXCEEDED 36
355 #define ERROR_CODE_PAGE_MISMATCHED 37
356 #define ERROR_HANDLE_EOF 38
357 #define ERROR_HANDLE_DISK_FULL 39
358 #define ERROR_NOT_SUPPORTED 50
359 #define ERROR_REM_NOT_LIST 51
360 #define ERROR_DUP_NAME 52
361 #define ERROR_BAD_NETPATH 53
362 #define ERROR_NETWORK_BUSY 54
363 #define ERROR_DEV_NOT_EXIST 55
364 #define ERROR_TOO_MANY_CMDS 56
365 #define ERROR_ADAP_HDW_ERR 57
366 #define ERROR_BAD_NET_RESP 58
367 #define ERROR_UNEXP_NET_ERR 59
368 #define ERROR_BAD_REM_ADAP 60
369 #define ERROR_PRINTQ_FULL 61
370 #define ERROR_NO_SPOOL_SPACE 62
371 #define ERROR_PRINT_CANCELLED 63
372 #define ERROR_NETNAME_DELETED 64
373 #define ERROR_NETWORK_ACCESS_DENIED 65
374 #define ERROR_BAD_DEV_TYPE 66
375 #define ERROR_BAD_NET_NAME 67
376 #define ERROR_TOO_MANY_NAMES 68
377 #define ERROR_TOO_MANY_SESS 69
378 #define ERROR_SHARING_PAUSED 70
379 #define ERROR_REQ_NOT_ACCEP 71
380 #define ERROR_REDIR_PAUSED 72
381 #define ERROR_SBCS_ATT_WRITE_PROT 73
382 #define ERROR_SBCS_GENERAL_FAILURE 74
383 #define ERROR_XGA_OUT_MEMORY 75
384 #define ERROR_FILE_EXISTS 80
385 #define ERROR_DUP_FCB 81
386 #define ERROR_CANNOT_MAKE 82
387 #define ERROR_FAIL_I24 83
388 #define ERROR_OUT_OF_STRUCTURES 84
389 #define ERROR_ALREADY_ASSIGNED 85
390 #define ERROR_INVALID_PASSWORD 86
391 #define ERROR_INVALID_PARAMETER 87
392 #define ERROR_NET_WRITE_FAULT 88
393 #define ERROR_NO_PROC_SLOTS 89
394 #define ERROR_NOT_FROZEN 90
395 #define ERROR_SYS_COMP_NOT_LOADED 90 /*!*/
396 #define ERR_TSTOVFL 91
397 #define ERR_TSTDUP 92
398 #define ERROR_NO_ITEMS 93
399 #define ERROR_INTERRUPT 95
400 #define ERROR_DEVICE_IN_USE 99
401 #define ERROR_TOO_MANY_SEMAPHORES 100
402 #define ERROR_EXCL_SEM_ALREADY_OWNED 101
403 #define ERROR_SEM_IS_SET 102
404 #define ERROR_TOO_MANY_SEM_REQUESTS 103
405 #define ERROR_INVALID_AT_INTERRUPT_TIME 104
406 #define ERROR_SEM_OWNER_DIED 105
407 #define ERROR_SEM_USER_LIMIT 106
408 #define ERROR_DISK_CHANGE 107
409 #define ERROR_DRIVE_LOCKED 108
410 #define ERROR_BROKEN_PIPE 109
411 #define ERROR_OPEN_FAILED 110
412 #define ERROR_BUFFER_OVERFLOW 111
413 #define ERROR_DISK_FULL 112
414 #define ERROR_NO_MORE_SEARCH_HANDLES 113
415 #define ERROR_INVALID_TARGET_HANDLE 114
416 #define ERROR_PROTECTION_VIOLATION 115
417 #define ERROR_VIOKBD_REQUEST 116
418 #define ERROR_INVALID_CATEGORY 117
419 #define ERROR_INVALID_VERIFY_SWITCH 118
420 #define ERROR_BAD_DRIVER_LEVEL 119
421 #define ERROR_CALL_NOT_IMPLEMENTED 120
422 #define ERROR_SEM_TIMEOUT 121
423 #define ERROR_INSUFFICIENT_BUFFER 122
424 #define ERROR_INVALID_NAME 123
425 #define ERROR_INVALID_LEVEL 124
426 #define ERROR_NO_VOLUME_LABEL 125
427 #define ERROR_MOD_NOT_FOUND 126
428 #define ERROR_PROC_NOT_FOUND 127
429 #define ERROR_WAIT_NO_CHILDREN 128
430 #define ERROR_CHILD_NOT_COMPLETE 129
431 #define ERROR_DIRECT_ACCESS_HANDLE 130
432 #define ERROR_NEGATIVE_SEEK 131
433 #define ERROR_SEEK_ON_DEVICE 132
434 #define ERROR_IS_JOIN_TARGET 133
435 #define ERROR_IS_JOINED 134
436 #define ERROR_IS_SUBSTED 135
437 #define ERROR_NOT_JOINED 136
438 #define ERROR_NOT_SUBSTED 137
439 #define ERROR_JOIN_TO_JOIN 138
440 #define ERROR_SUBST_TO_SUBST 139
441 #define ERROR_JOIN_TO_SUBST 140
442 #define ERROR_SUBST_TO_JOIN 141
443 #define ERROR_BUSY_DRIVE 142
444 #define ERROR_SAME_DRIVE 143
445 #define ERROR_DIR_NOT_ROOT 144
446 #define ERROR_DIR_NOT_EMPTY 145
447 #define ERROR_IS_SUBST_PATH 146
448 #define ERROR_IS_JOIN_PATH 147
449 #define ERROR_PATH_BUSY 148
450 #define ERROR_IS_SUBST_TARGET 149
451 #define ERROR_SYSTEM_TRACE 150
452 #define ERROR_INVALID_EVENT_COUNT 151
453 #define ERROR_TOO_MANY_MUXWAITERS 152
454 #define ERROR_INVALID_LIST_FORMAT 153
455 #define ERROR_LABEL_TOO_LONG 154
456 #define ERROR_TOO_MANY_TCBS 155
457 #define ERROR_SIGNAL_REFUSED 156
458 #define ERROR_DISCARDED 157
459 #define ERROR_NOT_LOCKED 158
460 #define ERROR_BAD_THREADID_ADDR 159
461 #define ERROR_BAD_ARGUMENTS 160
462 #define ERROR_BAD_PATHNAME 161
463 #define ERROR_SIGNAL_PENDING 162
464 #define ERROR_UNCERTAIN_MEDIA 163
465 #define ERROR_MAX_THRDS_REACHED 164
466 #define ERROR_MONITORS_NOT_SUPPORTED 165
467 #define ERROR_UNC_DRIVER_NOT_INSTALLED 166
468 #define ERROR_LOCK_FAILED 167
469 #define ERROR_SWAPIO_FAILED 168
470 #define ERROR_SWAPIN_FAILED 169
471 #define ERROR_BUSY 170
472 #define ERROR_CANCEL_VIOLATION 173
473 #define ERROR_ATOMIC_LOCK_NOT_SUPPORTED 174
474 #define ERROR_READ_LOCKS_NOT_SUPPORTED 175
475 #define ERROR_INVALID_SEGMENT_NUMBER 180
476 #define ERROR_INVALID_CALLGATE 181
477 #define ERROR_INVALID_ORDINAL 182
478 #define ERROR_ALREADY_EXISTS 183
479 #define ERROR_NO_CHILD_PROCESS 184
480 #define ERROR_CHILD_ALIVE_NOWAIT 185
481 #define ERROR_INVALID_FLAG_NUMBER 186
482 #define ERROR_SEM_NOT_FOUND 187
483 #define ERROR_INVALID_STARTING_CODESEG 188
484 #define ERROR_INVALID_STACKSEG 189
485 #define ERROR_INVALID_MODULETYPE 190
486 #define ERROR_INVALID_EXE_SIGNATURE 191
487 #define ERROR_EXE_MARKED_INVALID 192
488 #define ERROR_BAD_EXE_FORMAT 193
489 #define ERROR_ITERATED_DATA_EXCEEDS_64K 194
490 #define ERROR_INVALID_MINALLOCSIZE 195
491 #define ERROR_DYNLINK_FROM_INVALID_RING 196
492 #define ERROR_IOPL_NOT_ENABLED 197
493 #define ERROR_INVALID_SEGDPL 198
494 #define ERROR_AUTODATASEG_EXCEEDS_64K 199
495 #define ERROR_RING2SEG_MUST_BE_MOVABLE 200
496 #define ERROR_RELOCSRC_CHAIN_EXCEEDS_SEGLIMIT 201
497 #define ERROR_INFLOOP_IN_RELOC_CHAIN 202
498 #define ERROR_ENVVAR_NOT_FOUND 203
499 #define ERROR_NOT_CURRENT_CTRY 204
500 #define ERROR_NO_SIGNAL_SENT 205
501 #define ERROR_FILENAME_EXCED_RANGE 206
502 #define ERROR_RING2_STACK_IN_USE 207
503 #define ERROR_META_EXPANSION_TOO_LONG 208
504 #define ERROR_INVALID_SIGNAL_NUMBER 209
505 #define ERROR_THREAD_1_INACTIVE 210
506 #define ERROR_INFO_NOT_AVAIL 211
507 #define ERROR_LOCKED 212
508 #define ERROR_BAD_DYNALINK 213
509 #define ERROR_TOO_MANY_MODULES 214
510 #define ERROR_NESTING_NOT_ALLOWED 215
511 #define ERROR_CANNOT_SHRINK 216
512 #define ERROR_ZOMBIE_PROCESS 217
513 #define ERROR_STACK_IN_HIGH_MEMORY 218
514 #define ERROR_INVALID_EXITROUTINE_RING 219
515 #define ERROR_GETBUF_FAILED 220
516 #define ERROR_FLUSHBUF_FAILED 221
517 #define ERROR_TRANSFER_TOO_LONG 222
518 #define ERROR_FORCENOSWAP_FAILED 223
519 #define ERROR_SMG_NO_TARGET_WINDOW 224
520 #define ERROR_NO_CHILDREN 228
521 #define ERROR_INVALID_SCREEN_GROUP 229
522 #define ERROR_BAD_PIPE 230
523 #define ERROR_PIPE_BUSY 231
524 #define ERROR_NO_DATA 232
525 #define ERROR_PIPE_NOT_CONNECTED 233
526 #define ERROR_MORE_DATA 234
527 #define ERROR_VC_DISCONNECTED 240
528 #define ERROR_CIRCULARITY_REQUESTED 250
529 #define ERROR_DIRECTORY_IN_CDS 251
530 #define ERROR_INVALID_FSD_NAME 252
531 #define ERROR_INVALID_PATH 253
532 #define ERROR_INVALID_EA_NAME 254
533 #define ERROR_EA_LIST_INCONSISTENT 255
534 #define ERROR_EA_LIST_TOO_LONG 256
535 #define ERROR_NO_META_MATCH 257
536 #define ERROR_FINDNOTIFY_TIMEOUT 258
537 #define ERROR_NO_MORE_ITEMS 259
538 #define ERROR_SEARCH_STRUC_REUSED 260
539 #define ERROR_CHAR_NOT_FOUND 261
540 #define ERROR_TOO_MUCH_STACK 262
541 #define ERROR_INVALID_ATTR 263
542 #define ERROR_INVALID_STARTING_RING 264
543 #define ERROR_INVALID_DLL_INIT_RING 265
544 #define ERROR_CANNOT_COPY 266
545 #define ERROR_DIRECTORY 267
546 #define ERROR_OPLOCKED_FILE 268
547 #define ERROR_OPLOCK_THREAD_EXISTS 269
548 #define ERROR_VOLUME_CHANGED 270
549 #define ERROR_FINDNOTIFY_HANDLE_IN_USE 271
550 #define ERROR_FINDNOTIFY_HANDLE_CLOSED 272
551 #define ERROR_NOTIFY_OBJECT_REMOVED 273
552 #define ERROR_ALREADY_SHUTDOWN 274
553 #define ERROR_EAS_DIDNT_FIT 275
554 #define ERROR_EA_FILE_CORRUPT 276
555 #define ERROR_EA_TABLE_FULL 277
556 #define ERROR_INVALID_EA_HANDLE 278
557 #define ERROR_NO_CLUSTER 279
558 #define ERROR_CREATE_EA_FILE 280
559 #define ERROR_CANNOT_OPEN_EA_FILE 281
560 #define ERROR_EAS_NOT_SUPPORTED 282
561 #define ERROR_NEED_EAS_FOUND 283
562 #define ERROR_DUPLICATE_HANDLE 284
563 #define ERROR_DUPLICATE_NAME 285
564 #define ERROR_EMPTY_MUXWAIT 286
565 #define ERROR_MUTEX_OWNED 287
566 #define ERROR_NOT_OWNER 288
567 #define ERROR_PARAM_TOO_SMALL 289
568 #define ERROR_TOO_MANY_HANDLES 290
569 #define ERROR_TOO_MANY_OPENS 291
570 #define ERROR_WRONG_TYPE 292
571 #define ERROR_UNUSED_CODE 293
572 #define ERROR_THREAD_NOT_TERMINATED 294
573 #define ERROR_INIT_ROUTINE_FAILED 295
574 #define ERROR_MODULE_IN_USE 296
575 #define ERROR_NOT_ENOUGH_WATCHPOINTS 297
576 #define ERROR_TOO_MANY_POSTS 298
577 #define ERROR_ALREADY_POSTED 299
578 #define ERROR_ALREADY_RESET 300
579 #define ERROR_SEM_BUSY 301
580 #define ERROR_INVALID_PROCID 303
581 #define ERROR_INVALID_PDELTA 304
582 #define ERROR_NOT_DESCENDANT 305
583 #define ERROR_NOT_SESSION_MANAGER 306
584 #define ERROR_INVALID_PCLASS 307
585 #define ERROR_INVALID_SCOPE 308
586 #define ERROR_INVALID_THREADID 309
587 #define ERROR_DOSSUB_SHRINK 310
588 #define ERROR_DOSSUB_NOMEM 311
589 #define ERROR_DOSSUB_OVERLAP 312
590 #define ERROR_DOSSUB_BADSIZE 313
591 #define ERROR_DOSSUB_BADFLAG 314
592 #define ERROR_DOSSUB_BADSELECTOR 315
593 #define ERROR_MR_MSG_TOO_LONG 316
594 #define ERROR_MR_MID_NOT_FOUND 317
595 #define ERROR_MR_UN_ACC_MSGF 318
596 #define ERROR_MR_INV_MSGF_FORMAT 319
597 #define ERROR_MR_INV_IVCOUNT 320
598 #define ERROR_MR_UN_PERFORM 321
599 #define ERROR_TS_WAKEUP 322
600 #define ERROR_TS_SEMHANDLE 323
601 #define ERROR_TS_NOTIMER 324
602 #define ERROR_TS_HANDLE 326
603 #define ERROR_TS_DATETIME 327
604 #define ERROR_SYS_INTERNAL 328
605 #define ERROR_QUE_CURRENT_NAME 329
606 #define ERROR_QUE_PROC_NOT_OWNED 330
607 #define ERROR_QUE_PROC_OWNED 331
608 #define ERROR_QUE_DUPLICATE 332
609 #define ERROR_QUE_ELEMENT_NOT_EXIST 333
610 #define ERROR_QUE_NO_MEMORY 334
611 #define ERROR_QUE_INVALID_NAME 335
612 #define ERROR_QUE_INVALID_PRIORITY 336
613 #define ERROR_QUE_INVALID_HANDLE 337
614 #define ERROR_QUE_LINK_NOT_FOUND 338
615 #define ERROR_QUE_MEMORY_ERROR 339
616 #define ERROR_QUE_PREV_AT_END 340
617 #define ERROR_QUE_PROC_NO_ACCESS 341
618 #define ERROR_QUE_EMPTY 342
619 #define ERROR_QUE_NAME_NOT_EXIST 343
620 #define ERROR_QUE_NOT_INITIALIZED 344
621 #define ERROR_QUE_UNABLE_TO_ACCESS 345
622 #define ERROR_QUE_UNABLE_TO_ADD 346
623 #define ERROR_QUE_UNABLE_TO_INIT 347
624 #define ERROR_VIO_INVALID_MASK 349
625 #define ERROR_VIO_PTR 350
626 #define ERROR_VIO_APTR 351
627 #define ERROR_VIO_RPTR 352
628 #define ERROR_VIO_CPTR 353
629 #define ERROR_VIO_LPTR 354
630 #define ERROR_VIO_MODE 355
631 #define ERROR_VIO_WIDTH 356
632 #define ERROR_VIO_ATTR 357
633 #define ERROR_VIO_ROW 358
634 #define ERROR_VIO_COL 359
635 #define ERROR_VIO_TOPROW 360
636 #define ERROR_VIO_BOTROW 361
637 #define ERROR_VIO_RIGHTCOL 362
638 #define ERROR_VIO_LEFTCOL 363
639 #define ERROR_SCS_CALL 364
640 #define ERROR_SCS_VALUE 365
641 #define ERROR_VIO_WAIT_FLAG 366
642 #define ERROR_VIO_UNLOCK 367
643 #define ERROR_SGS_NOT_SESSION_MGR 368
644 #define ERROR_SMG_INVALID_SGID 369
645 #define ERROR_SMG_INVALID_SESSION_ID 369 /*!*/
646 #define ERROR_SMG_NOSG 370
647 #define ERROR_SMG_NO_SESSIONS 370 /*!*/
648 #define ERROR_SMG_GRP_NOT_FOUND 371
649 #define ERROR_SMG_SESSION_NOT_FOUND 371 /*!*/
650 #define ERROR_SMG_SET_TITLE 372
651 #define ERROR_KBD_PARAMETER 373
652 #define ERROR_KBD_NO_DEVICE 374
653 #define ERROR_KBD_INVALID_IOWAIT 375
654 #define ERROR_KBD_INVALID_LENGTH 376
655 #define ERROR_KBD_INVALID_ECHO_MASK 377
656 #define ERROR_KBD_INVALID_INPUT_MASK 378
657 #define ERROR_MON_INVALID_PARMS 379
658 #define ERROR_MON_INVALID_DEVNAME 380
659 #define ERROR_MON_INVALID_HANDLE 381
660 #define ERROR_MON_BUFFER_TOO_SMALL 382
661 #define ERROR_MON_BUFFER_EMPTY 383
662 #define ERROR_MON_DATA_TOO_LARGE 384
663 #define ERROR_MOUSE_NO_DEVICE 385
664 #define ERROR_MOUSE_INV_HANDLE 386
665 #define ERROR_MOUSE_INV_PARMS 387
666 #define ERROR_MOUSE_CANT_RESET 388
667 #define ERROR_MOUSE_DISPLAY_PARMS 389
668 #define ERROR_MOUSE_INV_MODULE 390
669 #define ERROR_MOUSE_INV_ENTRY_PT 391
670 #define ERROR_MOUSE_INV_MASK 392
671 #define NO_ERROR_MOUSE_NO_DATA 393
672 #define NO_ERROR_MOUSE_PTR_DRAWN 394
673 #define ERROR_INVALID_FREQUENCY 395
674 #define ERROR_NLS_NO_COUNTRY_FILE 396
675 #define ERROR_NLS_OPEN_FAILED 397
676 #define ERROR_NLS_NO_CTRY_CODE 398
677 #define ERROR_NLS_TABLE_TRUNCATED 399
678 #define ERROR_NLS_BAD_TYPE 400
679 #define ERROR_NLS_TYPE_NOT_FOUND 401
680 #define ERROR_VIO_SMG_ONLY 402
681 #define ERROR_VIO_INVALID_ASCIIZ 403
682 #define ERROR_VIO_DEREGISTER 404
683 #define ERROR_VIO_NO_POPUP 405
684 #define ERROR_VIO_EXISTING_POPUP 406
685 #define ERROR_KBD_SMG_ONLY 407
686 #define ERROR_KBD_INVALID_ASCIIZ 408
687 #define ERROR_KBD_INVALID_MASK 409
688 #define ERROR_KBD_REGISTER 410
689 #define ERROR_KBD_DEREGISTER 411
690 #define ERROR_MOUSE_SMG_ONLY 412
691 #define ERROR_MOUSE_INVALID_ASCIIZ 413
692 #define ERROR_MOUSE_INVALID_MASK 414
693 #define ERROR_MOUSE_REGISTER 415
694 #define ERROR_MOUSE_DEREGISTER 416
695 #define ERROR_SMG_BAD_ACTION 417
696 #define ERROR_SMG_INVALID_CALL 418
697 #define ERROR_SCS_SG_NOTFOUND 419
698 #define ERROR_SCS_NOT_SHELL 420
699 #define ERROR_VIO_INVALID_PARMS 421
700 #define ERROR_VIO_FUNCTION_OWNED 422
701 #define ERROR_VIO_RETURN 423
702 #define ERROR_SCS_INVALID_FUNCTION 424
703 #define ERROR_SCS_NOT_SESSION_MGR 425
704 #define ERROR_VIO_REGISTER 426
705 #define ERROR_VIO_NO_MODE_THREAD 427
706 #define ERROR_VIO_NO_SAVE_RESTORE_THD 428
707 #define ERROR_VIO_IN_BG 429
708 #define ERROR_VIO_ILLEGAL_DURING_POPUP 430
709 #define ERROR_SMG_NOT_BASESHELL 431
710 #define ERROR_SMG_BAD_STATUSREQ 432
711 #define ERROR_QUE_INVALID_WAIT 433
712 #define ERROR_VIO_LOCK 434
713 #define ERROR_MOUSE_INVALID_IOWAIT 435
714 #define ERROR_VIO_INVALID_HANDLE 436
715 #define ERROR_VIO_ILLEGAL_DURING_LOCK 437
716 #define ERROR_VIO_INVALID_LENGTH 438
717 #define ERROR_KBD_INVALID_HANDLE 439
718 #define ERROR_KBD_NO_MORE_HANDLE 440
719 #define ERROR_KBD_CANNOT_CREATE_KCB 441
720 #define ERROR_KBD_CODEPAGE_LOAD_INCOMPL 442
721 #define ERROR_KBD_INVALID_CODEPAGE_ID 443
722 #define ERROR_KBD_NO_CODEPAGE_SUPPORT 444
723 #define ERROR_KBD_FOCUS_REQUIRED 445
724 #define ERROR_KBD_FOCUS_ALREADY_ACTIVE 446
725 #define ERROR_KBD_KEYBOARD_BUSY 447
726 #define ERROR_KBD_INVALID_CODEPAGE 448
727 #define ERROR_KBD_UNABLE_TO_FOCUS 449
728 #define ERROR_SMG_SESSION_NON_SELECT 450
729 #define ERROR_SMG_SESSION_NOT_FOREGRND 451
730 #define ERROR_SMG_SESSION_NOT_PARENT 452
731 #define ERROR_SMG_INVALID_START_MODE 453
732 #define ERROR_SMG_INVALID_RELATED_OPT 454
733 #define ERROR_SMG_INVALID_BOND_OPTION 455
734 #define ERROR_SMG_INVALID_SELECT_OPT 456
735 #define ERROR_SMG_START_IN_BACKGROUND 457
736 #define ERROR_SMG_INVALID_STOP_OPTION 458
737 #define ERROR_SMG_BAD_RESERVE 459
738 #define ERROR_SMG_PROCESS_NOT_PARENT 460
739 #define ERROR_SMG_INVALID_DATA_LENGTH 461
740 #define ERROR_SMG_NOT_BOUND 462
741 #define ERROR_SMG_RETRY_SUB_ALLOC 463
742 #define ERROR_KBD_DETACHED 464
743 #define ERROR_VIO_DETACHED 465
744 #define ERROR_MOU_DETACHED 466
745 #define ERROR_VIO_FONT 467
746 #define ERROR_VIO_USER_FONT 468
747 #define ERROR_VIO_BAD_CP 469
748 #define ERROR_VIO_NO_CP 470
749 #define ERROR_VIO_NA_CP 471
750 #define ERROR_INVALID_CODE_PAGE 472
751 #define ERROR_CPLIST_TOO_SMALL 473
752 #define ERROR_CP_NOT_MOVED 474
753 #define ERROR_MODE_SWITCH_INIT 475
754 #define ERROR_CODE_PAGE_NOT_FOUND 476
755 #define ERROR_UNEXPECTED_SLOT_RETURNED 477
756 #define ERROR_SMG_INVALID_TRACE_OPTION 478
757 #define ERROR_VIO_INTERNAL_RESOURCE 479
758 #define ERROR_VIO_SHELL_INIT 480
759 #define ERROR_SMG_NO_HARD_ERRORS 481
760 #define ERROR_CP_SWITCH_INCOMPLETE 482
761 #define ERROR_VIO_TRANSPARENT_POPUP 483
762 #define ERROR_CRITSEC_OVERFLOW 484
763 #define ERROR_CRITSEC_UNDERFLOW 485
764 #define ERROR_VIO_BAD_RESERVE 486
765 #define ERROR_INVALID_ADDRESS 487
766 #define ERROR_ZERO_SELECTORS_REQUESTED 488
767 #define ERROR_NOT_ENOUGH_SELECTORS_AVA 489
768 #define ERROR_INVALID_SELECTOR 490
769 #define ERROR_SMG_INVALID_PROGRAM_TYPE 491
770 #define ERROR_SMG_INVALID_PGM_CONTROL 492
771 #define ERROR_SMG_INVALID_INHERIT_OPT 493
772 #define ERROR_VIO_EXTENDED_SG 494
773 #define ERROR_VIO_NOT_PRES_MGR_SG 495
774 #define ERROR_VIO_SHIELD_OWNED 496
775 #define ERROR_VIO_NO_MORE_HANDLES 497
776 #define ERROR_VIO_SEE_ERROR_LOG 498
777 #define ERROR_VIO_ASSOCIATED_DC 499
778 #define ERROR_KBD_NO_CONSOLE 500
779 #define ERROR_MOUSE_NO_CONSOLE 501
780 #define ERROR_MOUSE_INVALID_HANDLE 502
781 #define ERROR_SMG_INVALID_DEBUG_PARMS 503
782 #define ERROR_KBD_EXTENDED_SG 504
783 #define ERROR_MOU_EXTENDED_SG 505
784 #define ERROR_SMG_INVALID_ICON_FILE 506
785 #define ERROR_TRC_PID_NON_EXISTENT 507
786 #define ERROR_TRC_COUNT_ACTIVE 508
787 #define ERROR_TRC_SUSPENDED_BY_COUNT 509
788 #define ERROR_TRC_COUNT_INACTIVE 510
789 #define ERROR_TRC_COUNT_REACHED 511
790 #define ERROR_NO_MC_TRACE 512
791 #define ERROR_MC_TRACE 513
792 #define ERROR_TRC_COUNT_ZERO 514
793 #define ERROR_SMG_TOO_MANY_DDS 515
794 #define ERROR_SMG_INVALID_NOTIFICATION 516
795 #define ERROR_LF_INVALID_FUNCTION 517
796 #define ERROR_LF_NOT_AVAIL 518
797 #define ERROR_LF_SUSPENDED 519
798 #define ERROR_LF_BUF_TOO_SMALL 520
799 #define ERROR_LF_BUFFER_CORRUPTED 521
800 #define ERROR_LF_BUFFER_FULL 521 /*!*/
801 #define ERROR_LF_INVALID_DAEMON 522
802 #define ERROR_LF_INVALID_RECORD 522 /*!*/
803 #define ERROR_LF_INVALID_TEMPL 523
804 #define ERROR_LF_INVALID_SERVICE 523 /*!*/
805 #define ERROR_LF_GENERAL_FAILURE 524
806 #define ERROR_LF_INVALID_ID 525
807 #define ERROR_LF_INVALID_HANDLE 526
808 #define ERROR_LF_NO_ID_AVAIL 527
809 #define ERROR_LF_TEMPLATE_AREA_FULL 528
810 #define ERROR_LF_ID_IN_USE 529
811 #define ERROR_MOU_NOT_INITIALIZED 530
812 #define ERROR_MOUINITREAL_DONE 531
813 #define ERROR_DOSSUB_CORRUPTED 532
814 #define ERROR_MOUSE_CALLER_NOT_SUBSYS 533
815 #define ERROR_ARITHMETIC_OVERFLOW 534
816 #define ERROR_TMR_NO_DEVICE 535
817 #define ERROR_TMR_INVALID_TIME 536
818 #define ERROR_PVW_INVALID_ENTITY 537
819 #define ERROR_PVW_INVALID_ENTITY_TYPE 538
820 #define ERROR_PVW_INVALID_SPEC 539
821 #define ERROR_PVW_INVALID_RANGE_TYPE 540
822 #define ERROR_PVW_INVALID_COUNTER_BLK 541
823 #define ERROR_PVW_INVALID_TEXT_BLK 542
824 #define ERROR_PRF_NOT_INITIALIZED 543
825 #define ERROR_PRF_ALREADY_INITIALIZED 544
826 #define ERROR_PRF_NOT_STARTED 545
827 #define ERROR_PRF_ALREADY_STARTED 546
828 #define ERROR_PRF_TIMER_OUT_OF_RANGE 547
829 #define ERROR_PRF_TIMER_RESET 548
830 #define ERROR_VDD_LOCK_USEAGE_DENIED 639
831 #define ERROR_TIMEOUT 640
832 #define ERROR_VDM_DOWN 641
833 #define ERROR_VDM_LIMIT 642
834 #define ERROR_VDD_NOT_FOUND 643
835 #define ERROR_INVALID_CALLER 644
836 #define ERROR_PID_MISMATCH 645
837 #define ERROR_INVALID_VDD_HANDLE 646
838 #define ERROR_VLPT_NO_SPOOLER 647
839 #define ERROR_VCOM_DEVICE_BUSY 648
840 #define ERROR_VLPT_DEVICE_BUSY 649
841 #define ERROR_NESTING_TOO_DEEP 650
842 #define ERROR_VDD_MISSING 651
843 #define ERROR_BIDI_INVALID_LENGTH 671
844 #define ERROR_BIDI_INVALID_INCREMENT 672
845 #define ERROR_BIDI_INVALID_COMBINATION 673
846 #define ERROR_BIDI_INVALID_RESERVED 674
847 #define ERROR_BIDI_INVALID_EFFECT 675
848 #define ERROR_BIDI_INVALID_CSDREC 676
849 #define ERROR_BIDI_INVALID_CSDSTATE 677
850 #define ERROR_BIDI_INVALID_LEVEL 678
851 #define ERROR_BIDI_INVALID_TYPE_SUPPORT 679
852 #define ERROR_BIDI_INVALID_ORIENTATION 680
853 #define ERROR_BIDI_INVALID_NUM_SHAPE 681
854 #define ERROR_BIDI_INVALID_CSD 682
855 #define ERROR_BIDI_NO_SUPPORT 683
856 #define NO_ERROR_BIDI_RW_INCOMPLETE 684
857 #define ERROR_IMP_INVALID_PARM 691
858 #define ERROR_IMP_INVALID_LENGTH 692
859 #define ERROR_MON_BAD_BUFFER 730
860 #define ERROR_MODULE_CORRUPTED 731
861 #define ERROR_SM_OUTOF_SWAPFILE 1477
862 #define ERROR_LF_TIMEOUT 2055
863 #define ERROR_LF_SUSPEND_SUCCESS 2057
864 #define ERROR_LF_RESUME_SUCCESS 2058
865 #define ERROR_LF_REDIRECT_SUCCESS 2059
866 #define ERROR_LF_REDIRECT_FAILURE 2060
867 #define ERROR_SWAPPER_NOT_ACTIVE 32768
868 #define ERROR_INVALID_SWAPID 32769
869 #define ERROR_IOERR_SWAP_FILE 32770
870 #define ERROR_SWAP_TABLE_FULL 32771
871 #define ERROR_SWAP_FILE_FULL 32772
872 #define ERROR_CANT_INIT_SWAPPER 32773
873 #define ERROR_SWAPPER_ALREADY_INIT 32774
874 #define ERROR_PMM_INSUFFICIENT_MEMORY 32775
875 #define ERROR_PMM_INVALID_FLAGS 32776
876 #define ERROR_PMM_INVALID_ADDRESS 32777
877 #define ERROR_PMM_LOCK_FAILED 32778
878 #define ERROR_PMM_UNLOCK_FAILED 32779
879 #define ERROR_PMM_MOVE_INCOMPLETE 32780
880 #define ERROR_UCOM_DRIVE_RENAMED 32781
881 #define ERROR_UCOM_FILENAME_TRUNCATED 32782
882 #define ERROR_UCOM_BUFFER_LENGTH 32783
883 #define ERROR_MON_CHAIN_HANDLE 32784
884 #define ERROR_MON_NOT_REGISTERED 32785
885 #define ERROR_SMG_ALREADY_TOP 32786
886 #define ERROR_PMM_ARENA_MODIFIED 32787
887 #define ERROR_SMG_PRINTER_OPEN 32788
888 #define ERROR_PMM_SET_FLAGS_FAILED 32789
889 #define ERROR_INVALID_DOS_DD 32790
890 #define ERROR_BLOCKED 32791
891 #define ERROR_NOBLOCK 32792
892 #define ERROR_INSTANCE_SHARED 32793
893 #define ERROR_NO_OBJECT 32794
894 #define ERROR_PARTIAL_ATTACH 32795
895 #define ERROR_INCACHE 32796
896 #define ERROR_SWAP_IO_PROBLEMS 32797
897 #define ERROR_CROSSES_OBJECT_BOUNDARY 32798
898 #define ERROR_LONGLOCK 32799
899 #define ERROR_SHORTLOCK 32800
900 #define ERROR_UVIRTLOCK 32801
901 #define ERROR_ALIASLOCK 32802
902 #define ERROR_ALIAS 32803
903 #define ERROR_NO_MORE_HANDLES 32804
904 #define ERROR_SCAN_TERMINATED 32805
905 #define ERROR_TERMINATOR_NOT_FOUND 32806
906 #define ERROR_NOT_DIRECT_CHILD 32807
907 #define ERROR_DELAY_FREE 32808
908 #define ERROR_GUARDPAGE 32809
909 #define ERROR_SWAPERROR 32900
910 #define ERROR_LDRERROR 32901
911 #define ERROR_NOMEMORY 32902
912 #define ERROR_NOACCESS 32903
913 #define ERROR_NO_DLL_TERM 32904
914 #define ERROR_CPSIO_CODE_PAGE_INVALID 65026
915 #define ERROR_CPSIO_NO_SPOOLER 65027
916 #define ERROR_CPSIO_FONT_ID_INVALID 65028
917 #define ERROR_CPSIO_INTERNAL_ERROR 65033
918 #define ERROR_CPSIO_INVALID_PTR_NAME 65034
919 #define ERROR_CPSIO_NOT_ACTIVE 65037
920 #define ERROR_CPSIO_PID_FULL 65039
921 #define ERROR_CPSIO_PID_NOT_FOUND 65040
922 #define ERROR_CPSIO_READ_CTL_SEQ 65043
923 #define ERROR_CPSIO_READ_FNT_DEF 65045
924 #define ERROR_CPSIO_WRITE_ERROR 65047
925 #define ERROR_CPSIO_WRITE_FULL_ERROR 65048
926 #define ERROR_CPSIO_WRITE_HANDLE_BAD 65049
927 #define ERROR_CPSIO_SWIT_LOAD 65074
928 #define ERROR_CPSIO_INV_COMMAND 65077
929 #define ERROR_CPSIO_NO_FONT_SWIT 65078
930 #define ERROR_ENTRY_IS_CALLGATE 65079
931
932 #endif /* INCL_DOSERRORS */
933
934 /* ----------------------------- ERRORS ----------------------------------- */
935
936 #if defined (INCL_DOSERRORS)
937
938 #define ERRACT_RETRY 1
939 #define ERRACT_DLYRET 2
940 #define ERRACT_USER 3
941 #define ERRACT_ABORT 4
942 #define ERRACT_PANIC 5
943 #define ERRACT_IGNORE 6
944 #define ERRACT_INTRET 7
945
946 #define ERRCLASS_OUTRES 1
947 #define ERRCLASS_TEMPSIT 2
948 #define ERRCLASS_AUTH 3
949 #define ERRCLASS_INTRN 4
950 #define ERRCLASS_HRDFAIL 5
951 #define ERRCLASS_SYSFAIL 6
952 #define ERRCLASS_APPERR 7
953 #define ERRCLASS_NOTFND 8
954 #define ERRCLASS_BADFMT 9
955 #define ERRCLASS_LOCKED 10
956 #define ERRCLASS_MEDIA 11
957 #define ERRCLASS_ALREADY 12
958 #define ERRCLASS_UNK 13
959 #define ERRCLASS_CANT 14
960 #define ERRCLASS_TIME 15
961
962 #define ERRLOC_UNK 1
963 #define ERRLOC_DISK 2
964 #define ERRLOC_NET 3
965 #define ERRLOC_SERDEV 4
966 #define ERRLOC_MEM 5
967
968 #endif /* INCL_DOSERRORS */
969
970 #if defined (INCL_DOSMISC)
971
972 #define FERR_DISABLEHARDERR 0x0000L
973 #define FERR_ENABLEHARDERR 0x0001L
974 #define FERR_ENABLEEXCEPTION 0x0000L
975 #define FERR_DISABLEEXCEPTION 0x0002L
976
977 #define BEGIN_LIBPATH 1
978 #define END_LIBPATH 2
979
980 ULONG DosErrClass (ULONG ulCode, PULONG pulClass, PULONG pulAction,
981 PULONG pulLocus);
982 ULONG DosError (ULONG ulError);
983 ULONG DosQueryExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
984 ULONG DosSetExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
985
986 #endif /* INCL_DOSMISC */
987
988 /* ----------------------------- FONTS ------------------------------------ */
989
990 #define FACESIZE 32
991
992 #define FATTR_SEL_ITALIC 0x0001
993 #define FATTR_SEL_UNDERSCORE 0x0002
994 #define FATTR_SEL_OUTLINE 0x0008
995 #define FATTR_SEL_STRIKEOUT 0x0010
996 #define FATTR_SEL_BOLD 0x0020
997
998 #define FATTR_TYPE_KERNING 0x0004
999 #define FATTR_TYPE_MBCS 0x0008
1000 #define FATTR_TYPE_DBCS 0x0010
1001 #define FATTR_TYPE_ANTIALIASED 0x0020
1002
1003 #define FATTR_FONTUSE_NOMIX 0x0002
1004 #define FATTR_FONTUSE_OUTLINE 0x0004
1005 #define FATTR_FONTUSE_TRANSFORMABLE 0x0008
1006
1007 #define FM_TYPE_FIXED 0x0001
1008 #define FM_TYPE_LICENSED 0x0002
1009 #define FM_TYPE_KERNING 0x0004
1010 #define FM_TYPE_DBCS 0x0010
1011 #define FM_TYPE_MBCS 0x0018
1012 #define FM_TYPE_64K 0x8000
1013 #define FM_TYPE_ATOMS 0x4000
1014 #define FM_TYPE_FAMTRUNC 0x2000
1015 #define FM_TYPE_FACETRUNC 0x1000
1016
1017 #define FM_DEFN_OUTLINE 0x0001
1018 #define FM_DEFN_IFI 0x0002
1019 #define FM_DEFN_WIN 0x0004
1020 #define FM_DEFN_GENERIC 0x8000
1021
1022 #define FM_SEL_ITALIC 0x0001
1023 #define FM_SEL_UNDERSCORE 0x0002
1024 #define FM_SEL_NEGATIVE 0x0004
1025 #define FM_SEL_OUTLINE 0x0008
1026 #define FM_SEL_STRIKEOUT 0x0010
1027 #define FM_SEL_BOLD 0x0020
1028 #define FM_SEL_ISO9241_TESTED 0x0040
1029
1030 #define FM_CAP_NOMIX 0x0001
1031
1032 #define FM_ISO_9518_640 0x01
1033 #define FM_ISO_9515_640 0x02
1034 #define FM_ISO_9515_1024 0x04
1035 #define FM_ISO_9517_640 0x08
1036 #define FM_ISO_9517_1024 0x10
1037
1038
1039 typedef struct _PANOSE
1040 {
1041 BYTE bFamilyType;
1042 BYTE bSerifStyle;
1043 BYTE bWeight;
1044 BYTE bProportion;
1045 BYTE bContrast;
1046 BYTE bStrokeVariation;
1047 BYTE bArmStyle;
1048 BYTE bLetterform;
1049 BYTE bMidline;
1050 BYTE bXHeight;
1051 BYTE fbPassedISO;
1052 BYTE fbFailedISO;
1053 } PANOSE;
1054
1055 typedef struct _FONTMETRICS
1056 {
1057 CHAR szFamilyname[FACESIZE];
1058 CHAR szFacename[FACESIZE];
1059 USHORT idRegistry;
1060 USHORT usCodePage;
1061 LONG lEmHeight;
1062 LONG lXHeight;
1063 LONG lMaxAscender;
1064 LONG lMaxDescender;
1065 LONG lLowerCaseAscent;
1066 LONG lLowerCaseDescent;
1067 LONG lInternalLeading;
1068 LONG lExternalLeading;
1069 LONG lAveCharWidth;
1070 LONG lMaxCharInc;
1071 LONG lEmInc;
1072 LONG lMaxBaselineExt;
1073 SHORT sCharSlope;
1074 SHORT sInlineDir;
1075 SHORT sCharRot;
1076 USHORT usWeightClass;
1077 USHORT usWidthClass;
1078 SHORT sXDeviceRes;
1079 SHORT sYDeviceRes;
1080 SHORT sFirstChar;
1081 SHORT sLastChar;
1082 SHORT sDefaultChar;
1083 SHORT sBreakChar;
1084 SHORT sNominalPointSize;
1085 SHORT sMinimumPointSize;
1086 SHORT sMaximumPointSize;
1087 USHORT fsType;
1088 USHORT fsDefn;
1089 USHORT fsSelection;
1090 USHORT fsCapabilities;
1091 LONG lSubscriptXSize;
1092 LONG lSubscriptYSize;
1093 LONG lSubscriptXOffset;
1094 LONG lSubscriptYOffset;
1095 LONG lSuperscriptXSize;
1096 LONG lSuperscriptYSize;
1097 LONG lSuperscriptXOffset;
1098 LONG lSuperscriptYOffset;
1099 LONG lUnderscoreSize;
1100 LONG lUnderscorePosition;
1101 LONG lStrikeoutSize;
1102 LONG lStrikeoutPosition;
1103 SHORT sKerningPairs;
1104 SHORT sFamilyClass;
1105 LONG lMatch;
1106 LONG FamilyNameAtom;
1107 LONG FaceNameAtom;
1108 PANOSE panose;
1109 } FONTMETRICS;
1110 typedef FONTMETRICS *PFONTMETRICS;
1111
1112 typedef struct _FATTRS
1113 {
1114 USHORT usRecordLength;
1115 USHORT fsSelection;
1116 LONG lMatch;
1117 CHAR szFacename[FACESIZE];
1118 USHORT idRegistry;
1119 USHORT usCodePage;
1120 LONG lMaxBaselineExt;
1121 LONG lAveCharWidth;
1122 USHORT fsType;
1123 USHORT fsFontUse;
1124 } FATTRS;
1125 typedef FATTRS *PFATTRS;
1126
1127 /* ------------------------- MEMORY MANAGEMENT ---------------------------- */
1128
1129 #if defined (INCL_DOSMEMMGR) || !defined (INCL_NOCOMMON)
1130
1131 #define PAG_READ 0x0001
1132 #define PAG_WRITE 0x0002
1133 #define PAG_EXECUTE 0x0004
1134 #define PAG_GUARD 0x0008
1135 #define PAG_COMMIT 0x0010
1136 #define PAG_DECOMMIT 0x0020
1137 #define OBJ_TILE 0x0040
1138 #define OBJ_PROTECTED 0x0080
1139 #define OBJ_GETTABLE 0x0100
1140 #define OBJ_GIVEABLE 0x0200
1141 #define PAG_DEFAULT 0x0400
1142 #define PAG_SHARED 0x2000
1143 #define PAG_FREE 0x4000
1144 #define PAG_BASE 0x00010000
1145
1146 #define DOSSUB_INIT 0x0001
1147 #define DOSSUB_GROW 0x0002
1148 #define DOSSUB_SPARSE_OBJ 0x0004
1149 #define DOSSUB_SERIALIZE 0x0008
1150
1151 #define fPERM (PAG_EXECUTE | PAG_READ | PAG_WRITE)
1152 #define fSHARE (OBJ_GETTABLE | OBJ_GIVEABLE)
1153 #define fALLOC (fPERM | OBJ_TILE | PAG_COMMIT)
1154 #define fALLOCSHR (fPERM | fSHARE | OBJ_TILE | PAG_COMMIT)
1155 #define fGETNMSHR (fPERM)
1156 #define fGETSHR (fPERM)
1157 #define fGIVESHR (fPERM)
1158 #define fSET (fPERM|PAG_COMMIT|PAG_DECOMMIT|PAG_DEFAULT)
1159
1160 ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize,
1161 ULONG ulAllocationFlags);
1162 ULONG DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName,
1163 ULONG ulObjectSize, ULONG ulAllocationFlags);
1164 ULONG DosFreeMem (PVOID pBaseAddress);
1165 ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName,
1166 ULONG ulAttributeFlags);
1167 ULONG DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags);
1168 ULONG DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId,
1169 ULONG ulAttributeFlags);
1170 ULONG DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize,
1171 PULONG pulAllocationFlags);
1172 ULONG DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize,
1173 ULONG ulAttributeFlags);
1174 ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize);
1175 ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize);
1176 ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize);
1177 ULONG DosSubUnsetMem (PVOID pOffset);
1178
1179 #endif /* INCL_DOSMEMMGR || !INCL_NOCOMMON */
1180
1181 /* --------------------------- FILE SYSTEM -------------------------------- */
1182
1183 #define CCHMAXPATH 260
1184 #define CCHMAXPATHCOMP 256
1185
1186 #if defined (INCL_DOSMISC)
1187 #define DSP_IMPLIEDCUR 1
1188 #define DSP_PATHREF 2
1189 #define DSP_IGNORENETERR 4
1190 #endif
1191
1192 #if defined (INCL_DOSFILEMGR) || !defined (INCL_NOCOMMON)
1193
1194 #define DCPY_EXISTING 0x0001
1195 #define DCPY_APPEND 0x0002
1196 #define DCPY_FAILEAS 0x0004
1197
1198 #define DSPI_WRTTHRU 0x0010
1199
1200 #define EAT_BINARY 0xfffe
1201 #define EAT_ASCII 0xfffd
1202 #define EAT_BITMAP 0xfffb
1203 #define EAT_METAFILE 0xfffa
1204 #define EAT_ICON 0xfff9
1205 #define EAT_EA 0xffee
1206 #define EAT_MVMT 0xffdf
1207 #define EAT_MVST 0xffde
1208 #define EAT_ASN1 0xffdd
1209
1210 #define ENUMEA_LEVEL_NO_VALUE 1
1211
1212 #define ENUMEA_REFTYPE_FHANDLE 0
1213 #define ENUMEA_REFTYPE_PATH 1
1214 #define ENUMEA_REFTYPE_MAX ENUMEA_REFTYPE_PATH
1215
1216 #define ENUMEA_REFTYPE_FHANDLE 0
1217 #define ENUMEA_REFTYPE_PATH 1
1218
1219 #define FEA_NEEDEA 0x80
1220
1221 #define FHB_DSKREMOTE 0x8000
1222 #define FHB_CHRDEVREMOTE 0x8000
1223 #define FHB_PIPEREMOTE 0x8000
1224
1225 #define FHT_DISKFILE 0x0000
1226 #define FHT_CHRDEV 0x0001
1227 #define FHT_PIPE 0x0002
1228
1229 #define FIL_STANDARD 1
1230 #define FIL_QUERYEASIZE 2
1231 #define FIL_QUERYEASFROMLIST 3
1232 #define FIL_QUERYFULLNAME 5 /* DosQueryPathInfo */
1233
1234 #define FILE_BEGIN 0
1235 #define FILE_CURRENT 1
1236 #define FILE_END 2
1237
1238 #define FILE_NORMAL 0x0000
1239 #define FILE_READONLY 0x0001
1240 #define FILE_HIDDEN 0x0002
1241 #define FILE_SYSTEM 0x0004
1242 #define FILE_DIRECTORY 0x0010
1243 #define FILE_ARCHIVED 0x0020
1244
1245 #define FILE_IGNORE 0x10000
1246
1247 #define FILE_EXISTED 0x0001
1248 #define FILE_CREATED 0x0002
1249 #define FILE_TRUNCATED 0x0003
1250
1251 #define FILE_OPEN 0x0001
1252 #define FILE_TRUNCATE 0x0002
1253 #define FILE_CREATE 0x0010
1254
1255 #define FS_ATTACH 0
1256 #define FS_DETACH 1
1257 #define FS_SPOOLATTACH 2
1258 #define FS_SPOOLDETACH 3
1259
1260 #define FSAIL_QUERYNAME 1
1261 #define FSAIL_DEVNUMBER 2
1262 #define FSAIL_DRVNUMBER 3
1263
1264 #define FSAT_CHARDEV 1
1265 #define FSAT_PSEUDODEV 2
1266 #define FSAT_LOCALDRV 3
1267 #define FSAT_REMOTEDRV 4
1268
1269 #define FSCTL_HANDLE 1
1270 #define FSCTL_PATHNAME 2
1271 #define FSCTL_FSDNAME 3
1272
1273 #define FSCTL_ERROR_INFO 1
1274 #define FSCTL_MAX_EASIZE 2
1275 #define FSCTL_GET_NEXT_ROUTE_NAME 3
1276 #define FSCTL_DAEMON_QUERY 4
1277
1278 #define FSCTL_QUERY_COMPLETE 0
1279 #define FSCTL_QUERY_AGAIN 1
1280
1281 #define FSIL_ALLOC 1
1282 #define FSIL_VOLSER 2
1283
1284 #define HANDTYPE_FILE 0x0000
1285 #define HANDTYPE_DEVICE 0x0001
1286 #define HANDTYPE_PIPE 0x0002
1287 #define HANDTYPE_PROTECTED 0x4000
1288 #define HANDTYPE_NETWORK 0x8000
1289
1290 #define HDIR_SYSTEM 1
1291 #define HDIR_CREATE ((HDIR)-1)
1292
1293 #define MUST_HAVE_READONLY (FILE_READONLY | (FILE_READONLY << 8))
1294 #define MUST_HAVE_HIDDEN (FILE_HIDDEN | (FILE_HIDDEN << 8))
1295 #define MUST_HAVE_SYSTEM (FILE_SYSTEM | (FILE_SYSTEM << 8))
1296 #define MUST_HAVE_DIRECTORY (FILE_DIRECTORY | (FILE_DIRECTORY << 8))
1297 #define MUST_HAVE_ARCHIVED (FILE_ARCHIVED | (FILE_ARCHIVED << 8))
1298
1299 #define OPEN_ACTION_FAIL_IF_EXISTS 0x0000
1300 #define OPEN_ACTION_OPEN_IF_EXISTS 0x0001
1301 #define OPEN_ACTION_REPLACE_IF_EXISTS 0x0002
1302 #define OPEN_ACTION_FAIL_IF_NEW 0x0000
1303 #define OPEN_ACTION_CREATE_IF_NEW 0x0010
1304
1305 #define OPEN_ACCESS_READONLY 0x0000
1306 #define OPEN_ACCESS_WRITEONLY 0x0001
1307 #define OPEN_ACCESS_READWRITE 0x0002
1308
1309 #define OPEN_SHARE_DENYREADWRITE 0x0010
1310 #define OPEN_SHARE_DENYWRITE 0x0020
1311 #define OPEN_SHARE_DENYREAD 0x0030
1312 #define OPEN_SHARE_DENYNONE 0x0040
1313
1314 #define OPEN_FLAGS_NOINHERIT 0x0080
1315 #define OPEN_FLAGS_NO_LOCALITY 0x0000
1316 #define OPEN_FLAGS_SEQUENTIAL 0x0100
1317 #define OPEN_FLAGS_RANDOM 0x0200
1318 #define OPEN_FLAGS_RANDOMSEQUENTIAL 0x0300
1319 #define OPEN_FLAGS_NO_CACHE 0x1000
1320 #define OPEN_FLAGS_FAIL_ON_ERROR 0x2000
1321 #define OPEN_FLAGS_WRITE_THROUGH 0x4000
1322 #define OPEN_FLAGS_DASD 0x8000
1323 #define OPEN_FLAGS_NONSPOOLED 0x40000
1324 #define OPEN_FLAGS_PROTECTED_HANDLE 0x40000000
1325
1326 #define SEARCH_PATH 0x0000
1327 #define SEARCH_CUR_DIRECTORY 0x0001
1328 #define SEARCH_ENVIRONMENT 0x0002
1329 #define SEARCH_IGNORENETERRS 0x0004
1330
1331
1332 typedef LHANDLE HFILE;
1333 typedef HFILE *PHFILE;
1334
1335 typedef ULONG FHLOCK;
1336 typedef PULONG PFHLOCK;
1337
1338 typedef LHANDLE HDIR;
1339 typedef HDIR *PHDIR;
1340
1341
1342 typedef struct _FTIME
1343 {
1344 USHORT twosecs : 5;
1345 USHORT minutes : 6;
1346 USHORT hours : 5;
1347 } FTIME;
1348 typedef FTIME *PFTIME;
1349
1350 typedef struct _FDATE
1351 {
1352 USHORT day : 5;
1353 USHORT month : 4;
1354 USHORT year : 7;
1355 } FDATE;
1356 typedef FDATE *PFDATE;
1357
1358 typedef struct _FEA
1359 {
1360 BYTE fEA;
1361 BYTE cbName;
1362 USHORT cbValue;
1363 } FEA;
1364 typedef FEA *PFEA;
1365
1366 typedef struct _FEALIST
1367 {
1368 ULONG cbList;
1369 FEA list[1];
1370 } FEALIST;
1371 typedef FEALIST *PFEALIST;
1372
1373 typedef struct _GEA
1374 {
1375 BYTE cbName;
1376 CHAR szName[1];
1377 } GEA;
1378 typedef GEA *PGEA;
1379
1380 typedef struct _GEALIST
1381 {
1382 ULONG cbList;
1383 GEA list[1];
1384 } GEALIST;
1385 typedef GEALIST *PGEALIST;
1386
1387 typedef struct _EAOP
1388 {
1389 PGEALIST fpGEAList;
1390 PFEALIST fpFEAList;
1391 ULONG oError;
1392 } EAOP;
1393 typedef EAOP *PEAOP;
1394
1395 typedef struct _FEA2
1396 {
1397 ULONG oNextEntryOffset;
1398 BYTE fEA;
1399 BYTE cbName;
1400 USHORT cbValue;
1401 CHAR szName[1];
1402 } FEA2;
1403 typedef FEA2 *PFEA2;
1404
1405 typedef struct _FEA2LIST
1406 {
1407 ULONG cbList;
1408 FEA2 list[1];
1409 } FEA2LIST;
1410 typedef FEA2LIST *PFEA2LIST;
1411
1412 typedef struct _GEA2
1413 {
1414 ULONG oNextEntryOffset;
1415 BYTE cbName;
1416 CHAR szName[1];
1417 } GEA2;
1418 typedef GEA2 *PGEA2;
1419
1420 typedef struct _GEA2LIST
1421 {
1422 ULONG cbList;
1423 GEA2 list[1];
1424 } GEA2LIST;
1425 typedef GEA2LIST *PGEA2LIST;
1426
1427 typedef struct _EAOP2
1428 {
1429 PGEA2LIST fpGEA2List;
1430 PFEA2LIST fpFEA2List;
1431 ULONG oError;
1432 } EAOP2;
1433 typedef EAOP2 *PEAOP2;
1434
1435 typedef struct _DENA1
1436 {
1437 UCHAR reserved;
1438 UCHAR cbName;
1439 USHORT cbValue;
1440 UCHAR szName[1];
1441 } DENA1;
1442 typedef DENA1 *PDENA1;
1443
1444 typedef FEA2 DENA2;
1445 typedef PFEA2 PDENA2;
1446
1447 typedef struct _EASIZEBUF
1448 {
1449 USHORT cbMaxEASize;
1450 ULONG cbMaxEAListSize; /* Packed? */
1451 } EASIZEBUF;
1452 typedef EASIZEBUF *PEASIZEBUF;
1453
1454 typedef struct _ROUTENAMEBUF
1455 {
1456 ULONG hRouteHandle;
1457 UCHAR szRouteName;
1458 } ROUTENAMEBUF;
1459 typedef ROUTENAMEBUF *PROUTENAMEBUF;
1460
1461 typedef struct _FSDTHREAD
1462 {
1463 USHORT usFunc;
1464 USHORT usStackSize;
1465 ULONG ulPriorityClass;
1466 LONG lPriorityLevel;
1467 } FSDTHREAD;
1468
1469 typedef struct _FSDDAEMON
1470 {
1471 USHORT usNumThreads;
1472 USHORT usMoreFlag;
1473 USHORT usCallInstance;
1474 FSDTHREAD tdThrds[16];
1475 } FSDDAEMON;
1476
1477 typedef struct _FILEFINDBUF
1478 {
1479 FDATE fdateCreation;
1480 FTIME ftimeCreation;
1481 FDATE fdateLastAccess;
1482 FTIME ftimeLastAccess;
1483 FDATE fdateLastWrite;
1484 FTIME ftimeLastWrite;
1485 ULONG cbFile;
1486 ULONG cbFileAlloc;
1487 USHORT attrFile;
1488 UCHAR cchName;
1489 CHAR achName[CCHMAXPATHCOMP];
1490 } FILEFINDBUF;
1491 typedef FILEFINDBUF *PFILEFINDBUF;
1492
1493 typedef struct _FILEFINDBUF2
1494 {
1495 FDATE fdateCreation;
1496 FTIME ftimeCreation;
1497 FDATE fdateLastAccess;
1498 FTIME ftimeLastAccess;
1499 FDATE fdateLastWrite;
1500 FTIME ftimeLastWrite;
1501 ULONG cbFile;
1502 ULONG cbFileAlloc;
1503 USHORT attrFile;
1504 ULONG cbList;
1505 UCHAR cchName;
1506 CHAR achName[CCHMAXPATHCOMP];
1507 } FILEFINDBUF2;
1508 typedef FILEFINDBUF2 *PFILEFINDBUF2;
1509
1510 typedef struct _FILEFINDBUF3
1511 {
1512 ULONG oNextEntryOffset;
1513 FDATE fdateCreation;
1514 FTIME ftimeCreation;
1515 FDATE fdateLastAccess;
1516 FTIME ftimeLastAccess;
1517 FDATE fdateLastWrite;
1518 FTIME ftimeLastWrite;
1519 ULONG cbFile;
1520 ULONG cbFileAlloc;
1521 ULONG attrFile;
1522 UCHAR cchName;
1523 CHAR achName[CCHMAXPATHCOMP];
1524 } FILEFINDBUF3;
1525 typedef FILEFINDBUF3 *PFILEFINDBUF3;
1526
1527 typedef struct _FILEFINDBUF4
1528 {
1529 ULONG oNextEntryOffset;
1530 FDATE fdateCreation;
1531 FTIME ftimeCreation;
1532 FDATE fdateLastAccess;
1533 FTIME ftimeLastAccess;
1534 FDATE fdateLastWrite;
1535 FTIME ftimeLastWrite;
1536 ULONG cbFile;
1537 ULONG cbFileAlloc;
1538 ULONG attrFile;
1539 ULONG cbList;
1540 UCHAR cchName;
1541 CHAR achName[CCHMAXPATHCOMP];
1542 } FILEFINDBUF4;
1543 typedef FILEFINDBUF4 *PFILEFINDBUF4;
1544
1545 typedef struct _FILELOCK
1546 {
1547 LONG lOffset;
1548 LONG lRange;
1549 } FILELOCK;
1550 typedef FILELOCK *PFILELOCK;
1551
1552 typedef struct _FILESTATUS
1553 {
1554 FDATE fdateCreation;
1555 FTIME ftimeCreation;
1556 FDATE fdateLastAccess;
1557 FTIME ftimeLastAccess;
1558 FDATE fdateLastWrite;
1559 FTIME ftimeLastWrite;
1560 ULONG cbFile;
1561 ULONG cbFileAlloc;
1562 USHORT attrFile;
1563 } FILESTATUS;
1564 typedef FILESTATUS *PFILESTATUS;
1565
1566 typedef struct _FILESTATUS2
1567 {
1568 FDATE fdateCreation;
1569 FTIME ftimeCreation;
1570 FDATE fdateLastAccess;
1571 FTIME ftimeLastAccess;
1572 FDATE fdateLastWrite;
1573 FTIME ftimeLastWrite;
1574 ULONG cbFile;
1575 ULONG cbFileAlloc;
1576 USHORT attrFile;
1577 ULONG cbList;
1578 } FILESTATUS2;
1579 typedef FILESTATUS2 *PFILESTATUS2;
1580
1581 typedef struct _FILESTATUS3
1582 {
1583 FDATE fdateCreation;
1584 FTIME ftimeCreation;
1585 FDATE fdateLastAccess;
1586 FTIME ftimeLastAccess;
1587 FDATE fdateLastWrite;
1588 FTIME ftimeLastWrite;
1589 ULONG cbFile;
1590 ULONG cbFileAlloc;
1591 ULONG attrFile;
1592 } FILESTATUS3;
1593 typedef FILESTATUS3 *PFILESTATUS3;
1594
1595 typedef struct _FILESTATUS4
1596 {
1597 FDATE fdateCreation;
1598 FTIME ftimeCreation;
1599 FDATE fdateLastAccess;
1600 FTIME ftimeLastAccess;
1601 FDATE fdateLastWrite;
1602 FTIME ftimeLastWrite;
1603 ULONG cbFile;
1604 ULONG cbFileAlloc;
1605 ULONG attrFile;
1606 ULONG cbList;
1607 } FILESTATUS4;
1608 typedef FILESTATUS4 *PFILESTATUS4;
1609
1610 typedef struct _FSALLOCATE
1611 {
1612 ULONG idFileSystem;
1613 ULONG cSectorUnit;
1614 ULONG cUnit;
1615 ULONG cUnitAvail;
1616 USHORT cbSector;
1617 } FSALLOCATE;
1618 typedef FSALLOCATE *PFSALLOCATE;
1619
1620 typedef struct _FSQBUFFER
1621 {
1622 USHORT iType;
1623 USHORT cbName;
1624 UCHAR szName[1];
1625 USHORT cbFSDName;
1626 UCHAR szFSDName[1];
1627 USHORT cbFSAData;
1628 UCHAR rgFSAData[1];
1629 } FSQBUFFER;
1630 typedef FSQBUFFER *PFSQBUFFER;
1631
1632 typedef struct _FSQBUFFER2
1633 {
1634 USHORT iType;
1635 USHORT cbName;
1636 USHORT cbFSDName;
1637 USHORT cbFSAData;
1638 UCHAR szName[1];
1639 UCHAR szFSDName[1];
1640 UCHAR rgFSAData[1];
1641 } FSQBUFFER2;
1642 typedef FSQBUFFER2 *PFSQBUFFER2;
1643
1644 typedef struct _SPOOLATTACH
1645 {
1646 USHORT hNmPipe;
1647 ULONG ulKey;
1648 } SPOOLATTACH;
1649 typedef SPOOLATTACH *PSPOOLATTACH;
1650
1651 typedef struct _VOLUMELABEL
1652 {
1653 BYTE cch;
1654 CHAR szVolLabel[12];
1655 } VOLUMELABEL;
1656 typedef VOLUMELABEL *PVOLUMELABEL;
1657
1658 typedef struct _FSINFO
1659 {
1660 FDATE fdateCreation;
1661 FTIME ftimeCreation;
1662 VOLUMELABEL vol;
1663 } FSINFO;
1664 typedef FSINFO *PFSINFO;
1665
1666
1667 ULONG DosCancelLockRequest (HFILE hFile, __const__ FILELOCK *pfl);
1668 ULONG DosClose (HFILE hFile);
1669 ULONG DosCopy (PCSZ pszSource, PCSZ pszTarget, ULONG ulOption);
1670 ULONG DosCreateDir (PCSZ pszDirName, PEAOP2 pEABuf);
1671 ULONG DosDelete (PCSZ pszFileName);
1672 ULONG DosDeleteDir (PCSZ pszDirName);
1673 ULONG DosDupHandle (HFILE hFile, PHFILE phFile);
1674 ULONG DosEditName (ULONG ulLevel, PCSZ pszSource, PCSZ pszEdit,
1675 PBYTE pszTargetBuf, ULONG ulTargetBufLength);
1676 ULONG DosEnumAttribute (ULONG ulRefType, CPVOID pvFile, ULONG ulEntry,
1677 PVOID pvBuf, ULONG ulBufLength, PULONG pulCount, ULONG ulInfoLevel);
1678 ULONG DosFindClose (HDIR hDir);
1679 ULONG DosFindFirst (PCSZ pszFileSpec, PHDIR phDir, ULONG flAttribute,
1680 PVOID pFindBuf, ULONG ulFindBufLength, PULONG pulFileNames,
1681 ULONG ulInfoLevel);
1682 ULONG DosFindNext (HDIR hDir, PVOID pFindBuf, ULONG ulFindBufLength,
1683 PULONG pulFileNames);
1684 ULONG DosForceDelete (PCSZ pszFileName);
1685 ULONG DosFSAttach (PCSZ pszDevice, PCSZ pszFilesystem,
1686 __const__ VOID *pData, ULONG ulDataLength, ULONG ulFlag);
1687 ULONG DosFSCtl (PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength,
1688 PVOID pParmList, ULONG ulParmLengthMax, PULONG pulParmLength,
1689 ULONG ulFunction, PCSZ pszRouteName, HFILE hFile, ULONG ulMethod);
1690 ULONG DosMove (PCSZ pszOldName, PCSZ pszNewName);
1691 ULONG DosOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
1692 ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
1693 PEAOP2 pEABuf);
1694 ULONG DosProtectClose (HFILE hFile, FHLOCK fhFileHandleLockID);
1695 ULONG DosProtectEnumAttribute (ULONG ulRefType, CPVOID pvFile,
1696 ULONG ulEntry, PVOID pvBuf, ULONG ulBufLength, PULONG pulCount,
1697 ULONG ulInfoLevel, FHLOCK fhFileHandleLockID);
1698 ULONG DosProtectOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
1699 ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
1700 PEAOP2 pEABuf, PFHLOCK pfhFileHandleLockID);
1701 ULONG DosProtectQueryFHState (HFILE hFile, PULONG pulMode,
1702 FHLOCK fhFileHandleLockID);
1703 ULONG DosProtectQueryFileInfo (HFILE hFile, ULONG ulInfoLevel,
1704 PVOID pInfoBuffer, ULONG ulInfoLength, FHLOCK fhFileHandleLockID);
1705 ULONG DosProtectRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
1706 PULONG pulBytesRead, FHLOCK fhFileHandleLockID);
1707 ULONG DosProtectSetFHState (HFILE hFile, ULONG ulMode,
1708 FHLOCK fhFileHandleLockID);
1709 ULONG DosProtectSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
1710 ULONG ulInfoLength, FHLOCK fhFileHandleLockID);
1711 ULONG DosProtectSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
1712 __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags,
1713 FHLOCK fhFileHandleLockID);
1714 ULONG DosProtectSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin,
1715 PULONG pulPos, FHLOCK fhFileHandleLockID);
1716 ULONG DosProtectSetFileSize (HFILE hFile, ULONG ulSize,
1717 FHLOCK fhFileHandleLockID);
1718 ULONG DosProtectWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
1719 PULONG pulBytesWritten, FHLOCK fhFileHandleLockID);
1720 ULONG DosQueryCurrentDir (ULONG ulDrive, PBYTE pPath, PULONG pulPathLength);
1721 ULONG DosQueryCurrentDisk (PULONG pulDrive, PULONG pulLogical);
1722 ULONG DosQueryFHState (HFILE hFile, PULONG pulMode);
1723 ULONG DosQueryFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
1724 ULONG ulInfoLength);
1725 ULONG DosQueryFSAttach (PCSZ pszDeviceName, ULONG ulOrdinal,
1726 ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb, PULONG pulBufLength);
1727 ULONG DosQueryFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
1728 ULONG ulBufLength);
1729 ULONG DosQueryHType (HFILE hFile, PULONG pulType, PULONG pulAttr);
1730 ULONG DosQueryPathInfo (PCSZ pszPathName, ULONG ulInfoLevel,
1731 PVOID pInfoBuffer, ULONG ulInfoLength);
1732 ULONG DosQueryVerify (PBOOL32 pVerify);
1733 ULONG DosRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
1734 PULONG pulBytesRead);
1735 ULONG DosResetBuffer (HFILE hf);
1736 ULONG DosSetCurrentDir (PCSZ pszDir);
1737 ULONG DosSetDefaultDisk (ULONG ulDrive);
1738 ULONG DosSetFHState (HFILE hFile, ULONG ulMode);
1739 ULONG DosSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
1740 ULONG ulInfoLength);
1741 ULONG DosSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
1742 __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags);
1743 ULONG DosSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin, PULONG pulPos);
1744 ULONG DosSetFileSize (HFILE hFile, ULONG ulSize);
1745 ULONG DosSetFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
1746 ULONG ulBufLength);
1747 ULONG DosSetMaxFH (ULONG ulCount);
1748 ULONG DosSetPathInfo (PCSZ pszPathName, ULONG ulInfoLevel, PVOID pInfoBuffer,
1749 ULONG ulInfoLength, ULONG ulOptions);
1750 ULONG DosSetRelMaxFH (PLONG pulReqCount, PULONG pulCurMaxFH);
1751 ULONG DosSetVerify (BOOL32 f32Verify);
1752 ULONG DosShutdown (ULONG ulReserved);
1753 ULONG DosWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
1754 PULONG pulBytesWritten);
1755
1756 #endif /* INCL_DOSFILEMGR || !INCL_NOCOMMON */
1757
1758
1759 #if defined (INCL_DOSMISC)
1760 ULONG DosSearchPath (ULONG ulControl, PCSZ pszPath, PCSZ pszFilename,
1761 PBYTE pBuf, ULONG ulBufLength);
1762 #endif /* INCL_DOSMISC */
1763
1764 /* ---------------------------- DEVICE I/O -------------------------------- */
1765
1766 #if defined (INCL_DOSDEVICES)
1767
1768 #define DEVINFO_PRINTER 0
1769 #define DEVINFO_RS232 1
1770 #define DEVINFO_FLOPPY 2
1771 #define DEVINFO_COPROCESSOR 3
1772 #define DEVINFO_SUBMODEL 4
1773 #define DEVINFO_MODEL 5
1774 #define DEVINFO_ADAPTER 6
1775
1776 #define INFO_COUNT_PARTITIONABLE_DISKS 1
1777 #define INFO_GETIOCTLHANDLE 2
1778 #define INFO_FREEIOCTLHANDLE 3
1779
1780 ULONG DosDevConfig (PVOID pInfo, ULONG ulItem);
1781 ULONG DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction,
1782 PVOID pParams, ULONG ulParamsLengthMax, PULONG pulParamsLength,
1783 PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength);
1784 ULONG DosPhysicalDisk (ULONG ulFunction, PVOID pBuffer, ULONG ulBufferLength,
1785 PVOID pParams, ULONG ulParamsLength);
1786
1787 #endif /* INCL_DOSDEVICES */
1788
1789 #if defined (INCL_DOSDEVIOCTL)
1790
1791 #define IOCTL_ASYNC 0x0001
1792 #define IOCTL_SCR_AND_PTRDRAW 0x0003
1793 #define IOCTL_KEYBOARD 0x0004
1794 #define IOCTL_PRINTER 0x0005
1795 #define IOCTL_LIGHTPEN 0x0006
1796 #define IOCTL_POINTINGDEVICE 0x0007
1797 #define IOCTL_DISK 0x0008
1798 #define IOCTL_PHYSICALDISK 0x0009
1799 #define IOCTL_MONITOR 0x000a
1800 #define IOCTL_GENERAL 0x000b
1801 #define IOCTL_POWER 0x000c
1802 #define IOCTL_OEMHLP 0x0080
1803 #define IOCTL_TESTCFG_SYS 0x0080
1804 #define IOCTL_CDROMDISK 0x0080
1805 #define IOCTL_CDROMAUDIO 0x0081
1806 #define IOCTL_TOUCH_DEVDEP 0x0081
1807 #define IOCTL_TOUCH_DEVINDEP 0x0081
1808
1809 #define ASYNC_SETBAUDRATE 0x0041
1810 #define ASYNC_SETLINECTRL 0x0042
1811 #define ASYNC_EXTSETBAUDRATE 0x0043
1812 #define ASYNC_TRANSMITIMM 0x0044
1813 #define ASYNC_SETBREAKOFF 0x0045
1814 #define ASYNC_SETMODEMCTRL 0x0046
1815 #define ASYNC_STOPTRANSMIT 0x0047
1816 #define ASYNC_STARTTRANSMIT 0x0048
1817 #define ASYNC_SETBREAKON 0x004b
1818 #define ASYNC_SETDCBINFO 0x0053
1819 #define ASYNC_SETENHANCEDMODEPARMS 0x0054
1820 #define ASYNC_GETBAUDRATE 0x0061
1821 #define ASYNC_GETLINECTRL 0x0062
1822 #define ASYNC_EXTGETBAUDRATE 0x0063
1823 #define ASYNC_GETCOMMSTATUS 0x0064
1824 #define ASYNC_GETLINESTATUS 0x0065
1825 #define ASYNC_GETMODEMOUTPUT 0x0066
1826 #define ASYNC_GETMODEMINPUT 0x0067
1827 #define ASYNC_GETINQUECOUNT 0x0068
1828 #define ASYNC_GETOUTQUECOUNT 0x0069
1829 #define ASYNC_GETCOMMERROR 0x006d
1830 #define ASYNC_GETCOMMEVENT 0x0072
1831 #define ASYNC_GETDCBINFO 0x0073
1832 #define ASYNC_GETENHANCEDMODEPARMS 0x0074
1833
1834 #define SCR_ALLOCLDT 0x0070
1835 #define SCR_DEALLOCLDT 0x0071
1836 #define PTR_GETPTRDRAWADDRESS 0x0072
1837 #define VID_INITCALLVECTOR 0x0073
1838 #define SCR_ABIOSPASSTHRU 0x0074
1839 #define SCR_ALLOCLDTOFF 0x0075
1840 #define SCR_ALLOCLDTBGVAL 0x0076
1841 #define SCR_ALLOCVIDEOBUFFER 0x007e
1842 #define SCR_GETROMFONTADDR 0x007f
1843
1844 #define KBD_SETTRANSTABLE 0x0050
1845 #define KBD_SETINPUTMODE 0x0051
1846 #define KBD_SETINTERIMFLAG 0x0052
1847 #define KBD_SETSHIFTSTATE 0x0053
1848 #define KBD_SETTYPAMATICRATE 0x0054
1849 #define KBD_SETFGNDSCREENGRP 0x0055
1850 #define KBD_SETSESMGRHOTKEY 0x0056
1851 #define KBD_SETFOCUS 0x0057
1852 #define KBD_SETKCB 0x0058
1853 #define KBD_SETREADNOTIFICATION 0x0059
1854 #define KBD_ALTERKBDLED 0x005a
1855 #define KBD_SETNLS 0x005c
1856 #define KBD_CREATE 0x005d
1857 #define KBD_DESTROY 0x005e
1858 #define KBD_GETINPUTMODE 0x0071
1859 #define KBD_GETINTERIMFLAG 0x0072
1860 #define KBD_GETSHIFTSTATE 0x0073
1861 #define KBD_READCHAR 0x0074
1862 #define KBD_PEEKCHAR 0x0075
1863 #define KBD_GETSESMGRHOTKEY 0x0076
1864 #define KBD_GETKEYBDTYPE 0x0077
1865 #define KBD_GETCODEPAGEID 0x0078
1866 #define KBD_XLATESCAN 0x0079
1867 #define KBD_QUERYKBDHARDWAREID 0x007a
1868 #define KBD_QUERYKBDCODEPAGESUPPORT 0x007b
1869
1870 #define PRT_QUERYJOBHANDLE 0x0021
1871 #define PRT_SETFRAMECTL 0x0042
1872 #define PRT_SETINFINITERETRY 0x0044
1873 #define PRT_INITPRINTER 0x0046
1874 #define PRT_ACTIVATEFONT 0x0048
1875 #define PRT_SETPRINTJOBTITLE 0x004d
1876 #define PRT_SETIRQTIMEOUT 0x004e
1877 #define PRT_GETFRAMECTL 0x0062
1878 #define PRT_GETINFINITERETRY 0x0064
1879 #define PRT_GETPRINTERSTATUS 0x0066
1880 #define PRT_QUERYACTIVEFONT 0x0069
1881 #define PRT_VERIFYFONT 0x006a
1882 #define PRT_QUERYIRQTIMEOUT 0x006e
1883
1884 #define MOU_ALLOWPTRDRAW 0x0050
1885 #define MOU_UPDATEDISPLAYMODE 0x0051
1886 #define MOU_SCREENSWITCH 0x0052
1887 #define MOU_SETSCALEFACTORS 0x0053
1888 #define MOU_SETEVENTMASK 0x0054
1889 #define MOU_SETHOTKEYBUTTON 0x0055
1890 #define MOU_REASSIGNTHRESHOLDVALUES 0x0055 /* ? */
1891 #define MOU_SETPTRSHAPE 0x0056
1892 #define MOU_DRAWPTR 0x0057
1893 #define MOU_UNMARKCOLLISIONAREA 0x0057 /* ? */
1894 #define MOU_REMOVEPTR 0x0058
1895 #define MOU_MARKCOLLISIONAREA 0x0058 /* ? */
1896 #define MOU_SETPTRPOS 0x0059
1897 #define MOU_SETPROTDRAWADDRESS 0x005a
1898 #define MOU_SETREALDRAWADDRESS 0x005b
1899 #define MOU_SETMOUSTATUS 0x005c
1900 #define MOU_DISPLAYMODECHANGE 0x005d
1901 #define MOU_GETBUTTONCOUNT 0x0060
1902 #define MOU_GETMICKEYCOUNT 0x0061
1903 #define MOU_GETMOUSTATUS 0x0062
1904 #define MOU_READEVENTQUE 0x0063
1905 #define MOU_GETQUESTATUS 0x0064
1906 #define MOU_GETEVENTMASK 0x0065
1907 #define MOU_GETSCALEFACTORS 0x0066
1908 #define MOU_GETPTRPOS 0x0067
1909 #define MOU_GETPTRSHAPE 0x0068
1910 #define MOU_GETHOTKEYBUTTON 0x0069
1911 #define MOU_QUERYTHRESHOLDVALUES 0x0069 /* ? */
1912 #define MOU_VER 0x006a
1913 #define MOU_QUERYPOINTERID 0x006b /* ? */
1914
1915 #define DSK_LOCKDRIVE 0x0000
1916 #define DSK_UNLOCKDRIVE 0x0001
1917 #define DSK_REDETERMINEMEDIA 0x0002
1918 #define DSK_SETLOGICALMAP 0x0003
1919 #define DSK_BEGINFORMAT 0x0004
1920 #define DSK_BLOCKREMOVABLE 0x0020
1921 #define DSK_GETLOGICALMAP 0x0021
1922 #define DSK_UNLOCKEJECTMEDIA 0x0040
1923 #define DSK_SETDEVICEPARAMS 0x0043
1924 #define DSK_WRITETRACK 0x0044
1925 #define DSK_FORMATVERIFY 0x0045
1926 #define DSK_DISKETTECONTROL 0x005d
1927 #define DSK_QUERYMEDIASENSE 0x0060
1928 #define DSK_GETDEVICEPARAMS 0x0063
1929 #define DSK_READTRACK 0x0064
1930 #define DSK_VERIFYTRACK 0x0065
1931 #define DSK_GETLOCKSTATUS 0x0066
1932
1933 #define PDSK_LOCKPHYSDRIVE 0x0000
1934 #define PDSK_UNLOCKPHYSDRIVE 0x0001
1935 #define PDSK_WRITEPHYSTRACK 0x0044
1936 #define PDSK_GETPHYSDEVICEPARAMS 0x0063
1937 #define PDSK_READPHYSTRACK 0x0064
1938 #define PDSK_VERIFYPHYSTRACK 0x0065
1939
1940 #define POWER_SENDPOWEREVENT 0x0040
1941 #define POWER_SETPOWEREVENTRES 0x0041
1942 #define POWER_GETPOWERSTATUS 0x0060
1943 #define POWER_GETPOWEREVENT 0x0061
1944 #define POWER_GETPOWERINFO 0x0062
1945
1946 #define OEMHLP_GETOEMADAPTIONINFO 0x0000
1947 #define OEMHLP_GETMACHINEINFO 0x0001
1948 #define OEMHLP_GETDISPLAYCOMBCODE 0x0002
1949 #define OEMHLP_GETVIDEOFONTS 0x0003
1950 #define OEMHLP_READEISACONFIGINFO 0x0004
1951 #define OEMHLP_GETROMBIOSINFO 0x0005
1952 #define OEMHLP_GETMISCVIDEOINFO 0x0006
1953 #define OEMHLP_GETVIDEOADAPTER 0x0007
1954 #define OEMHLP_GETSVGAINFO 0x0008
1955 #define OEMHLP_GETMEMINFO 0x0009
1956 #define OEMHLP_GETDMQSINFO 0x000a
1957 #define OEMHLP_PCI 0x000b
1958
1959 #define TESTCFG_SYS_GETBIOSADAPTER 0x0040
1960 #define TESTCFG_SYS_ISSUEINIOINSTR 0x0041
1961 #define TESTCFG_SYS_ISSUEOUTIOINSTR 0x0042
1962 #define TESTCFG_SYS_GETBUSARCH 0x0060
1963 #define TESTCFG_SYS_GETALLPOSIDS 0x0061
1964 #define TESTCFG_SYS_GETALLEISAIDS 0x0062
1965
1966 #define CDROMDISK_RESETDRIVE 0x0040
1967 #define CDROMDISK_EJECTDISK 0x0044
1968 #define CDROMDISK_LOCKUNLOCKDOOR 0x0046
1969 #define CDROMDISK_SEEK 0x0050
1970 #define CDROMDISK_DEVICESTATUS 0x0060
1971 #define CDROMDISK_GETDRIVER 0x0061
1972 #define CDROMDISK_GETSECTORSIZE 0x0063
1973 #define CDROMDISK_GETHEADLOC 0x0070
1974 #define CDROMDISK_READLONG 0x0072
1975 #define CDROMDISK_GETVOLUMESIZE 0x0078
1976 #define CDROMDISK_GETUPC 0x0079
1977
1978 #define CDROMAUDIO_SETCHANNELCTRL 0x0040
1979 #define CDROMAUDIO_PLAYAUDIO 0x0050
1980 #define CDROMAUDIO_STOPAUDIO 0x0051
1981 #define CDROMAUDIO_RESUMEAUDIO 0x0052
1982 #define CDROMAUDIO_GETCHANNEL 0x0060
1983 #define CDROMAUDIO_GETAUDIODISK 0x0061
1984 #define CDROMAUDIO_GETAUDIOTRACK 0x0062
1985 #define CDROMAUDIO_GETSUBCHANNELQ 0x0063
1986 #define CDROMAUDIO_GETAUDIOSTATUS 0x0065
1987
1988 #define TOUCH_DEVDEP_SETCALIBCONST 0x0052
1989 #define TOUCH_DEVDEP_READDATA 0x0053
1990 #define TOUCH_DEVDEP_SETDATAMODE 0x0054
1991 #define TOUCH_DEVDEP_SETCLICKLOCK 0x0055
1992 #define TOUCH_DEVDEP_SETTOUCHTHRESHOLD 0x0056
1993 #define TOUCH_DEVDEP_SETEMULXY 0x0057
1994 #define TOUCH_DEVDEP_SETDATAREPORTRATE 0x0058
1995 #define TOUCH_DEVDEP_SETLOWPASSFILTER 0x0059
1996 #define TOUCH_DEVDEP_WRITEMEMLOC 0x005a
1997 #define TOUCH_DEVDEP_GETCALIBCONST 0x0060
1998 #define TOUCH_DEVDEP_GETDATAMODE 0x0061
1999 #define TOUCH_DEVDEP_GETCLICKLOCK 0x0062
2000 #define TOUCH_DEVDEP_GETTOUCHTHRESHOLD 0x0063
2001 #define TOUCH_DEVDEP_GETEMULXY 0x0064
2002 #define TOUCH_DEVDEP_GETDATAREPORTRATE 0x0065
2003 #define TOUCH_DEVDEP_GETLOWPASSFILTER 0x0066
2004 #define TOUCH_DEVDEP_READMEMLOC 0x0067
2005
2006 #define TOUCH_DEVINDEP_SETCOORDSYS 0x0050
2007 #define TOUCH_DEVINDEP_SETSELECTMECH 0x0052
2008 #define TOUCH_DEVINDEP_SETEVENTMASK 0x0053
2009 #define TOUCH_DEVINDEP_SETQUEUESIZE 0x0054
2010 #define TOUCH_DEVINDEP_SETEMULSTATE 0x0055
2011 #define TOUCH_DEVINDEP_GETCOORDSYS 0x0060
2012 #define TOUCH_DEVINDEP_GETSELECTMECH 0x0062
2013 #define TOUCH_DEVINDEP_GETEVENTMASK 0x0063
2014 #define TOUCH_DEVINDEP_GETQUEUESIZE 0x0064
2015 #define TOUCH_DEVINDEP_GETEMULSTATE 0x0065
2016 #define TOUCH_DEVINDEP_GETREADEVENTQUEUE 0x0066
2017
2018 #define MON_REGISTERMONITOR 0x0040
2019
2020 #define DEV_FLUSHINPUT 0x0001
2021 #define DEV_FLUSHOUTPUT 0x0002
2022 #define DEV_SYSTEMNOTIFYPDD 0x0041
2023 #define DEV_QUERYMONSUPPORT 0x0060
2024
2025 #define RX_QUE_OVERRUN 0x0001
2026 #define RX_HARDWARE_OVERRUN 0x0002
2027 #define PARITY_ERROR 0x0004
2028 #define FRAMING_ERROR 0x0008
2029
2030 #define CHAR_RECEIVED 0x0001
2031 #define LAST_CHAR_SENT 0x0004
2032 #define CTS_CHANGED 0x0008
2033 #define DSR_CHANGED 0x0010
2034 #define DCD_CHANGED 0x0020
2035 #define BREAK_DETECTED 0x0040
2036 #define ERROR_OCCURRED 0x0080
2037 #define RI_DETECTED 0x0100
2038
2039 #define TX_WAITING_FOR_CTS 0x0001
2040 #define TX_WAITING_FOR_DSR 0x0002
2041 #define TX_WAITING_FOR_DCD 0x0004
2042 #define TX_WAITING_FOR_XON 0x0008
2043 #define TX_WAITING_TO_SEND_XON 0x0010
2044 #define TX_WAITING_WHILE_BREAK_ON 0x0020
2045 #define TX_WAITING_TO_SEND_IMM 0x0040
2046 #define RX_WAITING_FOR_DSR 0x0080
2047
2048 #define WRITE_REQUEST_QUEUED 0x0001
2049 #define DATA_IN_TX_QUE 0x0002
2050 #define HARDWARE_TRANSMITTING 0x0004
2051 #define CHAR_READY_TO_SEND_IMM 0x0008
2052 #define WAITING_TO_SEND_XON 0x0010
2053 #define WAITING_TO_SEND_XOFF 0x0020
2054
2055 #define CTS_ON 0x10
2056 #define DSR_ON 0x20
2057 #define RI_ON 0x40
2058 #define DCD_ON 0x80
2059
2060 #define MODE_DTR_CONTROL 0x01
2061 #define MODE_DTR_HANDSHAKE 0x02
2062 #define MODE_CTS_HANDSHAKE 0x08
2063 #define MODE_DSR_HANDSHAKE 0x10
2064 #define MODE_DCD_HANDSHAKE 0x20
2065 #define MODE_DSR_SENSITIVITY 0x40
2066
2067 #define MODE_AUTO_TRANSMIT 0x01
2068 #define MODE_AUTO_RECEIVE 0x02
2069 #define MODE_ERROR_CHAR 0x04
2070 #define MODE_NULL_STRIPPING 0x08
2071 #define MODE_BREAK_CHAR 0x10
2072 #define MODE_RTS_CONTROL 0x40
2073 #define MODE_RTS_HANDSHAKE 0x80
2074 #define MODE_TRANSMIT_TOGGLE 0xc0
2075
2076 #define MODE_NO_WRITE_TIMEOUT 0x01
2077 #define MODE_READ_TIMEOUT 0x02
2078 #define MODE_WAIT_READ_TIMEOUT 0x04
2079 #define MODE_NOWAIT_READ_TIMEOUT 0x06
2080
2081 #define DTR_ON 0x01
2082 #define RTS_ON 0x02
2083
2084 #define DTR_OFF 0xfe
2085 #define RTS_OFF 0xfd
2086
2087 #define ASCII_MODE 0x00
2088 #define BINARY_MODE 0x80
2089
2090 #define CONVERSION_REQUEST 0x20
2091 #define INTERIM_CHAR 0x80
2092
2093 #define HOTKEY_MAX_COUNT 0x0000
2094 #define HOTKEY_CURRENT_COUNT 0x0001
2095
2096 #define KBD_DATA_RECEIVED 0x0001
2097 #define KBD_DATA_BINARY 0x8000
2098
2099 #define KBD_READ_WAIT 0x0000
2100 #define KBD_READ_NOWAIT 0x8000
2101
2102 #define SHIFT_REPORT_MODE 0x01
2103
2104 #define RIGHTSHIFT 0x0001
2105 #define LEFTSHIFT 0x0002
2106 #define CONTROL 0x0004
2107 #define ALT 0x0008
2108 #define SCROLLLOCK_ON 0x0010
2109 #define NUMLOCK_ON 0x0020
2110 #define CAPSLOCK_ON 0x0040
2111 #define INSERT_ON 0x0080
2112 #define LEFTCONTROL 0x0100
2113 #define LEFTALT 0x0200
2114 #define RIGHTCONTROL 0x0400
2115 #define RIGHTALT 0x0800
2116 #define SCROLLLOCK 0x1000
2117 #define NUMLOCK 0x2000
2118 #define CAPSLOCK 0x4000
2119 #define SYSREQ 0x8000
2120
2121 #define PRINTER_TIMEOUT 0x0001
2122 #define PRINTER_IO_ERROR 0x0008
2123 #define PRINTER_SELECTED 0x0010
2124 #define PRINTER_OUT_OF_PAPER 0x0020
2125 #define PRINTER_ACKNOWLEDGED 0x0040
2126 #define PRINTER_NOT_BUSY 0x0080
2127
2128 #define MOUSE_MOTION 0x0001
2129 #define MOUSE_MOTION_WITH_BN1_DOWN 0x0002
2130 #define MOUSE_BN1_DOWN 0x0004
2131 #define MOUSE_MOTION_WITH_BN2_DOWN 0x0008
2132 #define MOUSE_BN2_DOWN 0x0010
2133 #define MOUSE_MOTION_WITH_BN3_DOWN 0x0020
2134 #define MOUSE_BN3_DOWN 0x0040
2135
2136 #define MHK_BUTTON1 0x0001
2137 #define MHK_BUTTON2 0x0002
2138 #define MHK_BUTTON3 0x0004
2139
2140 #define MOU_NOWAIT 0x0000
2141 #define MOU_WAIT 0x0001
2142
2143 #define MHK_NO_HOTKEY 0x0000
2144
2145 #define MOUSE_QUEUEBUSY 0x0001
2146 #define MOUSE_BLOCKREAD 0x0002
2147 #define MOUSE_FLUSH 0x0004
2148 #define MOUSE_UNSUPPORTED_MODE 0x0008
2149 #define MOUSE_DISABLED 0x0100
2150 #define MOUSE_MICKEYS 0x0200
2151
2152 #define BUILD_BPB_FROM_MEDIUM 0x00
2153 #define REPLACE_BPB_FOR_DEVICE 0x01
2154 #define REPLACE_BPB_FOR_MEDIUM 0x02
2155
2156 #define DEVTYPE_48TPI 0x0000
2157 #define DEVTYPE_96TPI 0x0001
2158 #define DEVTYPE_35 0x0002
2159 #define DEVTYPE_8SD 0x0003
2160 #define DEVTYPE_8DD 0x0004
2161 #define DEVTYPE_FIXED 0x0005
2162 #define DEVTYPE_TAPE 0x0006
2163 #define DEVTYPE_UNKNOWN 0x0007
2164
2165 #define SCREENDD_GETCURRENTBANK 0x00
2166 #define SCREENDD_SETCURRENTBANK 0x01
2167 #define SCREENDD_SVGA_ID 0x08
2168 #define SCREENDD_SVGA_OEM 0x09
2169 #define SCREENDD_UPDATEMEMORY 0x0a
2170 #define SCREENDD_GETLINEARACCESS 0x0b
2171 #define SCREENDD_GETGLOBALACCESS 0x0c
2172 #define SCREENDD_FREEGLOBALACCESS 0x0d
2173 #define SCREENDD_REGISTER_RING0_CALLER 0x0e
2174 #define SCREENDD_WAIT_ON_RING0_CALLER 0x0f
2175 #define SCREENDD_CATEGORY 0x80
2176 #define SCREENDD_NAME "SCREEN$"
2177
2178 #define GETLINEAR_FLAG_MAPPHYSICAL 0x00000010
2179 #define GETLINEAR_FLAG_MAPPROCESS 0x00000020
2180 #define GETLINEAR_FLAG_MAPSHARED 0x00000400
2181 #define GETLINEAR_FLAG_MAPATTACH 0x80000000
2182
2183 #define EGA_BIT 4
2184 #define VGA_BIT 8
2185 #define EGAVGA_BIT (EGA_BIT|VGA_BIT)
2186
2187 #define READ_BANK 0
2188 #define WRITE_BANK 1
2189 #define MODE_TEXT 0
2190 #define MODE_PLANAR 1
2191 #define MODE_LINEAR 2
2192
2193 typedef struct _DCBINFO
2194 {
2195 USHORT usWriteTimeout;
2196 USHORT usReadTimeout;
2197 BYTE fbCtlHndShake;
2198 BYTE fbFlowReplace;
2199 BYTE fbTimeout;
2200 BYTE bErrorReplacementChar;
2201 BYTE bBreakReplacementChar;
2202 BYTE bXONChar;
2203 BYTE bXOFFChar;
2204 } DCBINFO;
2205 typedef DCBINFO *PDCBINFO;
2206
2207 typedef struct _LINECONTROL
2208 {
2209 BYTE bDataBits;
2210 BYTE bParity;
2211 BYTE bStopBits;
2212 BYTE fTransBreak;
2213 } LINECONTROL;
2214 typedef LINECONTROL *PLINECONTROL;
2215
2216 typedef struct _MODEMSTATUS
2217 {
2218 BYTE fbModemOn;
2219 BYTE fbModemOff;
2220 } MODEMSTATUS;
2221 typedef MODEMSTATUS *PMODEMSTATUS;
2222
2223 typedef struct _KBDTYPE
2224 {
2225 USHORT usType;
2226 USHORT reserved1;
2227 USHORT reserved2;
2228 } KBDTYPE;
2229 typedef KBDTYPE *PKBDTYPE;
2230
2231 typedef struct _RATEDELAY
2232 {
2233 USHORT usDelay;
2234 USHORT usRate;
2235 } RATEDELAY;
2236 typedef RATEDELAY *PRATEDELAY;
2237
2238 typedef struct _CODEPAGEINFO
2239 {
2240 PBYTE pbTransTable;
2241 USHORT idCodePage;
2242 USHORT idTable;
2243 } CODEPAGEINFO;
2244 typedef CODEPAGEINFO *PCODEPAGEINFO;
2245
2246 typedef struct _CPID
2247 {
2248 USHORT idCodePage;
2249 USHORT Reserved;
2250 } CPID;
2251 typedef CPID *PCPID;
2252
2253 typedef struct _SHIFTSTATE
2254 {
2255 USHORT fsState;
2256 BYTE fNLS;
2257 } SHIFTSTATE;
2258 typedef SHIFTSTATE *PSHIFTSTATE;
2259
2260 typedef struct _HOTKEY
2261 {
2262 USHORT fsHotKey;
2263 UCHAR uchScancodeMake;
2264 UCHAR uchScancodeBreak;
2265 USHORT idHotKey;
2266 } HOTKEY;
2267 typedef HOTKEY *PHOTKEY;
2268
2269 typedef struct _PTRDRAWFUNCTION
2270 {
2271 USHORT usReturnCode;
2272 PFN pfnDraw;
2273 PCH pchDataSeg;
2274 } PTRDRAWFUNCTION;
2275 typedef PTRDRAWFUNCTION *PPTRDRAWFUNCTION;
2276
2277 typedef struct _PTRDRAWADDRESS
2278 {
2279 USHORT reserved;
2280 PTRDRAWFUNCTION ptrdfnc;
2281 } PTRDRAWADDRESS;
2282 typedef PTRDRAWADDRESS *PPTRDRAWADDRESS;
2283
2284 typedef struct _PTRDRAWDATA
2285 {
2286 USHORT cb;
2287 USHORT usConfig;
2288 USHORT usFlag;
2289 } PTRDRAWDATA;
2290 typedef PTRDRAWDATA *PPTRDRAWDATA;
2291
2292 typedef struct _TRACKLAYOUT
2293 {
2294 BYTE bCommand;
2295 USHORT usHead;
2296 USHORT usCylinder;
2297 USHORT usFirstSector;
2298 USHORT cSectors;
2299 struct
2300 {
2301 USHORT usSectorNumber;
2302 USHORT usSectorSize;
2303 } TrackTable[1];
2304 } TRACKLAYOUT;
2305 typedef TRACKLAYOUT *PTRACKLAYOUT;
2306
2307 typedef struct _TRACKFORMAT
2308 {
2309 BYTE bCommand;
2310 USHORT usHead;
2311 USHORT usCylinder;
2312 USHORT usReserved;
2313 USHORT cSectors;
2314 struct
2315 {
2316 BYTE bCylinder;
2317 BYTE bHead;
2318 BYTE idSector;
2319 BYTE bBytesSector;
2320 } FormatTable[1];
2321 } TRACKFORMAT;
2322 typedef TRACKFORMAT *PTRACKFORMAT;
2323
2324 typedef struct _BIOSPARAMETERBLOCK
2325 {
2326 USHORT usBytesPerSector;
2327 BYTE bSectorsPerCluster;
2328 USHORT usReservedSectors;
2329 BYTE cFATs;
2330 USHORT cRootEntries;
2331 USHORT cSectors;
2332 BYTE bMedia;
2333 USHORT usSectorsPerFAT;
2334 USHORT usSectorsPerTrack;
2335 USHORT cHeads;
2336 ULONG cHiddenSectors;
2337 ULONG cLargeSectors;
2338 BYTE abReserved[6];
2339 USHORT cCylinders;
2340 BYTE bDeviceType;
2341 USHORT fsDeviceAttr;
2342 } BIOSPARAMETERBLOCK;
2343 typedef BIOSPARAMETERBLOCK *PBIOSPARAMETERBLOCK;
2344
2345 typedef struct _DEVICEPARAMETERBLOCK
2346 {
2347 USHORT reserved1;
2348 USHORT cCylinders;
2349 USHORT cHeads;
2350 USHORT cSectorsPerTrack;
2351 USHORT reserved2;
2352 USHORT reserved3;
2353 USHORT reserved4;
2354 USHORT reserved5;
2355 } DEVICEPARAMETERBLOCK;
2356 typedef DEVICEPARAMETERBLOCK *PDEVICEPARAMETERBLOCK;
2357
2358 typedef struct _MONITORPOSITION
2359 {
2360 USHORT fPosition;
2361 USHORT index;
2362 ULONG pbInBuf;
2363 USHORT offOutBuf;
2364 } MONITORPOSITION;
2365 typedef MONITORPOSITION *PMONITORPOSITION;
2366
2367 typedef struct _FRAME
2368 {
2369 BYTE bCharsPerLine;
2370 BYTE bLinesPerInch;
2371 } FRAME;
2372 typedef FRAME *PFRAME;
2373
2374 typedef struct _LDTADDRINFO
2375 {
2376 PULONG pulPhysAddr;
2377 USHORT cb;
2378 } LDTADDRINFO;
2379 typedef LDTADDRINFO *PLDTADDRINFO;
2380
2381 typedef struct _SCREENGROUP
2382 {
2383 USHORT idScreenGrp;
2384 USHORT fTerminate;
2385 } SCREENGROUP;
2386 typedef SCREENGROUP *PSCREENGROUP;
2387
2388 typedef struct _RXQUEUE
2389 {
2390 USHORT cch;
2391 USHORT cb;
2392 } RXQUEUE;
2393 typedef RXQUEUE *PRXQUEUE;
2394
2395 typedef struct _GETLINIOCTLDATA
2396 {
2397 ULONG PacketLength;
2398 ULONG PhysicalAddress;
2399 ULONG ApertureSize;
2400 PBYTE LinearAddress;
2401 ULONG LinearFlags;
2402 } GETLINIOCTLDATA;
2403 typedef GETLINIOCTLDATA *PGETLINIOCTLDATA;
2404
2405 typedef struct _BANKINFO
2406 {
2407 ULONG ulBankLength;
2408 USHORT usBank;
2409 USHORT usVideoModeType;
2410 USHORT usReadWriteMode;
2411 } BANKINFO;
2412
2413 typedef struct _GLOBALIOCTLDATA
2414 {
2415 ULONG ProcessAddress;
2416 ULONG AddressLength;
2417 ULONG GlobalAddress;
2418 } GLOBALIOCTLDATA;
2419
2420 typedef struct _OEMSVGAINFO
2421 {
2422 USHORT AdapterType;
2423 USHORT ChipType;
2424 ULONG Memory;
2425 } OEMSVGAINFO;
2426
2427 typedef struct _OEMINFO
2428 {
2429 ULONG OEMLength;
2430 USHORT Manufacturer;
2431 ULONG ManufacturerData;
2432 } OEMINFO;
2433
2434 typedef struct _GETGLOBALPACKET
2435 {
2436 ULONG GlobalPktLength;
2437 GLOBALIOCTLDATA GlobalPktData[1];
2438 } GETGLOBALPACKET;
2439
2440 #endif /* INCL_DOSDEVIOCTL */
2441
2442 /* -------------------- NATIONAL LANGUAGE SUPPORT ------------------------- */
2443
2444 #if defined (INCL_DOSNLS)
2445
2446 typedef struct _COUNTRYCODE
2447 {
2448 ULONG country;
2449 ULONG codepage;
2450 } COUNTRYCODE;
2451 typedef COUNTRYCODE *PCOUNTRYCODE;
2452
2453 typedef struct _COUNTRYINFO
2454 {
2455 ULONG country;
2456 ULONG codepage;
2457 ULONG fsDateFmt;
2458 CHAR szCurrency[5];
2459 CHAR szThousandsSeparator[2];
2460 CHAR szDecimal[2];
2461 CHAR szDateSeparator[2];
2462 CHAR szTimeSeparator[2];
2463 UCHAR fsCurrencyFmt;
2464 UCHAR cDecimalPlace;
2465 UCHAR fsTimeFmt;
2466 USHORT abReserved1[2];
2467 CHAR szDataSeparator[2];
2468 USHORT abReserved2[5];
2469 } COUNTRYINFO;
2470 typedef COUNTRYINFO *PCOUNTRYINFO;
2471
2472
2473 ULONG DosMapCase (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
2474 PCHAR pchString);
2475 ULONG DosQueryCollate (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
2476 PCHAR pchBuffer, PULONG pulDataLength);
2477 ULONG DosQueryCp (ULONG ulLength, PULONG pCodePageList, PULONG pDataLength);
2478 ULONG DosQueryCtryInfo (ULONG ulLength, PCOUNTRYCODE pCountryCode,
2479 PCOUNTRYINFO pCountryInfo, PULONG pulDataLength);
2480 ULONG DosQueryDBCSEnv (ULONG ulLength, PCOUNTRYCODE pCountryCode, PCHAR pBuf);
2481 ULONG DosSetProcessCp (ULONG ulCodePage);
2482
2483 #endif /* INCL_DOSNLS */
2484
2485 /* -------------------------- DYNAMIC LINKING ----------------------------- */
2486
2487 #if defined (INCL_DOSMODULEMGR)
2488
2489 #define PT_16BIT 0
2490 #define PT_32BIT 1
2491
2492
2493 ULONG DosFreeModule (HMODULE hmod);
2494 ULONG DosLoadModule (PSZ pszObject, ULONG uObjectLen, PCSZ pszModule,
2495 PHMODULE phmod);
2496 ULONG DosQueryModuleHandle (PCSZ pszModname, PHMODULE phmod);
2497 ULONG DosQueryModuleName (HMODULE hmod, ULONG ulNameLength, PCHAR pNameBuf);
2498 ULONG DosQueryProcAddr (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
2499 PPFN pProcAddr);
2500 ULONG DosQueryProcType (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
2501 PULONG pulProcType);
2502
2503 #endif /* INCL_DOSMODULEMGR */
2504
2505 /* ----------------------------- RESOURCES -------------------------------- */
2506
2507 #if defined (INCL_DOSRESOURCES) || !defined (INCL_NOCOMMON)
2508
2509 #define RT_POINTER 1
2510 #define RT_BITMAP 2
2511 #define RT_MENU 3
2512 #define RT_DIALOG 4
2513 #define RT_STRING 5
2514 #define RT_FONTDIR 6
2515 #define RT_FONT 7
2516 #define RT_ACCELTABLE 8
2517 #define RT_RCDATA 9
2518 #define RT_MESSAGE 10
2519 #define RT_DLGINCLUDE 11
2520 #define RT_VKEYTBL 12
2521 #define RT_KEYTBL 13
2522 #define RT_CHARTBL 14
2523 #define RT_DISPLAYINFO 15
2524 #define RT_FKASHORT 16
2525 #define RT_FKALONG 17
2526 #define RT_HELPTABLE 18
2527 #define RT_HELPSUBTABLE 19
2528 #define RT_FDDIR 20
2529 #define RT_FD 21
2530 #define RT_MAX 22
2531
2532 #define RF_ORDINALID 0x80000000L
2533
2534
2535 ULONG DosFreeResource (PVOID pResAddr);
2536 ULONG DosGetResource (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
2537 PPVOID pOffset);
2538 ULONG DosQueryResourceSize (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
2539 PULONG pulSize);
2540
2541 #endif /* INCL_DOSRESOURCES || !INCL_NOCOMMON */
2542
2543 /* -------------------------------- TASKS --------------------------------- */
2544
2545 #if defined (INCL_DOSPROCESS) || !defined (INCL_NOCOMMON)
2546
2547 #define EXIT_THREAD 0
2548 #define EXIT_PROCESS 1
2549
2550 ULONG DosBeep (ULONG ulFrequency, ULONG ulDuration);
2551 VOID DosExit (ULONG ulAction, ULONG ulResult) __attribute__ ((__noreturn__));
2552
2553 #endif /* INCL_DOSPROCESS || !defined (INCL_NOCOMMON) */
2554
2555
2556 #if defined (INCL_DOSPROCESS)
2557
2558 #define CREATE_READY 0
2559 #define CREATE_SUSPENDED 1
2560
2561 #define STACK_SPARSE 0
2562 #define STACK_COMMITTED 2
2563
2564 #define DCWA_PROCESS 0
2565 #define DCWA_PROCESSTREE 1
2566
2567 #define DCWW_WAIT 0
2568 #define DCWW_NOWAIT 1
2569
2570 #define DKP_PROCESSTREE 0
2571 #define DKP_PROCESS 1
2572
2573 #define EXEC_SYNC 0
2574 #define EXEC_ASYNC 1
2575 #define EXEC_ASYNCRESULT 2
2576 #define EXEC_TRACE 3
2577 #define EXEC_BACKGROUND 4
2578 #define EXEC_LOAD 5
2579 #define EXEC_ASYNCRESULTDB 6
2580
2581 #define EXLST_ADD 1
2582 #define EXLST_REMOVE 2
2583 #define EXLST_EXIT 3
2584
2585 #define PRTYC_NOCHANGE 0
2586 #define PRTYC_IDLETIME 1
2587 #define PRTYC_REGULAR 2
2588 #define PRTYC_TIMECRITICAL 3
2589 #define PRTYC_FOREGROUNDSERVER 4
2590
2591 #define PRTYD_MINIMUM (-31)
2592 #define PRTYD_MAXIMUM 31
2593
2594 #define PRTYS_PROCESS 0
2595 #define PRTYS_PROCESSTREE 1
2596 #define PRTYS_THREAD 2
2597
2598 #define TC_EXIT 0
2599 #define TC_HARDERROR 1
2600 #define TC_TRAP 2
2601 #define TC_KILLPROCESS 3
2602 #define TC_EXCEPTION 4
2603
2604
2605 typedef struct _RESULTCODES
2606 {
2607 ULONG codeTerminate;
2608 ULONG codeResult;
2609 } RESULTCODES;
2610 typedef RESULTCODES *PRESULTCODES;
2611
2612 typedef struct tib2_s
2613 {
2614 ULONG tib2_ultid;
2615 ULONG tib2_ulpri;
2616 ULONG tib2_version;
2617 USHORT tib2_usMCCount;
2618 USHORT tib2_fMCForceFlag;
2619 } TIB2;
2620 typedef TIB2 *PTIB2;
2621
2622 typedef struct tib_s
2623 {
2624 PVOID tib_pexchain;
2625 PVOID tib_pstack;
2626 PVOID tib_pstacklimit;
2627 PTIB2 tib_ptib2;
2628 ULONG tib_version;
2629 ULONG tib_ordinal;
2630 } TIB;
2631 typedef TIB *PTIB;
2632
2633 typedef struct pib_s
2634 {
2635 ULONG pib_ulpid;
2636 ULONG pib_ulppid;
2637 ULONG pib_hmte;
2638 PCHAR pib_pchcmd;
2639 PCHAR pib_pchenv;
2640 ULONG pib_flstatus;
2641 ULONG pib_ultype;
2642 } PIB;
2643 typedef PIB *PPIB;
2644
2645 typedef VOID (*PFNTHREAD)(ULONG ulThreadArg);
2646 typedef VOID (*PFNEXITLIST)(ULONG ulArg);
2647
2648
2649 ULONG DosAllocThreadLocalMemory (ULONG cb, PULONG *p);
2650 ULONG DosCreateThread (PTID ptidThreadID, PFNTHREAD pfnThreadAddr,
2651 ULONG ulThreadArg, ULONG ulFlags, ULONG ulStackSize);
2652 ULONG DosEnterCritSec (VOID);
2653 ULONG DosExecPgm (PCHAR pObjname, LONG lObjnameLength, ULONG ulFlagS,
2654 PCSZ pszArg, PCSZ pszEnv, PRESULTCODES pReturnCodes, PCSZ pszName);
2655 ULONG DosExitCritSec (VOID);
2656 ULONG DosExitList (ULONG ulOrder, PFNEXITLIST pfn);
2657 ULONG DosFreeThreadLocalMemory (ULONG *p);
2658 ULONG DosGetInfoBlocks (PTIB *ptib, PPIB *ppib);
2659 ULONG DosKillProcess (ULONG ulAction, PID pid);
2660 ULONG DosKillThread (TID tid);
2661 ULONG DosResumeThread (TID tid);
2662 ULONG DosSetPriority (ULONG ulScope, ULONG ulClass, LONG lDelta, ULONG ulID);
2663
2664 #define STDCALL __attribute__ ((stdcall))
2665 //#define CDECL __attribute__ ((cdecl))
2666 //#define CALLBACK WINAPI
2667 //#define PASCAL WINAPI
2668
2669 #define WINAPI STDCALL
2670 //#define APIENTRY STDCALL
2671
2672 //ULONG WINAPI DosSleep (ULONG ulInterval);
2673 ULONG DosSleep (ULONG ulInterval);
2674
2675 ULONG DosSuspendThread (TID tid);
2676 ULONG DosVerifyPidTid (PID pid, TID tid);
2677 ULONG DosWaitChild (ULONG ulAction, ULONG ulWait, PRESULTCODES pReturnCodes,
2678 PPID ppidOut, PID pidIn);
2679 ULONG DosWaitThread (PTID ptid, ULONG ulWait);
2680
2681 #endif /* INCL_DOSPROCESS */
2682
2683 /* ------------------------------ SESSIONS -------------------------------- */
2684
2685 #if defined (INCL_DOSSESMGR) || defined (INCL_DOSFILEMGR)
2686
2687 #define FAPPTYP_NOTSPEC 0x0000
2688 #define FAPPTYP_NOTWINDOWCOMPAT 0x0001
2689 #define FAPPTYP_WINDOWCOMPAT 0x0002
2690 #define FAPPTYP_WINDOWAPI 0x0003
2691 #define FAPPTYP_BOUND 0x0008
2692 #define FAPPTYP_DLL 0x0010
2693 #define FAPPTYP_DOS 0x0020
2694 #define FAPPTYP_PHYSDRV 0x0040
2695 #define FAPPTYP_VIRTDRV 0x0080
2696 #define FAPPTYP_PROTDLL 0x0100
2697 #define FAPPTYP_WINDOWSREAL 0x0200
2698 #define FAPPTYP_WINDOWSPROT 0x0400
2699 #define FAPPTYP_WINDOWSPROT31 0x1000
2700 #define FAPPTYP_32BIT 0x4000
2701 #define FAPPTYP_EXETYPE 0x0003
2702 #define FAPPTYP_RESERVED (~(FAPPTYP_WINDOWAPI | FAPPTYP_BOUND | \
2703 FAPPTYP_DLL | FAPPTYP_DOS | \
2704 FAPPTYP_PHYSDRV | FAPPTYP_VIRTDRV | \
2705 FAPPTYP_PROTDLL | FAPPTYP_32BIT))
2706
2707 #endif /* INCL_DOSSESMGR || INCL_DOSFILEMGR */
2708
2709 #if defined (INCL_DOSSESMGR)
2710
2711 #define SET_SESSION_UNCHANGED 0
2712 #define SET_SESSION_SELECTABLE 1
2713 #define SET_SESSION_NON_SELECTABLE 2
2714 #define SET_SESSION_BOND 1
2715 #define SET_SESSION_NO_BOND 2
2716
2717 #define SSF_RELATED_INDEPENDENT 0
2718 #define SSF_RELATED_CHILD 1
2719
2720 #define SSF_FGBG_FORE 0
2721 #define SSF_FGBG_BACK 1
2722
2723 #define SSF_TRACEOPT_NONE 0
2724 #define SSF_TRACEOPT_TRACE 1
2725 #define SSF_TRACEOPT_TRACEALL 2
2726
2727 #define SSF_INHERTOPT_SHELL 0
2728 #define SSF_INHERTOPT_PARENT 1
2729
2730 #define SSF_TYPE_DEFAULT 0
2731 #define SSF_TYPE_FULLSCREEN 1
2732 #define SSF_TYPE_WINDOWABLEVIO 2
2733 #define SSF_TYPE_PM 3
2734 #define SSF_TYPE_VDM 4
2735 #define SSF_TYPE_GROUP 5
2736 #define SSF_TYPE_DLL 6
2737 #define SSF_TYPE_WINDOWEDVDM 7
2738 #define SSF_TYPE_PDD 8
2739 #define SSF_TYPE_VDD 9
2740
2741 #define SSF_CONTROL_VISIBLE 0x0000
2742 #define SSF_CONTROL_INVISIBLE 0x0001
2743 #define SSF_CONTROL_MAXIMIZE 0x0002
2744 #define SSF_CONTROL_MINIMIZE 0x0004
2745 #define SSF_CONTROL_NOAUTOCLOSE 0x0008
2746 #define SSF_CONTROL_SETPOS 0x8000
2747
2748 #define STOP_SESSION_SPECIFIED 0
2749 #define STOP_SESSION_ALL 1
2750
2751 typedef struct _STARTDATA
2752 {
2753 USHORT Length;
2754 USHORT Related;
2755 USHORT FgBg;
2756 USHORT TraceOpt;
2757 PSZ PgmTitle;
2758 PSZ PgmName;
2759 PBYTE PgmInputs;
2760 PBYTE TermQ;
2761 PBYTE Environment;
2762 USHORT InheritOpt;
2763 USHORT SessionType;
2764 PSZ IconFile;
2765 ULONG PgmHandle;
2766 USHORT PgmControl;
2767 USHORT InitXPos;
2768 USHORT InitYPos;
2769 USHORT InitXSize;
2770 USHORT InitYSize;
2771 USHORT Reserved;
2772 PSZ ObjectBuffer;
2773 ULONG ObjectBuffLen;
2774 } STARTDATA;
2775 typedef STARTDATA *PSTARTDATA;
2776
2777 typedef struct _STATUSDATA
2778 {
2779 USHORT Length;
2780 USHORT SelectInd;
2781 USHORT BondInd;
2782 } STATUSDATA;
2783 typedef STATUSDATA *PSTATUSDATA;
2784
2785 ULONG DosQueryAppType (PCSZ pszName, PULONG pulFlags);
2786 ULONG DosSelectSession (ULONG ulIDSession);
2787 ULONG DosSetSession (ULONG ulIDSession, PSTATUSDATA psd);
2788 ULONG DosStartSession (PSTARTDATA psd, PULONG pulIDSession, PPID ppid);
2789 ULONG DosStopSession (ULONG ulScope, ULONG ulIDSession);
2790
2791 #endif /* INCL_DOSSESMGR */
2792
2793 /* ----------------------------- SEMAPHORES ------------------------------- */
2794
2795 #if defined (INCL_DOSSEMAPHORES) || !defined (INCL_NOCOMMON)
2796
2797 #define DC_SEM_SHARED 0x01
2798 #define DCMW_WAIT_ANY 0x02
2799 #define DCMW_WAIT_ALL 0x04
2800
2801 #define SEM_INDEFINITE_WAIT ((ULONG)-1)
2802 #define SEM_IMMEDIATE_RETURN 0
2803
2804 typedef ULONG HEV;
2805 typedef HEV *PHEV;
2806
2807 typedef struct _PSEMRECORD /* Note 1 */
2808 {
2809 HSEM hsemCur;
2810 ULONG ulUser;
2811 } SEMRECORD;
2812 typedef SEMRECORD *PSEMRECORD;
2813
2814 #endif /* INCL_DOSSEMAPHORES || !INCL_NOCOMMON */
2815
2816 #if defined (INCL_DOSSEMAPHORES)
2817
2818 ULONG DosCloseEventSem (HEV hev);
2819 ULONG DosCreateEventSem (PCSZ pszName, PHEV phev, ULONG ulAttr, BOOL32 fState);
2820 ULONG DosOpenEventSem (PCSZ pszName, PHEV phev);
2821 ULONG DosPostEventSem (HEV hev);
2822 ULONG DosQueryEventSem (HEV hev, PULONG pulCount);
2823 ULONG DosResetEventSem (HEV hev, PULONG pulCount);
2824 ULONG DosWaitEventSem (HEV hev, ULONG ulTimeout);
2825
2826 ULONG DosCloseMutexSem (HMTX hmtx);
2827 ULONG DosCreateMutexSem (PCSZ pszName, PHMTX phmtx, ULONG ulAttr,
2828 BOOL32 fState);
2829 ULONG DosOpenMutexSem (PCSZ pszName, PHMTX phmtx);
2830 ULONG DosQueryMutexSem (HMTX hmtx, PPID ppid, PTID ptid, PULONG pulCount);
2831 ULONG DosReleaseMutexSem (HMTX hmtx);
2832 ULONG DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
2833
2834 ULONG DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec);
2835 ULONG DosCloseMuxWaitSem (HMUX hmux);
2836 ULONG DosCreateMuxWaitSem (PCSZ pszName, PHMUX phmux, ULONG ulcSemRec,
2837 PSEMRECORD pSemRec, ULONG ulAttr);
2838 ULONG DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem);
2839 ULONG DosOpenMuxWaitSem (PCSZ pszName, PHMUX phmux);
2840 ULONG DosQueryMuxWaitSem (HMUX hmux, PULONG pulcSemRec, PSEMRECORD pSemRec,
2841 PULONG pulAttr);
2842 ULONG DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
2843
2844 #endif /* INCL_DOSSEMAPHORES */
2845
2846 /* ---------------------------- NAMED PIPES ------------------------------- */
2847
2848 #define NP_INDEFINITE_WAIT ((ULONG)-1)
2849 #define NP_DEFAULT_WAIT 0
2850
2851 #define NP_STATE_DISCONNECTED 1
2852 #define NP_STATE_LISTENING 2
2853 #define NP_STATE_CONNECTED 3
2854 #define NP_STATE_CLOSING 4
2855
2856 #define NP_ACCESS_INBOUND 0x0000
2857 #define NP_ACCESS_OUTBOUND 0x0001
2858 #define NP_ACCESS_DUPLEX 0x0002
2859 #define NP_INHERIT 0x0000
2860 #define NP_NOINHERIT 0x0080
2861 #define NP_WRITEBEHIND 0x0000
2862 #define NP_NOWRITEBEHIND 0x4000
2863
2864 #define NP_READMODE_BYTE 0x0000
2865 #define NP_READMODE_MESSAGE 0x0100
2866 #define NP_TYPE_BYTE 0x0000
2867 #define NP_TYPE_MESSAGE 0x0400
2868 #define NP_END_CLIENT 0x0000
2869 #define NP_END_SERVER 0x4000
2870 #define NP_WAIT 0x0000
2871 #define NP_NOWAIT 0x8000
2872 #define NP_UNLIMITED_INSTANCES 0x00ff
2873
2874 #define NP_NBLK NO_WAIT
2875 #define NP_SERVER NP_END_SERVER
2876 #define NP_WMESG NP_TYPE_MESSAGE
2877 #define NP_RMESG NP_READMODE_MESSAGE
2878 #define NP_ICOUNT 0x00ff
2879
2880 #define NPSS_EOI 0
2881 #define NPSS_RDATA 1
2882 #define NPSS_WSPACE 2
2883 #define NPSS_CLOSE 3
2884
2885 #define NPSS_WAIT 0x0001
2886
2887 typedef struct _AVAILDATA
2888 {
2889 USHORT cbpipe;
2890 USHORT cbmessage;
2891 } AVAILDATA;
2892 typedef AVAILDATA *PAVAILDATA;
2893
2894 typedef struct _PIPEINFO
2895 {
2896 USHORT cbOut;
2897 USHORT cbIn;
2898 BYTE cbMaxInst;
2899 BYTE cbCurInst;
2900 BYTE cbName;
2901 CHAR szName[1];
2902 } PIPEINFO;
2903 typedef PIPEINFO *PPIPEINFO;
2904
2905 typedef struct _PIPESEMSTATE
2906 {
2907 BYTE fStatus;
2908 BYTE fFlag;
2909 USHORT usKey;
2910 USHORT usAvail;
2911 } PIPESEMSTATE;
2912 typedef PIPESEMSTATE *PPIPESEMSTATE;
2913
2914 ULONG DosCallNPipe (PCSZ pszName, PVOID pInbuf, ULONG ulInbufLength,
2915 PVOID pOutbuf, ULONG ulOutbufSize, PULONG pulActualLength,
2916 ULONG ulTimeout);
2917 ULONG DosConnectNPipe (HPIPE hpipe);
2918 ULONG DosCreateNPipe (PCSZ pszName, PHPIPE phpipe, ULONG ulOpenMode,
2919 ULONG ulPipeMode, ULONG ulInbufLength, ULONG ulOutbufLength,
2920 ULONG ulTimeout);
2921 ULONG DosDisConnectNPipe (HPIPE hpipe);
2922 ULONG DosPeekNPipe (HPIPE hpipe, PVOID pBuf, ULONG ulBufLength,
2923 PULONG pulActualLength, PAVAILDATA pAvail, PULONG pulState);
2924 ULONG DosQueryNPHState (HPIPE hpipe, PULONG pulState);
2925 ULONG DosQueryNPipeInfo (HPIPE hpipe, ULONG ulInfoLevel, PVOID pBuf,
2926 ULONG ulBufLength);
2927 ULONG DosQueryNPipeSemState (HSEM hsem, PPIPESEMSTATE pState,
2928 ULONG ulBufLength);
2929 ULONG DosRawReadNPipe (PCSZ pszName, ULONG ulCount, PULONG pulLength,
2930 PVOID pBuf);
2931 ULONG DosRawWriteNPipe (PCSZ pszName, ULONG ulCount);
2932 ULONG DosSetNPHState (HPIPE hpipe, ULONG ulState);
2933 ULONG DosSetNPipeSem (HPIPE hpipe, HSEM hsem, ULONG ulKey);
2934 ULONG DosTransactNPipe (HPIPE hpipe, PVOID pOutbuf, ULONG ulOutbufLength,
2935 PVOID pInbuf, ULONG ulInbufLength, PULONG pulBytesRead);
2936 ULONG DosWaitNPipe (PCSZ pszName, ULONG ulTimeout);
2937
2938 /* ------------------------------- QUEUES --------------------------------- */
2939
2940 #if defined (INCL_DOSQUEUES)
2941
2942 #define QUE_FIFO 0x0000
2943 #define QUE_LIFO 0x0001
2944 #define QUE_PRIORITY 0x0002
2945 #define QUE_NOCONVERT_ADDRESS 0x0000
2946 #define QUE_CONVERT_ADDRESS 0x0004
2947
2948 typedef struct _REQUESTDATA
2949 {
2950 PID pid;
2951 ULONG ulData;
2952 } REQUESTDATA;
2953 typedef REQUESTDATA *PREQUESTDATA;
2954
2955 ULONG DosCreatePipe (PHFILE phfReadHandle, PHFILE phfWriteHandle,
2956 ULONG ulPipeSize);
2957
2958 ULONG DosCloseQueue (HQUEUE hq);
2959 ULONG DosCreateQueue (PHQUEUE phq, ULONG ulPriority, PCSZ pszName);
2960 ULONG DosOpenQueue (PPID ppid, PHQUEUE phq, PCSZ pszName);
2961 ULONG DosPeekQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
2962 PPVOID pDataAddress, PULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
2963 HEV hsem);
2964 ULONG DosPurgeQueue (HQUEUE hq);
2965 ULONG DosQueryQueue (HQUEUE hq, PULONG pulCount);
2966 ULONG DosReadQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
2967 PPVOID pDataAddress, ULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
2968 HEV hsem);
2969 ULONG DosWriteQueue (HQUEUE hq, ULONG ulRequest, ULONG ulDataLength,
2970 PVOID pData, ULONG ulPriority);
2971
2972 #endif /* INCL_DOSQUEUES */
2973
2974 /* --------------------------- EXCEPTIONS --------------------------------- */
2975
2976 #if defined (INCL_DOSEXCEPTIONS)
2977
2978 #define CONTEXT_CONTROL 0x0001
2979 #define CONTEXT_INTEGER 0x0002
2980 #define CONTEXT_SEGMENTS 0x0004
2981 #define CONTEXT_FLOATING_POINT 0x0008
2982 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | \
2983 CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT)
2984
2985 #define EH_NONCONTINUABLE 0x0001
2986 #define EH_UNWINDING 0x0002
2987 #define EH_EXIT_UNWIND 0x0004
2988 #define EH_STACK_INVALID 0x0008
2989 #define EH_NESTED_CALL 0x0010
2990
2991 #define SIG_UNSETFOCUS 0
2992 #define SIG_SETFOCUS 1
2993
2994 #define UNWIND_ALL 0
2995
2996 #define XCPT_CONTINUE_SEARCH 0x00000000
2997 #define XCPT_CONTINUE_EXECUTION 0xffffffff
2998 #define XCPT_CONTINUE_STOP 0x00716668
2999
3000 #define XCPT_SIGNAL_INTR 1
3001 #define XCPT_SIGNAL_KILLPROC 3
3002 #define XCPT_SIGNAL_BREAK 4
3003
3004 #define XCPT_FATAL_EXCEPTION 0xc0000000
3005 #define XCPT_SEVERITY_CODE 0xc0000000
3006 #define XCPT_CUSTOMER_CODE 0x20000000
3007 #define XCPT_FACILITY_CODE 0x1fff0000
3008 #define XCPT_EXCEPTION_CODE 0x0000ffff
3009
3010 #define XCPT_UNKNOWN_ACCESS 0x00000000
3011 #define XCPT_READ_ACCESS 0x00000001
3012 #define XCPT_WRITE_ACCESS 0x00000002
3013 #define XCPT_EXECUTE_ACCESS 0x00000004
3014 #define XCPT_SPACE_ACCESS 0x00000008
3015 #define XCPT_LIMIT_ACCESS 0x00000010
3016 #define XCPT_DATA_UNKNOWN 0xffffffff
3017
3018 #define XCPT_GUARD_PAGE_VIOLATION 0x80000001
3019 #define XCPT_UNABLE_TO_GROW_STACK 0x80010001
3020 #define XCPT_ACCESS_VIOLATION 0xc0000005
3021 #define XCPT_IN_PAGE_ERROR 0xc0000006
3022 #define XCPT_ILLEGAL_INSTRUCTION 0xc000001c
3023 #define XCPT_INVALID_LOCK_SEQUENCE 0xc000001d
3024 #define XCPT_NONCONTINUABLE_EXCEPTION 0xc0000024
3025 #define XCPT_INVALID_DISPOSITION 0xc0000025
3026 #define XCPT_UNWIND 0xc0000026
3027 #define XCPT_BAD_STACK 0xc0000027
3028 #define XCPT_INVALID_UNWIND_TARGET 0xc0000028
3029 #define XCPT_ARRAY_BOUNDS_EXCEEDED 0xc0000093
3030 #define XCPT_FLOAT_DENORMAL_OPERAND 0xc0000094
3031 #define XCPT_FLOAT_DIVIDE_BY_ZERO 0xc0000095
3032 #define XCPT_FLOAT_INEXACT_RESULT 0xc0000096
3033 #define XCPT_FLOAT_INVALID_OPERATION 0xc0000097
3034 #define XCPT_FLOAT_OVERFLOW 0xc0000098
3035 #define XCPT_FLOAT_STACK_CHECK 0xc0000099
3036 #define XCPT_FLOAT_UNDERFLOW 0xc000009a
3037 #define XCPT_INTEGER_DIVIDE_BY_ZERO 0xc000009b
3038 #define XCPT_INTEGER_OVERFLOW 0xc000009c
3039 #define XCPT_PRIVILEGED_INSTRUCTION 0xc000009d
3040 #define XCPT_DATATYPE_MISALIGNMENT 0xc000009e
3041 #define XCPT_BREAKPOINT 0xc000009f
3042 #define XCPT_SINGLE_STEP 0xc00000a0
3043 #define XCPT_PROCESS_TERMINATE 0xc0010001
3044 #define XCPT_ASYNC_PROCESS_TERMINATE 0xc0010002
3045 #define XCPT_SIGNAL 0xc0010003
3046
3047 typedef struct _fpreg /* Note 1 */
3048 {
3049 ULONG losig;
3050 ULONG hisig;
3051 USHORT signexp;
3052 } FPREG;
3053 typedef FPREG *PFPREG;
3054
3055 typedef struct _CONTEXT /* Note 1 */
3056 {
3057 ULONG ContextFlags;
3058 ULONG ctx_env[7];
3059 FPREG ctx_stack[8];
3060 ULONG ctx_SegGs;
3061 ULONG ctx_SegFs;
3062 ULONG ctx_SegEs;
3063 ULONG ctx_SegDs;
3064 ULONG ctx_RegEdi;
3065 ULONG ctx_RegEsi;
3066 ULONG ctx_RegEax;
3067 ULONG ctx_RegEbx;
3068 ULONG ctx_RegEcx;
3069 ULONG ctx_RegEdx;
3070 ULONG ctx_RegEbp;
3071 ULONG ctx_RegEip;
3072 ULONG ctx_SegCs;
3073 ULONG ctx_EFlags;
3074 ULONG ctx_RegEsp;
3075 ULONG ctx_SegSs;
3076 } CONTEXTRECORD;
3077 typedef CONTEXTRECORD *PCONTEXTRECORD;
3078
3079 #define EXCEPTION_MAXIMUM_PARAMETERS 4
3080
3081 typedef struct _EXCEPTIONREPORTRECORD
3082 {
3083 ULONG ExceptionNum;
3084 ULONG fHandlerFlags;
3085 struct _EXCEPTIONREPORTRECORD * NestedExceptionReportRecord;
3086 PVOID ExceptionAddress;
3087 ULONG cParameters;
3088 ULONG ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS];
3089 } EXCEPTIONREPORTRECORD;
3090 typedef EXCEPTIONREPORTRECORD *PEXCEPTIONREPORTRECORD;
3091
3092 struct _EXCEPTIONREGISTRATIONRECORD;
3093
3094 typedef ULONG _ERR (PEXCEPTIONREPORTRECORD pReport,
3095 struct _EXCEPTIONREGISTRATIONRECORD *pRegistration,
3096 PCONTEXTRECORD pContext, PVOID pWhatever);
3097 typedef _ERR *ERR;
3098
3099 typedef struct _EXCEPTIONREGISTRATIONRECORD
3100 {
3101 struct _EXCEPTIONREGISTRATIONRECORD * __volatile__ prev_structure;
3102 ERR __volatile__ ExceptionHandler;
3103 } EXCEPTIONREGISTRATIONRECORD;
3104 typedef EXCEPTIONREGISTRATIONRECORD *PEXCEPTIONREGISTRATIONRECORD;
3105
3106 #define END_OF_CHAIN ((PEXCEPTIONREGISTRATIONRECORD)(-1))
3107
3108 ULONG DosAcknowledgeSignalException (ULONG ulSignal);
3109 ULONG DosEnterMustComplete (PULONG pulNesting);
3110 ULONG DosExitMustComplete (PULONG pulNesting);
3111 ULONG DosQueryThreadContext (TID tid, ULONG ulLevel, PCONTEXTRECORD pContext);
3112 ULONG DosRaiseException (PEXCEPTIONREPORTRECORD pXRepRec);
3113 ULONG DosSendSignalException (PID pid, ULONG ulSignal);
3114 ULONG DosSetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
3115 ULONG DosSetSignalExceptionFocus (BOOL32 flag, PULONG pulTimes);
3116 ULONG DosUnsetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
3117 ULONG DosUnwindException (PEXCEPTIONREGISTRATIONRECORD pXRegRec,
3118 PVOID pJumpThere, PEXCEPTIONREPORTRECORD pXRepRec);
3119
3120 #endif /* INCL_DOSEXCEPTIONS */
3121
3122 /* --------------------------- INFORMATION -------------------------------- */
3123
3124 #if defined (INCL_DOSMISC)
3125
3126 #define QSV_MAX_PATH_LENGTH 1
3127 #define QSV_MAX_TEXT_SESSIONS 2
3128 #define QSV_MAX_PM_SESSIONS 3
3129 #define QSV_MAX_VDM_SESSIONS 4
3130 #define QSV_BOOT_DRIVE 5
3131 #define QSV_DYN_PRI_VARIATION 6
3132 #define QSV_MAX_WAIT 7
3133 #define QSV_MIN_SLICE 8
3134 #define QSV_MAX_SLICE 9
3135 #define QSV_PAGE_SIZE 10
3136 #define QSV_VERSION_MAJOR 11
3137 #define QSV_VERSION_MINOR 12
3138 #define QSV_VERSION_REVISION 13
3139 #define QSV_MS_COUNT 14
3140 #define QSV_TIME_LOW 15
3141 #define QSV_TIME_HIGH 16
3142 #define QSV_TOTPHYSMEM 17
3143 #define QSV_TOTRESMEM 18
3144 #define QSV_TOTAVAILMEM 19
3145 #define QSV_MAXPRMEM 20
3146 #define QSV_MAXSHMEM 21
3147 #define QSV_TIMER_INTERVAL 22
3148 #define QSV_MAX_COMP_LENGTH 23
3149 #define QSV_FOREGROUND_FS_SESSION 24
3150 #define QSV_FOREGROUND_PROCESS 25
3151 #define QSV_MAX QSV_FOREGROUND_PROCESS
3152
3153 #define SIS_MMIOADDR 0
3154 #define SIS_MEC_TABLE 1
3155 #define SIS_SYS_LOG 2
3156
3157 ULONG DosQuerySysInfo (ULONG ulStart, ULONG ulLast, PVOID pBuf,
3158 ULONG ulBufLength);
3159 ULONG DosScanEnv (PCSZ pszName, PSZ *pszValue);
3160 ULONG DosQueryRASInfo (ULONG Index, PPVOID Addr);
3161
3162 #endif /* INCL_DOSMISC */
3163
3164 /* ---------------------------- TIMERS ------------------------------------ */
3165
3166 #if defined (INCL_DOSDATETIME) || !defined (INCL_NOCOMMON)
3167
3168 typedef struct _DATETIME
3169 {
3170 UCHAR hours;
3171 UCHAR minutes;
3172 UCHAR seconds;
3173 UCHAR hundredths;
3174 UCHAR day;
3175 UCHAR month;
3176 USHORT year;
3177 SHORT timezone;
3178 UCHAR weekday;
3179 } DATETIME;
3180 typedef DATETIME *PDATETIME;
3181
3182 ULONG DosGetDateTime (PDATETIME pdt);
3183 ULONG DosSetDateTime (__const__ DATETIME *pdt);
3184
3185 #endif /* INCL_DOSDATETIME || !INCL_NOCOMMON */
3186
3187
3188 #if defined (INCL_DOSDATETIME)
3189
3190 typedef LHANDLE HTIMER;
3191 typedef HTIMER *PHTIMER;
3192
3193 ULONG DosAsyncTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
3194 ULONG DosStartTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
3195 ULONG DosStopTimer (HTIMER htimer);
3196
3197 #endif /* INCL_DOSDATETIME */
3198
3199 #if defined (INCL_DOSPROFILE)
3200
3201 typedef struct _QWORD
3202 {
3203 ULONG ulLo;
3204 ULONG ulHi;
3205 } QWORD;
3206 typedef QWORD *PQWORD;
3207
3208 ULONG DosTmrQueryFreq (PULONG pulTmrFreq);
3209 ULONG DosTmrQueryTime (PQWORD pqwTmrTime);
3210
3211 #endif /* INCL_DOSPROFILE */
3212
3213 /* ---------------------- VIRTUAL DOS MACHINES----------------------------- */
3214
3215 typedef USHORT SGID;
3216
3217 #if defined (INCL_DOSMVDM)
3218
3219 typedef LHANDLE HVDD;
3220 typedef HVDD *PHVDD;
3221
3222 ULONG DosCloseVDD (HVDD hvdd);
3223 ULONG DosOpenVDD (PCSZ pszVDD, PHVDD phvdd);
3224 ULONG DosQueryDOSProperty (SGID sgidSesssionID, PCSZ pszName,
3225 ULONG ulBufferLength, PSZ pBuffer);
3226 ULONG DosRequestVDD (HVDD hvdd, SGID sgidSessionID, ULONG ulCommand,
3227 ULONG ulInputBufferLength, PVOID pInputBuffer,
3228 ULONG ulOutputBufferLength, PVOID pOutputBuffer);
3229 ULONG DosSetDOSProperty (SGID sgidSessionID, PCSZ pszName,
3230 ULONG ulBufferLength, PCSZ pBuffer);
3231
3232 #endif /* INCL_DOSMVDM */
3233
3234 /* --------------------------- DEBUGGING ---------------------------------- */
3235
3236 #if defined (INCL_DOSPROCESS)
3237
3238 #define DBG_C_Null 0
3239 #define DBG_C_ReadMem 1
3240 #define DBG_C_ReadMem_I 1
3241 #define DBG_C_ReadMem_D 2
3242 #define DBG_C_ReadReg 3
3243 #define DBG_C_WriteMem 4
3244 #define DBG_C_WriteMem_I 4
3245 #define DBG_C_WriteMem_D 5
3246 #define DBG_C_WriteReg 6
3247 #define DBG_C_Go 7
3248 #define DBG_C_Term 8
3249 #define DBG_C_SStep 9
3250 #define DBG_C_Stop 10
3251 #define DBG_C_Freeze 11
3252 #define DBG_C_Resume 12
3253 #define DBG_C_NumToAddr 13
3254 #define DBG_C_ReadCoRegs 14
3255 #define DBG_C_WriteCoRegs 15
3256 #define DBG_C_ThrdStat 17
3257 #define DBG_C_MapROAlias 18
3258 #define DBG_C_MapRWAlias 19
3259 #define DBG_C_UnMapAlias 20
3260 #define DBG_C_Connect 21
3261 #define DBG_C_ReadMemBuf 22
3262 #define DBG_C_WriteMemBuf 23
3263 #define DBG_C_SetWatch 24
3264 #define DBG_C_ClearWatch 25
3265 #define DBG_C_RangeStep 26
3266 #define DBG_C_Continue 27
3267 #define DBG_C_AddrToObject 28
3268 #define DBG_C_XchngOpcode 29
3269 #define DBG_C_LinToSel 30
3270 #define DBG_C_SelToLin 31
3271
3272 #define DBG_N_Success 0
3273 #define DBG_N_Error (-1)
3274 #define DBG_N_ProcTerm (-6)
3275 #define DBG_N_Exception (-7)
3276 #define DBG_N_ModuleLoad (-8)
3277 #define DBG_N_CoError (-9)
3278 #define DBG_N_ThreadTerm (-10)
3279 #define DBG_N_AsyncStop (-11)
3280 #define DBG_N_NewProc (-12)
3281 #define DBG_N_AliasFree (-13)
3282 #define DBG_N_Watchpoint (-14)
3283 #define DBG_N_ThreadCreate (-15)
3284 #define DBG_N_ModuleFree (-16)
3285 #define DBG_N_RangeStep (-17)
3286
3287 #define DBG_D_Thawed 0
3288 #define DBG_D_Frozen 1
3289
3290 #define DBG_T_Runnable 0
3291 #define DBG_T_Suspended 1
3292 #define DBG_T_Blocked 2
3293 #define DBG_T_CritSec 3
3294
3295 #define DBG_L_386 1
3296
3297 #define DBG_LEN_387 108
3298
3299 #define DBG_CO_387 1
3300
3301 #define DBG_O_OBJMTE 0x10000000
3302
3303 #define DBG_W_Global 0x00000001
3304 #define DBG_W_Local 0x00000002
3305 #define DBG_W_Execute 0x00010000
3306 #define DBG_W_Write 0x00020000
3307 #define DBG_W_ReadWrite 0x00030000
3308
3309 #define DBG_X_PRE_FIRST_CHANCE 0x00000000
3310 #define DBG_X_FIRST_CHANCE 0x00000001
3311 #define DBG_X_LAST_CHANCE 0x00000002
3312 #define DBG_X_STACK_INVALID 0x00000003
3313
3314 typedef struct _TStat
3315 {
3316 UCHAR DbgState;
3317 UCHAR TState;
3318 USHORT TPriority;
3319 } TStat_t;
3320
3321 typedef struct _uDB
3322 {
3323 ULONG Pid;
3324 ULONG Tid;
3325 LONG Cmd;
3326 LONG Value;
3327 ULONG Addr;
3328 ULONG Buffer;
3329 ULONG Len;
3330 ULONG Index;
3331 ULONG MTE;
3332 ULONG EAX;
3333 ULONG ECX;
3334 ULONG EDX;
3335 ULONG EBX;
3336 ULONG ESP;
3337 ULONG EBP;
3338 ULONG ESI;
3339 ULONG EDI;
3340 ULONG EFlags;
3341 ULONG EIP;
3342 ULONG CSLim;
3343 ULONG CSBase;
3344 UCHAR CSAcc;
3345 UCHAR CSAtr;
3346 USHORT CS;
3347 ULONG DSLim;
3348 ULONG DSBase;
3349 UCHAR DSAcc;
3350 UCHAR DSAtr;
3351 USHORT DS;
3352 ULONG ESLim;
3353 ULONG ESBase;
3354 UCHAR ESAcc;
3355 UCHAR ESAtr;
3356 USHORT ES;
3357 ULONG FSLim;
3358 ULONG FSBase;
3359 UCHAR FSAcc;
3360 UCHAR FSAtr;
3361 USHORT FS;
3362 ULONG GSLim;
3363 ULONG GSBase;
3364 UCHAR GSAcc;
3365 UCHAR GSAtr;
3366 USHORT GS;
3367 ULONG SSLim;
3368 ULONG SSBase;
3369 UCHAR SSAcc;
3370 UCHAR SSAtr;
3371 USHORT SS;
3372 } uDB_t;
3373
3374 ULONG DosDebug (uDB_t *pDebugBuffer);
3375
3376 #endif /* INCL_DOSPROCESS */
3377
3378 /* ---------------------------- MESSAGES ---------------------------------- */
3379
3380 #if defined (INCL_DOSMISC)
3381
3382 ULONG DosGetMessage (PCHAR *pTable, ULONG ulTableEntries,
3383 PCHAR pBuffer, ULONG ulBufferLengthMax, ULONG ulMsgnNumber,
3384 PCSZ pszFile, PULONG pulBufferLength);
3385 ULONG DosInsertMessage (PCHAR *pTable, ULONG ulCount, PCSZ pszMsg,
3386 ULONG ulMsgLength, PCHAR pBuffer, ULONG ulBufferLengthMax,
3387 PULONG pulBufferLength);
3388 ULONG DosPutMessage (HFILE hfile, ULONG ulMessageLength, PCHAR pMessage);
3389 ULONG DosQueryMessageCP (PCHAR pBuffer, ULONG ulBufferLengthMax,
3390 PCSZ pszFilename, PULONG pulBufferLength);
3391
3392 #endif /* INCL_DOSMISC */
3393
3394 /* ----------------------------- RAS -------------------------------------- */
3395
3396 #if defined (INCL_DOSRAS)
3397
3398 #define DDP_DISABLEPROCDUMP 0
3399 #define DDP_ENABLEPROCDUMP 1
3400 #define DDP_PERFORMPROCDUMP 2
3401
3402 #define LF_LOGENABLE 0x0001
3403 #define LF_LOGAVAILABLE 0x0002
3404
3405 #define SIS_MMIOADDR 0
3406 #define SIS_MEC_TABLE 1
3407 #define SIS_SYS_LOG 2
3408
3409 #define SPU_DISABLESUPPRESSION 0
3410 #define SPU_ENABLESUPPRESSION 1
3411
3412 ULONG DosDumpProcess (ULONG ulFlag, ULONG ulDrive, PID pid);
3413 ULONG DosForceSystemDump (ULONG ulReserved);
3414 ULONG DosQueryRASInfo (ULONG ulIndex, PPVOID addr);
3415 ULONG DosSuppressPopUps (ULONG ulFlag, ULONG ulDrive);
3416
3417 #endif /* INCL_DOSRAS */
3418
3419 /* ---------------------------- REXX -------------------------------------- */
3420
3421 #define RXAUTOBUFLEN 256
3422
3423 typedef struct _RXSTRING
3424 {
3425 ULONG strlength;
3426 PCH strptr;
3427 } RXSTRING;
3428 typedef RXSTRING *PRXSTRING;
3429
3430 typedef struct _RXSYSEXIT
3431 {
3432 PSZ sysexit_name;
3433 LONG sysexit_code;
3434 } RXSYSEXIT;
3435 typedef RXSYSEXIT *PRXSYSEXIT;
3436
3437 #define RXNULLSTRING(r) ((r).strptr == (PCH)0)
3438 #define RXZEROLENSTRING(r) ((r).strptr != (PCH)0 && (r).strlength == 0)
3439 #define RXVALIDSTRING(r) ((r).strptr != (PCH)0 && (r).strlength != 0)
3440 #define RXSTRLEN(r) (RXNULLSTRING(r) ? 0 : (r).strlength)
3441 #define RXSTRPTR(r) (r).strptr
3442 #define MAKERXSTRING(r,p,l) \
3443 ((r).strptr = (PCH)p, (r).strlength = (ULONG)l)
3444
3445 #define RXCOMMAND 0
3446 #define RXSUBROUTINE 1
3447 #define RXFUNCTION 2
3448
3449 #if defined (INCL_RXSUBCOM)
3450
3451 #define RXSUBCOM_DROPPABLE 0x0000
3452 #define RXSUBCOM_NONDROP 0x0001
3453
3454 #define RXSUBCOM_ISREG 0x0001
3455 #define RXSUBCOM_ERROR 0x0001
3456 #define RXSUBCOM_FAILURE 0x0002
3457
3458 #define RXSUBCOM_BADENTRY 1001
3459 #define RXSUBCOM_NOEMEM 1002
3460 #define RXSUBCOM_BADTYPE 1003
3461 #define RXSUBCOM_NOTINIT 1004
3462
3463 #define RXSUBCOM_OK 0
3464 #define RXSUBCOM_DUP 10
3465 #define RXSUBCOM_MAXREG 20
3466 #define RXSUBCOM_NOTREG 30
3467 #define RXSUBCOM_NOCANDROP 40
3468 #define RXSUBCOM_LOADERR 50
3469 #define RXSUBCOM_NOPROC 127
3470
3471 typedef ULONG RexxSubcomHandler (PRXSTRING prxCommand, PUSHORT pusFlags,
3472 PRXSTRING prxResult);
3473
3474 ULONG RexxDeregisterSubcom (PCSZ pszEnvName, PCSZ pszModuleName);
3475 ULONG RexxQuerySubcom (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlags,
3476 PUCHAR pUserWord);
3477 ULONG RexxRegisterSubcomDll (PCSZ pszEnvName, PCSZ pszModuleName,
3478 PCSZ pszEntryPoint, PUCHAR pUserArea, ULONG ulDropAuth);
3479 ULONG RexxRegisterSubcomExe (PCSZ pszEnvName, PFN pfnEntryPoint,
3480 PUCHAR pUserArea);
3481
3482 #define REXXDEREGISTERSUBCOM RexxDeregisterSubcom
3483 #define REXXREGISTERSUBCOMDLL RexxRegisterSubcomDll
3484 #define REXXREGISTERSUBCOMEXE RexxRegisterSubcomExe
3485 #define REXXQUERYSUBCOM RexxQuerySubcom
3486
3487 #endif /* INCL_RXSUBCOM */
3488
3489 #if defined (INCL_RXSHV)
3490
3491 #define RXSHV_SET 0x0000
3492 #define RXSHV_FETCH 0x0001
3493 #define RXSHV_DROPV 0x0002
3494 #define RXSHV_SYSET 0x0003
3495 #define RXSHV_SYFET 0x0004
3496 #define RXSHV_SYDRO 0x0005
3497 #define RXSHV_NEXTV 0x0006
3498 #define RXSHV_PRIV 0x0007
3499 #define RXSHV_EXIT 0x0008
3500
3501 #define RXSHV_NOAVL 144
3502
3503 #define RXSHV_OK 0x0000
3504 #define RXSHV_NEWV 0x0001
3505 #define RXSHV_LVAR 0x0002
3506 #define RXSHV_TRUNC 0x0004
3507 #define RXSHV_BADN 0x0008
3508 #define RXSHV_MEMFL 0x0010
3509 #define RXSHV_BADF 0x0080
3510
3511 typedef struct _SHVBLOCK
3512 {
3513 struct _SHVBLOCK *shvnext;
3514 RXSTRING shvname;
3515 RXSTRING shvvalue;
3516 ULONG shvnamelen;
3517 ULONG shvvaluelen;
3518 UCHAR shvcode;
3519 UCHAR shvret;
3520 } SHVBLOCK;
3521 typedef SHVBLOCK *PSHVBLOCK;
3522
3523 ULONG RexxVariablePool (PSHVBLOCK pRequest);
3524
3525 #define REXXVARIABLEPOOL RexxVariablePool
3526
3527 #endif /* INCL_RXSHV */
3528
3529 #if defined (INCL_RXFUNC)
3530
3531 #define RXFUNC_DYNALINK 1
3532 #define RXFUNC_CALLENTRY 2
3533
3534 #define RXFUNC_OK 0
3535 #define RXFUNC_DEFINED 10
3536 #define RXFUNC_NOMEM 20
3537 #define RXFUNC_NOTREG 30
3538 #define RXFUNC_MODNOTFND 40
3539 #define RXFUNC_ENTNOTFND 50
3540 #define RXFUNC_NOTINIT 60
3541 #define RXFUNC_BADTYPE 70
3542
3543 typedef ULONG RexxFunctionHandler (PCSZ pszName, ULONG ulArgCount,
3544 PRXSTRING prxArgList, PCSZ pszQueueName, PRXSTRING prxResult);
3545
3546 ULONG RexxDeregisterFunction (PCSZ pszFuncName);
3547 ULONG RexxQueryFunction (PCSZ pszFuncName);
3548 ULONG RexxRegisterFunctionDll (PCSZ pszFuncName, PCSZ pszModuleName,
3549 PCSZ pszEntryPoint);
3550 ULONG RexxRegisterFunctionExe (PCSZ pszFuncName,
3551 RexxFunctionHandler *pfnEntryPoint);
3552
3553 #define REXXDEREGISTERFUNCTION RexxDeregisterFunction
3554 #define REXXQUERYFUNCTION RexxQueryFunction
3555 #define REXXREGISTERFUNCTIONDLL RexxRegisterFunctionDll
3556 #define REXXREGISTERFUNCTIONEXE RexxRegisterFunctionExe
3557
3558 #endif /* INCL_RXFUNC */
3559
3560 #if defined (INCL_RXSYSEXIT)
3561
3562 #define RXEXIT_DROPPABLE 0x0000
3563 #define RXEXIT_NONDROP 0x0001
3564
3565 #define RXEXIT_HANDLED 0
3566 #define RXEXIT_NOT_HANDLED 1
3567 #define RXEXIT_RAISE_ERROR (-1)
3568
3569 #define RXEXIT_ISREG 0x0001
3570 #define RXEXIT_ERROR 0x0001
3571 #define RXEXIT_FAILURE 0x0002
3572
3573 #define RXEXIT_BADENTRY 1001
3574 #define RXEXIT_NOEMEM 1002
3575 #define RXEXIT_BADTYPE 1003
3576 #define RXEXIT_NOTINIT 1004
3577
3578 #define RXEXIT_OK 0
3579 #define RXEXIT_DUP 10
3580 #define RXEXIT_MAXREG 20
3581 #define RXEXIT_NOTREG 30
3582 #define RXEXIT_NOCANDROP 40
3583 #define RXEXIT_LOADERR 50
3584 #define RXEXIT_NOPROC 127
3585
3586 #define RXENDLST 0
3587
3588 #define RXFNC 2
3589 #define RXFNCCAL 1
3590
3591 #define RXCMD 3
3592 #define RXCMDHST 1
3593
3594 #define RXMSQ 4
3595 #define RXMSQPLL 1
3596 #define RXMSQPSH 2
3597 #define RXMSQSIZ 3
3598 #define RXMSQNAM 20
3599
3600 #define RXSIO 5
3601 #define RXSIOSAY 1
3602 #define RXSIOTRC 2
3603 #define RXSIOTRD 3
3604 #define RXSIODTR 4
3605 #define RXSIOTLL 5
3606
3607 #define RXHLT 7
3608 #define RXHLTCLR 1
3609 #define RXHLTTST 2
3610
3611 #define RXTRC 8
3612 #define RXTRCTST 1
3613
3614 #define RXINI 9
3615 #define RXINIEXT 1
3616
3617 #define RXTER 10
3618 #define RXTEREXT 1
3619
3620 #define RXNOOFEXITS 11
3621
3622 typedef PUCHAR PEXIT;
3623
3624 typedef struct _RXFNC_FLAGS
3625 {
3626 ULONG rxfferr : 1;
3627 ULONG rxffnfnd : 1;
3628 ULONG rxffsub : 1;
3629 } RXFNC_FLAGS;
3630
3631 typedef struct _RXFNCCAL_PARM
3632 {
3633 RXFNC_FLAGS rxfnc_flags;
3634 PUCHAR rxfnc_name;
3635 USHORT rxfnc_namel;
3636 PUCHAR rxfnc_que;
3637 USHORT rxfnc_quel;
3638 USHORT rxfnc_argc;
3639 PRXSTRING rxfnc_argv;
3640 RXSTRING rxfnc_retc;
3641 } RXFNCCAL_PARM;
3642
3643 typedef struct _RXCMD_FLAGS
3644 {
3645 ULONG rxfcfail : 1;
3646 ULONG rxfcerr : 1;
3647 } RXCMD_FLAGS;
3648
3649 typedef struct _RXCMDHST_PARM
3650 {
3651 RXCMD_FLAGS rxcmd_flags;
3652 PUCHAR rxcmd_address;
3653 USHORT rxcmd_addressl;
3654 PUCHAR rxcmd_dll;
3655 USHORT rxcmd_dll_len;
3656 RXSTRING rxcmd_command;
3657 RXSTRING rxcmd_retc;
3658 } RXCMDHST_PARM;
3659
3660 typedef struct _RXMSQPLL_PARM
3661 {
3662 RXSTRING rxmsq_retc;
3663 } RXMSQPLL_PARM;
3664
3665 typedef struct _RXMSQ_FLAGS
3666 {
3667 ULONG rxfmlifo : 1;
3668 } RXMSQ_FLAGS;
3669
3670 typedef struct _RXMSQPSH_PARM
3671 {
3672 RXMSQ_FLAGS rxmsq_flags;
3673 RXSTRING rxmsq_value;
3674 } RXMSQPSH_PARM;
3675
3676 typedef struct _RXMSQSIZ_PARM
3677 {
3678 ULONG rxmsq_size;
3679 } RXMSQSIZ_PARM;
3680
3681 typedef struct _RXMSQNAM_PARM
3682 {
3683 RXSTRING rxmsq_name;
3684 } RXMSQNAM_PARM;
3685
3686 typedef struct _RXSIOSAY_PARM
3687 {
3688 RXSTRING rxsio_string;
3689 } RXSIOSAY_PARM;
3690
3691 typedef struct _RXSIOTRC_PARM
3692 {
3693 RXSTRING rxsio_string;
3694 } RXSIOTRC_PARM;
3695
3696 typedef struct _RXSIOTRD_PARM
3697 {
3698 RXSTRING rxsiotrd_retc;
3699 } RXSIOTRD_PARM;
3700
3701 typedef struct _RXSIODR_PARM
3702 {
3703 RXSTRING rxsiodtr_retc;
3704 } RXSIODTR_PARM;
3705
3706 typedef struct _RXHLT_FLAGS
3707 {
3708 ULONG rxfhhalt : 1;
3709 } RXHLT_FLAGS;