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