remove obsoleted makefiles and config files, tools/Makefile -> tools/tools.mak, fix...
[reactos.git] / os2 / include / os2.h
1 /* os2emx.h (emx+gcc) */
2
3 #ifndef _OS2EMX_H
4 #define _OS2EMX_H
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif /* __cplusplus */
9
10 #pragma pack(1)
11
12 /* ------------------------ INCL_ SYMBOLS --------------------------------- */
13
14 #if defined (INCL_BASE)
15 #define INCL_DOS
16 #define INCL_DOSERRORS
17 #define INCL_SUB
18 #endif
19
20 #if defined (INCL_DOS)
21 #define INCL_DOSDATETIME
22 #define INCL_DOSDEVICES
23 #define INCL_DOSEXCEPTIONS
24 #define INCL_DOSFILEMGR
25 #define INCL_DOSMEMMGR
26 #define INCL_DOSMISC
27 #define INCL_DOSMVDM
28 #define INCL_DOSMODULEMGR
29 #define INCL_DOSNLS
30 #define INCL_DOSPROCESS
31 #define INCL_DOSPROFILE
32 #define INCL_DOSRAS
33 #define INCL_DOSQUEUES
34 #define INCL_DOSRESOURCES
35 #define INCL_DOSSEMAPHORES
36 #define INCL_DOSSESMGR
37 #endif
38
39 #if defined (INCL_REXXSAA)
40 #define INCL_RXSUBCOM
41 #define INCL_RXSHV
42 #define INCL_RXFUNC
43 #define INCL_RXSYSEXIT
44 #define INCL_RXMACRO
45 #define INCL_RXARI
46 #endif
47
48 #if defined (INCL_SUB)
49 #define INCL_KBD
50 #define INCL_VIO
51 #define INCL_MOU
52 #endif
53
54 #if defined (INCL_PM)
55 #define INCL_AVIO
56 #define INCL_FONTFILEFORMAT
57 #define INCL_GPI
58 #define INCL_SPL
59 #define INCL_WIN
60 #define INCL_WINWORKPLACE
61 #endif
62
63 #if defined (INCL_WIN) || defined (RC_INVOKED)
64 #define INCL_WINACCELERATORS
65 #define INCL_WINBUTTONS
66 #define INCL_WINDIALOGS
67 #define INCL_WINENTRYFIELDS
68 #define INCL_WINFRAMECTLS
69 #define INCL_WINFRAMEMGR
70 #define INCL_WINHELP
71 #define INCL_WININPUT
72 #define INCL_WINLISTBOXES
73 #define INCL_WINMENUS
74 #define INCL_WINMESSAGEMGR
75 #define INCL_WINMLE
76 #define INCL_WINPOINTERS
77 #define INCL_WINSCROLLBARS
78 #define INCL_WINSTATICS
79 #define INCL_WINSTDDLGS
80 #define INCL_WINSYS
81 #endif /* INCL_WIN || RC_INVOKED */
82
83 #if defined (INCL_WIN)
84 #define INCL_WINATOM
85 #define INCL_WINCLIPBOARD
86 #define INCL_WINCOUNTRY
87 #define INCL_WINCURSORS
88 #define INCL_WINDDE
89 #define INCL_WINDESKTOP
90 #define INCL_WINERRORS
91 #define INCL_WINHOOKS
92 #define INCL_WINLOAD
93 #define INCL_WINPALETTE
94 #define INCL_WINPROGRAMLIST
95 #define INCL_WINRECTANGLES
96 #define INCL_WINSHELLDATA
97 #define INCL_WINSWITCHLIST
98 #define INCL_WINTHUNKAPI
99 #define INCL_WINTIMER
100 #define INCL_WINTRACKRECT
101 #define INCL_WINTYPES
102 #define INCL_WINWINDOWMGR
103 #endif /* INCL_WIN */
104
105 #if defined (INCL_WINCOMMON)
106 #define INCL_WINWINDOWMGR
107 #endif
108
109 #if defined (INCL_WINSTDDLGS)
110 #define INCL_WINCIRCULARSLIDER
111 #define INCL_WINSTDBOOK
112 #define INCL_WINSTDCNR
113 #define INCL_WINSTDDRAG
114 #define INCL_WINSTDFILE
115 #define INCL_WINSTDFONT
116 #define INCL_WINSTDSLIDER
117 #define INCL_WINSTDSPIN
118 #define INCL_WINSTDVALSET
119 #endif
120
121 #if defined (INCL_WINSTDCNR) || defined (INCL_WINSTDVALSET)
122 #define INCL_WINSTDDRAG
123 #endif
124
125 #if defined (INCL_WINMLE) && !defined (INCL_WINENTRYFIELDS)
126 #define INCL_WINENTRYFIELDS
127 #endif
128
129 #if defined (INCL_WINWORKPLACE)
130 #define INCL_WPCLASS
131 #endif
132
133 #if defined (INCL_GPI)
134 #define INCL_GPIBITMAPS
135 #define INCL_GPICONTROL
136 #define INCL_GPICORRELATION
137 #define INCL_GPIINK
138 #define INCL_GPISEGMENTS
139 #endif
140
141 #if defined (INCL_ERRORS)
142 #define INCL_DOSERRORS
143 #define INCL_GPIERRORS
144 #define INCL_SHLERRORS
145 #define INCL_WINERRORS
146 #endif
147
148 #if defined (INCL_DDIDEFS)
149 #define INCL_GPIBITMAPS
150 #define INCL_GPIERRORS
151 #endif
152
153 #if defined (INCL_CIRCULARSLIDER) && !defined (INCL_WINCIRCULARSLIDER)
154 #define INCL_WINCIRCULARSLIDER
155 #endif
156
157 /* ------------------------ DISABLE KEYWORDS ------------------------------ */
158
159 #define APIENTRY
160 #define EXPENTRY
161 #define FAR
162
163 /* ------------------------ CONSTANTS AND TYPES --------------------------- */
164
165 #if !defined (FALSE)
166 #define FALSE 0
167 #endif
168
169 #if !defined (TRUE)
170 #define TRUE 1
171 #endif
172
173 #define VOID void
174
175 #define NULLHANDLE ((LHANDLE)0)
176 #define NULLSHANDLE ((SHANDLE)0)
177
178 #if !defined (NULL)
179 #if defined (__cplusplus)
180 #define NULL 0
181 #else
182 #define NULL ((void *)0)
183 #endif
184 #endif
185
186 typedef int INT; /* Required for Toolkit sample programs */
187 typedef unsigned UINT;
188 typedef unsigned long APIRET;
189
190 typedef unsigned long BOOL;
191 typedef BOOL *PBOOL;
192
193 typedef unsigned long BOOL32;
194 typedef BOOL *PBOOL32;
195
196 typedef char CHAR;
197 typedef CHAR *PCHAR;
198
199 #if !defined (OS2EMX_PLAIN_CHAR)
200
201 typedef unsigned char BYTE;
202 typedef unsigned char *PCH;
203 typedef unsigned char *PSZ;
204 typedef __const__ unsigned char *PCCH;
205 typedef __const__ unsigned char *PCSZ;
206
207 #else
208
209 typedef char BYTE;
210 typedef char *PCH;
211 typedef char *PSZ;
212 typedef __const__ char *PCCH;
213 typedef __const__ char *PCSZ;
214
215 #endif
216
217 typedef BYTE *PBYTE;
218
219 typedef unsigned char UCHAR;
220 typedef UCHAR *PUCHAR;
221
222 typedef short SHORT;
223 typedef SHORT *PSHORT;
224
225 typedef unsigned short USHORT;
226 typedef USHORT *PUSHORT;
227
228 typedef long LONG;
229 typedef LONG *PLONG;
230
231 typedef unsigned long ULONG;
232 typedef ULONG *PULONG;
233
234 typedef VOID *PVOID;
235 typedef PVOID *PPVOID;
236
237 typedef __const__ VOID *CPVOID;
238
239 typedef CHAR STR8[8];
240 typedef STR8 *PSTR8;
241
242 typedef CHAR STR16[16];
243 typedef STR16 *PSTR16;
244 typedef CHAR STR32[32];
245 typedef STR32 *PSTR32;
246 typedef CHAR STR64[64];
247 typedef STR64 *PSTR64;
248
249 typedef unsigned short SHANDLE;
250 typedef unsigned long LHANDLE;
251
252 typedef LHANDLE HPIPE;
253 typedef HPIPE *PHPIPE;
254
255 typedef LHANDLE HQUEUE;
256 typedef HQUEUE *PHQUEUE;
257
258 typedef LHANDLE HMODULE;
259 typedef HMODULE *PHMODULE;
260
261 typedef VOID *HSEM;
262 typedef HSEM *PHSEM;
263
264 typedef LHANDLE HOBJECT;
265
266 typedef ULONG PID;
267 typedef PID *PPID;
268
269 typedef ULONG TID;
270 typedef TID *PTID;
271
272 typedef int (*PFN)();
273 typedef PFN *PPFN;
274
275 typedef USHORT SEL;
276 typedef SEL *PSEL;
277
278 typedef ULONG HMTX;
279 typedef HMTX *PHMTX;
280
281 typedef ULONG HMUX;
282 typedef HMUX *PHMUX;
283
284
285 #define FIELDOFFSET(t,f) ((SHORT)&(((t *)0)->f))
286
287 #define MAKETYPE(v,t) (*((t *)&v))
288
289 #define MAKEUSHORT(l,h) (((USHORT)(l)) | ((USHORT)(h))<<8)
290 #define MAKESHORT(l,h) ((SHORT)MAKEUSHORT(l, h))
291
292 #define MAKEULONG(l,h) ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h)))<<16))
293 #define MAKELONG(l,h) ((LONG)MAKEULONG(l, h))
294
295 #define LOUCHAR(w) ((UCHAR)(w))
296 #define HIUCHAR(w) ((UCHAR)((USHORT)(w)>>8))
297
298 #define LOBYTE(x) LOUCHAR(x)
299 #define HIBYTE(x) HIUCHAR(x)
300
301 #define LOUSHORT(x) ((USHORT)((ULONG)(x)))
302 #define HIUSHORT(x) ((USHORT)((ULONG)(x)>>16))
303
304 /* ---------------------------- ERROR CODES ------------------------------- */
305
306 #define WINERR_BASE 0x1000
307 #define GPIERR_BASE 0x2000
308 #define DEVERR_BASE 0x3000
309 #define SPLERR_BASE 0x4000
310
311 #define SEVERITY_NOERROR 0x0000
312 #define SEVERITY_WARNING 0x0004
313 #define SEVERITY_ERROR 0x0008
314 #define SEVERITY_SEVERE 0x000c
315 #define SEVERITY_UNRECOVERABLE 0x0010
316
317 #if defined (INCL_DOSERRORS)
318
319 #define NO_ERROR 0
320 #define ERROR_INVALID_FUNCTION 1
321 #define ERROR_FILE_NOT_FOUND 2
322 #define ERROR_PATH_NOT_FOUND 3
323 #define ERROR_TOO_MANY_OPEN_FILES 4
324 #define ERROR_ACCESS_DENIED 5
325 #define ERROR_INVALID_HANDLE 6
326 #define ERROR_ARENA_TRASHED 7
327 #define ERROR_NOT_ENOUGH_MEMORY 8
328 #define ERROR_INVALID_BLOCK 9
329 #define ERROR_BAD_ENVIRONMENT 10
330 #define ERROR_BAD_FORMAT 11
331 #define ERROR_INVALID_ACCESS 12
332 #define ERROR_INVALID_DATA 13
333 #define ERROR_INVALID_DRIVE 15
334 #define ERROR_CURRENT_DIRECTORY 16
335 #define ERROR_NOT_SAME_DEVICE 17
336 #define ERROR_NO_MORE_FILES 18
337 #define ERROR_WRITE_PROTECT 19
338 #define ERROR_BAD_UNIT 20
339 #define ERROR_NOT_READY 21
340 #define ERROR_BAD_COMMAND 22
341 #define ERROR_CRC 23
342 #define ERROR_BAD_LENGTH 24
343 #define ERROR_SEEK 25
344 #define ERROR_NOT_DOS_DISK 26
345 #define ERROR_SECTOR_NOT_FOUND 27
346 #define ERROR_OUT_OF_PAPER 28
347 #define ERROR_WRITE_FAULT 29
348 #define ERROR_READ_FAULT 30
349 #define ERROR_GEN_FAILURE 31
350 #define ERROR_SHARING_VIOLATION 32
351 #define ERROR_LOCK_VIOLATION 33
352 #define ERROR_WRONG_DISK 34
353 #define ERROR_FCB_UNAVAILABLE 35
354 #define ERROR_SHARING_BUFFER_EXCEEDED 36
355 #define ERROR_CODE_PAGE_MISMATCHED 37
356 #define ERROR_HANDLE_EOF 38
357 #define ERROR_HANDLE_DISK_FULL 39
358 #define ERROR_NOT_SUPPORTED 50
359 #define ERROR_REM_NOT_LIST 51
360 #define ERROR_DUP_NAME 52
361 #define ERROR_BAD_NETPATH 53
362 #define ERROR_NETWORK_BUSY 54
363 #define ERROR_DEV_NOT_EXIST 55
364 #define ERROR_TOO_MANY_CMDS 56
365 #define ERROR_ADAP_HDW_ERR 57
366 #define ERROR_BAD_NET_RESP 58
367 #define ERROR_UNEXP_NET_ERR 59
368 #define ERROR_BAD_REM_ADAP 60
369 #define ERROR_PRINTQ_FULL 61
370 #define ERROR_NO_SPOOL_SPACE 62
371 #define ERROR_PRINT_CANCELLED 63
372 #define ERROR_NETNAME_DELETED 64
373 #define ERROR_NETWORK_ACCESS_DENIED 65
374 #define ERROR_BAD_DEV_TYPE 66
375 #define ERROR_BAD_NET_NAME 67
376 #define ERROR_TOO_MANY_NAMES 68
377 #define ERROR_TOO_MANY_SESS 69
378 #define ERROR_SHARING_PAUSED 70
379 #define ERROR_REQ_NOT_ACCEP 71
380 #define ERROR_REDIR_PAUSED 72
381 #define ERROR_SBCS_ATT_WRITE_PROT 73
382 #define ERROR_SBCS_GENERAL_FAILURE 74
383 #define ERROR_XGA_OUT_MEMORY 75
384 #define ERROR_FILE_EXISTS 80
385 #define ERROR_DUP_FCB 81
386 #define ERROR_CANNOT_MAKE 82
387 #define ERROR_FAIL_I24 83
388 #define ERROR_OUT_OF_STRUCTURES 84
389 #define ERROR_ALREADY_ASSIGNED 85
390 #define ERROR_INVALID_PASSWORD 86
391 #define ERROR_INVALID_PARAMETER 87
392 #define ERROR_NET_WRITE_FAULT 88
393 #define ERROR_NO_PROC_SLOTS 89
394 #define ERROR_NOT_FROZEN 90
395 #define ERROR_SYS_COMP_NOT_LOADED 90 /*!*/
396 #define ERR_TSTOVFL 91
397 #define ERR_TSTDUP 92
398 #define ERROR_NO_ITEMS 93
399 #define ERROR_INTERRUPT 95
400 #define ERROR_DEVICE_IN_USE 99
401 #define ERROR_TOO_MANY_SEMAPHORES 100
402 #define ERROR_EXCL_SEM_ALREADY_OWNED 101
403 #define ERROR_SEM_IS_SET 102
404 #define ERROR_TOO_MANY_SEM_REQUESTS 103
405 #define ERROR_INVALID_AT_INTERRUPT_TIME 104
406 #define ERROR_SEM_OWNER_DIED 105
407 #define ERROR_SEM_USER_LIMIT 106
408 #define ERROR_DISK_CHANGE 107
409 #define ERROR_DRIVE_LOCKED 108
410 #define ERROR_BROKEN_PIPE 109
411 #define ERROR_OPEN_FAILED 110
412 #define ERROR_BUFFER_OVERFLOW 111
413 #define ERROR_DISK_FULL 112
414 #define ERROR_NO_MORE_SEARCH_HANDLES 113
415 #define ERROR_INVALID_TARGET_HANDLE 114
416 #define ERROR_PROTECTION_VIOLATION 115
417 #define ERROR_VIOKBD_REQUEST 116
418 #define ERROR_INVALID_CATEGORY 117
419 #define ERROR_INVALID_VERIFY_SWITCH 118
420 #define ERROR_BAD_DRIVER_LEVEL 119
421 #define ERROR_CALL_NOT_IMPLEMENTED 120
422 #define ERROR_SEM_TIMEOUT 121
423 #define ERROR_INSUFFICIENT_BUFFER 122
424 #define ERROR_INVALID_NAME 123
425 #define ERROR_INVALID_LEVEL 124
426 #define ERROR_NO_VOLUME_LABEL 125
427 #define ERROR_MOD_NOT_FOUND 126
428 #define ERROR_PROC_NOT_FOUND 127
429 #define ERROR_WAIT_NO_CHILDREN 128
430 #define ERROR_CHILD_NOT_COMPLETE 129
431 #define ERROR_DIRECT_ACCESS_HANDLE 130
432 #define ERROR_NEGATIVE_SEEK 131
433 #define ERROR_SEEK_ON_DEVICE 132
434 #define ERROR_IS_JOIN_TARGET 133
435 #define ERROR_IS_JOINED 134
436 #define ERROR_IS_SUBSTED 135
437 #define ERROR_NOT_JOINED 136
438 #define ERROR_NOT_SUBSTED 137
439 #define ERROR_JOIN_TO_JOIN 138
440 #define ERROR_SUBST_TO_SUBST 139
441 #define ERROR_JOIN_TO_SUBST 140
442 #define ERROR_SUBST_TO_JOIN 141
443 #define ERROR_BUSY_DRIVE 142
444 #define ERROR_SAME_DRIVE 143
445 #define ERROR_DIR_NOT_ROOT 144
446 #define ERROR_DIR_NOT_EMPTY 145
447 #define ERROR_IS_SUBST_PATH 146
448 #define ERROR_IS_JOIN_PATH 147
449 #define ERROR_PATH_BUSY 148
450 #define ERROR_IS_SUBST_TARGET 149
451 #define ERROR_SYSTEM_TRACE 150
452 #define ERROR_INVALID_EVENT_COUNT 151
453 #define ERROR_TOO_MANY_MUXWAITERS 152
454 #define ERROR_INVALID_LIST_FORMAT 153
455 #define ERROR_LABEL_TOO_LONG 154
456 #define ERROR_TOO_MANY_TCBS 155
457 #define ERROR_SIGNAL_REFUSED 156
458 #define ERROR_DISCARDED 157
459 #define ERROR_NOT_LOCKED 158
460 #define ERROR_BAD_THREADID_ADDR 159
461 #define ERROR_BAD_ARGUMENTS 160
462 #define ERROR_BAD_PATHNAME 161
463 #define ERROR_SIGNAL_PENDING 162
464 #define ERROR_UNCERTAIN_MEDIA 163
465 #define ERROR_MAX_THRDS_REACHED 164
466 #define ERROR_MONITORS_NOT_SUPPORTED 165
467 #define ERROR_UNC_DRIVER_NOT_INSTALLED 166
468 #define ERROR_LOCK_FAILED 167
469 #define ERROR_SWAPIO_FAILED 168
470 #define ERROR_SWAPIN_FAILED 169
471 #define ERROR_BUSY 170
472 #define ERROR_CANCEL_VIOLATION 173
473 #define ERROR_ATOMIC_LOCK_NOT_SUPPORTED 174
474 #define ERROR_READ_LOCKS_NOT_SUPPORTED 175
475 #define ERROR_INVALID_SEGMENT_NUMBER 180
476 #define ERROR_INVALID_CALLGATE 181
477 #define ERROR_INVALID_ORDINAL 182
478 #define ERROR_ALREADY_EXISTS 183
479 #define ERROR_NO_CHILD_PROCESS 184
480 #define ERROR_CHILD_ALIVE_NOWAIT 185
481 #define ERROR_INVALID_FLAG_NUMBER 186
482 #define ERROR_SEM_NOT_FOUND 187
483 #define ERROR_INVALID_STARTING_CODESEG 188
484 #define ERROR_INVALID_STACKSEG 189
485 #define ERROR_INVALID_MODULETYPE 190
486 #define ERROR_INVALID_EXE_SIGNATURE 191
487 #define ERROR_EXE_MARKED_INVALID 192
488 #define ERROR_BAD_EXE_FORMAT 193
489 #define ERROR_ITERATED_DATA_EXCEEDS_64K 194
490 #define ERROR_INVALID_MINALLOCSIZE 195
491 #define ERROR_DYNLINK_FROM_INVALID_RING 196
492 #define ERROR_IOPL_NOT_ENABLED 197
493 #define ERROR_INVALID_SEGDPL 198
494 #define ERROR_AUTODATASEG_EXCEEDS_64K 199
495 #define ERROR_RING2SEG_MUST_BE_MOVABLE 200
496 #define ERROR_RELOCSRC_CHAIN_EXCEEDS_SEGLIMIT 201
497 #define ERROR_INFLOOP_IN_RELOC_CHAIN 202
498 #define ERROR_ENVVAR_NOT_FOUND 203
499 #define ERROR_NOT_CURRENT_CTRY 204
500 #define ERROR_NO_SIGNAL_SENT 205
501 #define ERROR_FILENAME_EXCED_RANGE 206
502 #define ERROR_RING2_STACK_IN_USE 207
503 #define ERROR_META_EXPANSION_TOO_LONG 208
504 #define ERROR_INVALID_SIGNAL_NUMBER 209
505 #define ERROR_THREAD_1_INACTIVE 210
506 #define ERROR_INFO_NOT_AVAIL 211
507 #define ERROR_LOCKED 212
508 #define ERROR_BAD_DYNALINK 213
509 #define ERROR_TOO_MANY_MODULES 214
510 #define ERROR_NESTING_NOT_ALLOWED 215
511 #define ERROR_CANNOT_SHRINK 216
512 #define ERROR_ZOMBIE_PROCESS 217
513 #define ERROR_STACK_IN_HIGH_MEMORY 218
514 #define ERROR_INVALID_EXITROUTINE_RING 219
515 #define ERROR_GETBUF_FAILED 220
516 #define ERROR_FLUSHBUF_FAILED 221
517 #define ERROR_TRANSFER_TOO_LONG 222
518 #define ERROR_FORCENOSWAP_FAILED 223
519 #define ERROR_SMG_NO_TARGET_WINDOW 224
520 #define ERROR_NO_CHILDREN 228
521 #define ERROR_INVALID_SCREEN_GROUP 229
522 #define ERROR_BAD_PIPE 230
523 #define ERROR_PIPE_BUSY 231
524 #define ERROR_NO_DATA 232
525 #define ERROR_PIPE_NOT_CONNECTED 233
526 #define ERROR_MORE_DATA 234
527 #define ERROR_VC_DISCONNECTED 240
528 #define ERROR_CIRCULARITY_REQUESTED 250
529 #define ERROR_DIRECTORY_IN_CDS 251
530 #define ERROR_INVALID_FSD_NAME 252
531 #define ERROR_INVALID_PATH 253
532 #define ERROR_INVALID_EA_NAME 254
533 #define ERROR_EA_LIST_INCONSISTENT 255
534 #define ERROR_EA_LIST_TOO_LONG 256
535 #define ERROR_NO_META_MATCH 257
536 #define ERROR_FINDNOTIFY_TIMEOUT 258
537 #define ERROR_NO_MORE_ITEMS 259
538 #define ERROR_SEARCH_STRUC_REUSED 260
539 #define ERROR_CHAR_NOT_FOUND 261
540 #define ERROR_TOO_MUCH_STACK 262
541 #define ERROR_INVALID_ATTR 263
542 #define ERROR_INVALID_STARTING_RING 264
543 #define ERROR_INVALID_DLL_INIT_RING 265
544 #define ERROR_CANNOT_COPY 266
545 #define ERROR_DIRECTORY 267
546 #define ERROR_OPLOCKED_FILE 268
547 #define ERROR_OPLOCK_THREAD_EXISTS 269
548 #define ERROR_VOLUME_CHANGED 270
549 #define ERROR_FINDNOTIFY_HANDLE_IN_USE 271
550 #define ERROR_FINDNOTIFY_HANDLE_CLOSED 272
551 #define ERROR_NOTIFY_OBJECT_REMOVED 273
552 #define ERROR_ALREADY_SHUTDOWN 274
553 #define ERROR_EAS_DIDNT_FIT 275
554 #define ERROR_EA_FILE_CORRUPT 276
555 #define ERROR_EA_TABLE_FULL 277
556 #define ERROR_INVALID_EA_HANDLE 278
557 #define ERROR_NO_CLUSTER 279
558 #define ERROR_CREATE_EA_FILE 280
559 #define ERROR_CANNOT_OPEN_EA_FILE 281
560 #define ERROR_EAS_NOT_SUPPORTED 282
561 #define ERROR_NEED_EAS_FOUND 283
562 #define ERROR_DUPLICATE_HANDLE 284
563 #define ERROR_DUPLICATE_NAME 285
564 #define ERROR_EMPTY_MUXWAIT 286
565 #define ERROR_MUTEX_OWNED 287
566 #define ERROR_NOT_OWNER 288
567 #define ERROR_PARAM_TOO_SMALL 289
568 #define ERROR_TOO_MANY_HANDLES 290
569 #define ERROR_TOO_MANY_OPENS 291
570 #define ERROR_WRONG_TYPE 292
571 #define ERROR_UNUSED_CODE 293
572 #define ERROR_THREAD_NOT_TERMINATED 294
573 #define ERROR_INIT_ROUTINE_FAILED 295
574 #define ERROR_MODULE_IN_USE 296
575 #define ERROR_NOT_ENOUGH_WATCHPOINTS 297
576 #define ERROR_TOO_MANY_POSTS 298
577 #define ERROR_ALREADY_POSTED 299
578 #define ERROR_ALREADY_RESET 300
579 #define ERROR_SEM_BUSY 301
580 #define ERROR_INVALID_PROCID 303
581 #define ERROR_INVALID_PDELTA 304
582 #define ERROR_NOT_DESCENDANT 305
583 #define ERROR_NOT_SESSION_MANAGER 306
584 #define ERROR_INVALID_PCLASS 307
585 #define ERROR_INVALID_SCOPE 308
586 #define ERROR_INVALID_THREADID 309
587 #define ERROR_DOSSUB_SHRINK 310
588 #define ERROR_DOSSUB_NOMEM 311
589 #define ERROR_DOSSUB_OVERLAP 312
590 #define ERROR_DOSSUB_BADSIZE 313
591 #define ERROR_DOSSUB_BADFLAG 314
592 #define ERROR_DOSSUB_BADSELECTOR 315
593 #define ERROR_MR_MSG_TOO_LONG 316
594 #define ERROR_MR_MID_NOT_FOUND 317
595 #define ERROR_MR_UN_ACC_MSGF 318
596 #define ERROR_MR_INV_MSGF_FORMAT 319
597 #define ERROR_MR_INV_IVCOUNT 320
598 #define ERROR_MR_UN_PERFORM 321
599 #define ERROR_TS_WAKEUP 322
600 #define ERROR_TS_SEMHANDLE 323
601 #define ERROR_TS_NOTIMER 324
602 #define ERROR_TS_HANDLE 326
603 #define ERROR_TS_DATETIME 327
604 #define ERROR_SYS_INTERNAL 328
605 #define ERROR_QUE_CURRENT_NAME 329
606 #define ERROR_QUE_PROC_NOT_OWNED 330
607 #define ERROR_QUE_PROC_OWNED 331
608 #define ERROR_QUE_DUPLICATE 332
609 #define ERROR_QUE_ELEMENT_NOT_EXIST 333
610 #define ERROR_QUE_NO_MEMORY 334
611 #define ERROR_QUE_INVALID_NAME 335
612 #define ERROR_QUE_INVALID_PRIORITY 336
613 #define ERROR_QUE_INVALID_HANDLE 337
614 #define ERROR_QUE_LINK_NOT_FOUND 338
615 #define ERROR_QUE_MEMORY_ERROR 339
616 #define ERROR_QUE_PREV_AT_END 340
617 #define ERROR_QUE_PROC_NO_ACCESS 341
618 #define ERROR_QUE_EMPTY 342
619 #define ERROR_QUE_NAME_NOT_EXIST 343
620 #define ERROR_QUE_NOT_INITIALIZED 344
621 #define ERROR_QUE_UNABLE_TO_ACCESS 345
622 #define ERROR_QUE_UNABLE_TO_ADD 346
623 #define ERROR_QUE_UNABLE_TO_INIT 347
624 #define ERROR_VIO_INVALID_MASK 349
625 #define ERROR_VIO_PTR 350
626 #define ERROR_VIO_APTR 351
627 #define ERROR_VIO_RPTR 352
628 #define ERROR_VIO_CPTR 353
629 #define ERROR_VIO_LPTR 354
630 #define ERROR_VIO_MODE 355
631 #define ERROR_VIO_WIDTH 356
632 #define ERROR_VIO_ATTR 357
633 #define ERROR_VIO_ROW 358
634 #define ERROR_VIO_COL 359
635 #define ERROR_VIO_TOPROW 360
636 #define ERROR_VIO_BOTROW 361
637 #define ERROR_VIO_RIGHTCOL 362
638 #define ERROR_VIO_LEFTCOL 363
639 #define ERROR_SCS_CALL 364
640 #define ERROR_SCS_VALUE 365
641 #define ERROR_VIO_WAIT_FLAG 366
642 #define ERROR_VIO_UNLOCK 367
643 #define ERROR_SGS_NOT_SESSION_MGR 368
644 #define ERROR_SMG_INVALID_SGID 369
645 #define ERROR_SMG_INVALID_SESSION_ID 369 /*!*/
646 #define ERROR_SMG_NOSG 370
647 #define ERROR_SMG_NO_SESSIONS 370 /*!*/
648 #define ERROR_SMG_GRP_NOT_FOUND 371
649 #define ERROR_SMG_SESSION_NOT_FOUND 371 /*!*/
650 #define ERROR_SMG_SET_TITLE 372
651 #define ERROR_KBD_PARAMETER 373
652 #define ERROR_KBD_NO_DEVICE 374
653 #define ERROR_KBD_INVALID_IOWAIT 375
654 #define ERROR_KBD_INVALID_LENGTH 376
655 #define ERROR_KBD_INVALID_ECHO_MASK 377
656 #define ERROR_KBD_INVALID_INPUT_MASK 378
657 #define ERROR_MON_INVALID_PARMS 379
658 #define ERROR_MON_INVALID_DEVNAME 380
659 #define ERROR_MON_INVALID_HANDLE 381
660 #define ERROR_MON_BUFFER_TOO_SMALL 382
661 #define ERROR_MON_BUFFER_EMPTY 383
662 #define ERROR_MON_DATA_TOO_LARGE 384
663 #define ERROR_MOUSE_NO_DEVICE 385
664 #define ERROR_MOUSE_INV_HANDLE 386
665 #define ERROR_MOUSE_INV_PARMS 387
666 #define ERROR_MOUSE_CANT_RESET 388
667 #define ERROR_MOUSE_DISPLAY_PARMS 389
668 #define ERROR_MOUSE_INV_MODULE 390
669 #define ERROR_MOUSE_INV_ENTRY_PT 391
670 #define ERROR_MOUSE_INV_MASK 392
671 #define NO_ERROR_MOUSE_NO_DATA 393
672 #define NO_ERROR_MOUSE_PTR_DRAWN 394
673 #define ERROR_INVALID_FREQUENCY 395
674 #define ERROR_NLS_NO_COUNTRY_FILE 396
675 #define ERROR_NLS_OPEN_FAILED 397
676 #define ERROR_NLS_NO_CTRY_CODE 398
677 #define ERROR_NLS_TABLE_TRUNCATED 399
678 #define ERROR_NLS_BAD_TYPE 400
679 #define ERROR_NLS_TYPE_NOT_FOUND 401
680 #define ERROR_VIO_SMG_ONLY 402
681 #define ERROR_VIO_INVALID_ASCIIZ 403
682 #define ERROR_VIO_DEREGISTER 404
683 #define ERROR_VIO_NO_POPUP 405
684 #define ERROR_VIO_EXISTING_POPUP 406
685 #define ERROR_KBD_SMG_ONLY 407
686 #define ERROR_KBD_INVALID_ASCIIZ 408
687 #define ERROR_KBD_INVALID_MASK 409
688 #define ERROR_KBD_REGISTER 410
689 #define ERROR_KBD_DEREGISTER 411
690 #define ERROR_MOUSE_SMG_ONLY 412
691 #define ERROR_MOUSE_INVALID_ASCIIZ 413
692 #define ERROR_MOUSE_INVALID_MASK 414
693 #define ERROR_MOUSE_REGISTER 415
694 #define ERROR_MOUSE_DEREGISTER 416
695 #define ERROR_SMG_BAD_ACTION 417
696 #define ERROR_SMG_INVALID_CALL 418
697 #define ERROR_SCS_SG_NOTFOUND 419
698 #define ERROR_SCS_NOT_SHELL 420
699 #define ERROR_VIO_INVALID_PARMS 421
700 #define ERROR_VIO_FUNCTION_OWNED 422
701 #define ERROR_VIO_RETURN 423
702 #define ERROR_SCS_INVALID_FUNCTION 424
703 #define ERROR_SCS_NOT_SESSION_MGR 425
704 #define ERROR_VIO_REGISTER 426
705 #define ERROR_VIO_NO_MODE_THREAD 427
706 #define ERROR_VIO_NO_SAVE_RESTORE_THD 428
707 #define ERROR_VIO_IN_BG 429
708 #define ERROR_VIO_ILLEGAL_DURING_POPUP 430
709 #define ERROR_SMG_NOT_BASESHELL 431
710 #define ERROR_SMG_BAD_STATUSREQ 432
711 #define ERROR_QUE_INVALID_WAIT 433
712 #define ERROR_VIO_LOCK 434
713 #define ERROR_MOUSE_INVALID_IOWAIT 435
714 #define ERROR_VIO_INVALID_HANDLE 436
715 #define ERROR_VIO_ILLEGAL_DURING_LOCK 437
716 #define ERROR_VIO_INVALID_LENGTH 438
717 #define ERROR_KBD_INVALID_HANDLE 439
718 #define ERROR_KBD_NO_MORE_HANDLE 440
719 #define ERROR_KBD_CANNOT_CREATE_KCB 441
720 #define ERROR_KBD_CODEPAGE_LOAD_INCOMPL 442
721 #define ERROR_KBD_INVALID_CODEPAGE_ID 443
722 #define ERROR_KBD_NO_CODEPAGE_SUPPORT 444
723 #define ERROR_KBD_FOCUS_REQUIRED 445
724 #define ERROR_KBD_FOCUS_ALREADY_ACTIVE 446
725 #define ERROR_KBD_KEYBOARD_BUSY 447
726 #define ERROR_KBD_INVALID_CODEPAGE 448
727 #define ERROR_KBD_UNABLE_TO_FOCUS 449
728 #define ERROR_SMG_SESSION_NON_SELECT 450
729 #define ERROR_SMG_SESSION_NOT_FOREGRND 451
730 #define ERROR_SMG_SESSION_NOT_PARENT 452
731 #define ERROR_SMG_INVALID_START_MODE 453
732 #define ERROR_SMG_INVALID_RELATED_OPT 454
733 #define ERROR_SMG_INVALID_BOND_OPTION 455
734 #define ERROR_SMG_INVALID_SELECT_OPT 456
735 #define ERROR_SMG_START_IN_BACKGROUND 457
736 #define ERROR_SMG_INVALID_STOP_OPTION 458
737 #define ERROR_SMG_BAD_RESERVE 459
738 #define ERROR_SMG_PROCESS_NOT_PARENT 460
739 #define ERROR_SMG_INVALID_DATA_LENGTH 461
740 #define ERROR_SMG_NOT_BOUND 462
741 #define ERROR_SMG_RETRY_SUB_ALLOC 463
742 #define ERROR_KBD_DETACHED 464
743 #define ERROR_VIO_DETACHED 465
744 #define ERROR_MOU_DETACHED 466
745 #define ERROR_VIO_FONT 467
746 #define ERROR_VIO_USER_FONT 468
747 #define ERROR_VIO_BAD_CP 469
748 #define ERROR_VIO_NO_CP 470
749 #define ERROR_VIO_NA_CP 471
750 #define ERROR_INVALID_CODE_PAGE 472
751 #define ERROR_CPLIST_TOO_SMALL 473
752 #define ERROR_CP_NOT_MOVED 474
753 #define ERROR_MODE_SWITCH_INIT 475
754 #define ERROR_CODE_PAGE_NOT_FOUND 476
755 #define ERROR_UNEXPECTED_SLOT_RETURNED 477
756 #define ERROR_SMG_INVALID_TRACE_OPTION 478
757 #define ERROR_VIO_INTERNAL_RESOURCE 479
758 #define ERROR_VIO_SHELL_INIT 480
759 #define ERROR_SMG_NO_HARD_ERRORS 481
760 #define ERROR_CP_SWITCH_INCOMPLETE 482
761 #define ERROR_VIO_TRANSPARENT_POPUP 483
762 #define ERROR_CRITSEC_OVERFLOW 484
763 #define ERROR_CRITSEC_UNDERFLOW 485
764 #define ERROR_VIO_BAD_RESERVE 486
765 #define ERROR_INVALID_ADDRESS 487
766 #define ERROR_ZERO_SELECTORS_REQUESTED 488
767 #define ERROR_NOT_ENOUGH_SELECTORS_AVA 489
768 #define ERROR_INVALID_SELECTOR 490
769 #define ERROR_SMG_INVALID_PROGRAM_TYPE 491
770 #define ERROR_SMG_INVALID_PGM_CONTROL 492
771 #define ERROR_SMG_INVALID_INHERIT_OPT 493
772 #define ERROR_VIO_EXTENDED_SG 494
773 #define ERROR_VIO_NOT_PRES_MGR_SG 495
774 #define ERROR_VIO_SHIELD_OWNED 496
775 #define ERROR_VIO_NO_MORE_HANDLES 497
776 #define ERROR_VIO_SEE_ERROR_LOG 498
777 #define ERROR_VIO_ASSOCIATED_DC 499
778 #define ERROR_KBD_NO_CONSOLE 500
779 #define ERROR_MOUSE_NO_CONSOLE 501
780 #define ERROR_MOUSE_INVALID_HANDLE 502
781 #define ERROR_SMG_INVALID_DEBUG_PARMS 503
782 #define ERROR_KBD_EXTENDED_SG 504
783 #define ERROR_MOU_EXTENDED_SG 505
784 #define ERROR_SMG_INVALID_ICON_FILE 506
785 #define ERROR_TRC_PID_NON_EXISTENT 507
786 #define ERROR_TRC_COUNT_ACTIVE 508
787 #define ERROR_TRC_SUSPENDED_BY_COUNT 509
788 #define ERROR_TRC_COUNT_INACTIVE 510
789 #define ERROR_TRC_COUNT_REACHED 511
790 #define ERROR_NO_MC_TRACE 512
791 #define ERROR_MC_TRACE 513
792 #define ERROR_TRC_COUNT_ZERO 514
793 #define ERROR_SMG_TOO_MANY_DDS 515
794 #define ERROR_SMG_INVALID_NOTIFICATION 516
795 #define ERROR_LF_INVALID_FUNCTION 517
796 #define ERROR_LF_NOT_AVAIL 518
797 #define ERROR_LF_SUSPENDED 519
798 #define ERROR_LF_BUF_TOO_SMALL 520
799 #define ERROR_LF_BUFFER_CORRUPTED 521
800 #define ERROR_LF_BUFFER_FULL 521 /*!*/
801 #define ERROR_LF_INVALID_DAEMON 522
802 #define ERROR_LF_INVALID_RECORD 522 /*!*/
803 #define ERROR_LF_INVALID_TEMPL 523
804 #define ERROR_LF_INVALID_SERVICE 523 /*!*/
805 #define ERROR_LF_GENERAL_FAILURE 524
806 #define ERROR_LF_INVALID_ID 525
807 #define ERROR_LF_INVALID_HANDLE 526
808 #define ERROR_LF_NO_ID_AVAIL 527
809 #define ERROR_LF_TEMPLATE_AREA_FULL 528
810 #define ERROR_LF_ID_IN_USE 529
811 #define ERROR_MOU_NOT_INITIALIZED 530
812 #define ERROR_MOUINITREAL_DONE 531
813 #define ERROR_DOSSUB_CORRUPTED 532
814 #define ERROR_MOUSE_CALLER_NOT_SUBSYS 533
815 #define ERROR_ARITHMETIC_OVERFLOW 534
816 #define ERROR_TMR_NO_DEVICE 535
817 #define ERROR_TMR_INVALID_TIME 536
818 #define ERROR_PVW_INVALID_ENTITY 537
819 #define ERROR_PVW_INVALID_ENTITY_TYPE 538
820 #define ERROR_PVW_INVALID_SPEC 539
821 #define ERROR_PVW_INVALID_RANGE_TYPE 540
822 #define ERROR_PVW_INVALID_COUNTER_BLK 541
823 #define ERROR_PVW_INVALID_TEXT_BLK 542
824 #define ERROR_PRF_NOT_INITIALIZED 543
825 #define ERROR_PRF_ALREADY_INITIALIZED 544
826 #define ERROR_PRF_NOT_STARTED 545
827 #define ERROR_PRF_ALREADY_STARTED 546
828 #define ERROR_PRF_TIMER_OUT_OF_RANGE 547
829 #define ERROR_PRF_TIMER_RESET 548
830 #define ERROR_VDD_LOCK_USEAGE_DENIED 639
831 #define ERROR_TIMEOUT 640
832 #define ERROR_VDM_DOWN 641
833 #define ERROR_VDM_LIMIT 642
834 #define ERROR_VDD_NOT_FOUND 643
835 #define ERROR_INVALID_CALLER 644
836 #define ERROR_PID_MISMATCH 645
837 #define ERROR_INVALID_VDD_HANDLE 646
838 #define ERROR_VLPT_NO_SPOOLER 647
839 #define ERROR_VCOM_DEVICE_BUSY 648
840 #define ERROR_VLPT_DEVICE_BUSY 649
841 #define ERROR_NESTING_TOO_DEEP 650
842 #define ERROR_VDD_MISSING 651
843 #define ERROR_BIDI_INVALID_LENGTH 671
844 #define ERROR_BIDI_INVALID_INCREMENT 672
845 #define ERROR_BIDI_INVALID_COMBINATION 673
846 #define ERROR_BIDI_INVALID_RESERVED 674
847 #define ERROR_BIDI_INVALID_EFFECT 675
848 #define ERROR_BIDI_INVALID_CSDREC 676
849 #define ERROR_BIDI_INVALID_CSDSTATE 677
850 #define ERROR_BIDI_INVALID_LEVEL 678
851 #define ERROR_BIDI_INVALID_TYPE_SUPPORT 679
852 #define ERROR_BIDI_INVALID_ORIENTATION 680
853 #define ERROR_BIDI_INVALID_NUM_SHAPE 681
854 #define ERROR_BIDI_INVALID_CSD 682
855 #define ERROR_BIDI_NO_SUPPORT 683
856 #define NO_ERROR_BIDI_RW_INCOMPLETE 684
857 #define ERROR_IMP_INVALID_PARM 691
858 #define ERROR_IMP_INVALID_LENGTH 692
859 #define ERROR_MON_BAD_BUFFER 730
860 #define ERROR_MODULE_CORRUPTED 731
861 #define ERROR_SM_OUTOF_SWAPFILE 1477
862 #define ERROR_LF_TIMEOUT 2055
863 #define ERROR_LF_SUSPEND_SUCCESS 2057
864 #define ERROR_LF_RESUME_SUCCESS 2058
865 #define ERROR_LF_REDIRECT_SUCCESS 2059
866 #define ERROR_LF_REDIRECT_FAILURE 2060
867 #define ERROR_SWAPPER_NOT_ACTIVE 32768
868 #define ERROR_INVALID_SWAPID 32769
869 #define ERROR_IOERR_SWAP_FILE 32770
870 #define ERROR_SWAP_TABLE_FULL 32771
871 #define ERROR_SWAP_FILE_FULL 32772
872 #define ERROR_CANT_INIT_SWAPPER 32773
873 #define ERROR_SWAPPER_ALREADY_INIT 32774
874 #define ERROR_PMM_INSUFFICIENT_MEMORY 32775
875 #define ERROR_PMM_INVALID_FLAGS 32776
876 #define ERROR_PMM_INVALID_ADDRESS 32777
877 #define ERROR_PMM_LOCK_FAILED 32778
878 #define ERROR_PMM_UNLOCK_FAILED 32779
879 #define ERROR_PMM_MOVE_INCOMPLETE 32780
880 #define ERROR_UCOM_DRIVE_RENAMED 32781
881 #define ERROR_UCOM_FILENAME_TRUNCATED 32782
882 #define ERROR_UCOM_BUFFER_LENGTH 32783
883 #define ERROR_MON_CHAIN_HANDLE 32784
884 #define ERROR_MON_NOT_REGISTERED 32785
885 #define ERROR_SMG_ALREADY_TOP 32786
886 #define ERROR_PMM_ARENA_MODIFIED 32787
887 #define ERROR_SMG_PRINTER_OPEN 32788
888 #define ERROR_PMM_SET_FLAGS_FAILED 32789
889 #define ERROR_INVALID_DOS_DD 32790
890 #define ERROR_BLOCKED 32791
891 #define ERROR_NOBLOCK 32792
892 #define ERROR_INSTANCE_SHARED 32793
893 #define ERROR_NO_OBJECT 32794
894 #define ERROR_PARTIAL_ATTACH 32795
895 #define ERROR_INCACHE 32796
896 #define ERROR_SWAP_IO_PROBLEMS 32797
897 #define ERROR_CROSSES_OBJECT_BOUNDARY 32798
898 #define ERROR_LONGLOCK 32799
899 #define ERROR_SHORTLOCK 32800
900 #define ERROR_UVIRTLOCK 32801
901 #define ERROR_ALIASLOCK 32802
902 #define ERROR_ALIAS 32803
903 #define ERROR_NO_MORE_HANDLES 32804
904 #define ERROR_SCAN_TERMINATED 32805
905 #define ERROR_TERMINATOR_NOT_FOUND 32806
906 #define ERROR_NOT_DIRECT_CHILD 32807
907 #define ERROR_DELAY_FREE 32808
908 #define ERROR_GUARDPAGE 32809
909 #define ERROR_SWAPERROR 32900
910 #define ERROR_LDRERROR 32901
911 #define ERROR_NOMEMORY 32902
912 #define ERROR_NOACCESS 32903
913 #define ERROR_NO_DLL_TERM 32904
914 #define ERROR_CPSIO_CODE_PAGE_INVALID 65026
915 #define ERROR_CPSIO_NO_SPOOLER 65027
916 #define ERROR_CPSIO_FONT_ID_INVALID 65028
917 #define ERROR_CPSIO_INTERNAL_ERROR 65033
918 #define ERROR_CPSIO_INVALID_PTR_NAME 65034
919 #define ERROR_CPSIO_NOT_ACTIVE 65037
920 #define ERROR_CPSIO_PID_FULL 65039
921 #define ERROR_CPSIO_PID_NOT_FOUND 65040
922 #define ERROR_CPSIO_READ_CTL_SEQ 65043
923 #define ERROR_CPSIO_READ_FNT_DEF 65045
924 #define ERROR_CPSIO_WRITE_ERROR 65047
925 #define ERROR_CPSIO_WRITE_FULL_ERROR 65048
926 #define ERROR_CPSIO_WRITE_HANDLE_BAD 65049
927 #define ERROR_CPSIO_SWIT_LOAD 65074
928 #define ERROR_CPSIO_INV_COMMAND 65077
929 #define ERROR_CPSIO_NO_FONT_SWIT 65078
930 #define ERROR_ENTRY_IS_CALLGATE 65079
931
932 #endif /* INCL_DOSERRORS */
933
934 /* ----------------------------- ERRORS ----------------------------------- */
935
936 #if defined (INCL_DOSERRORS)
937
938 #define ERRACT_RETRY 1
939 #define ERRACT_DLYRET 2
940 #define ERRACT_USER 3
941 #define ERRACT_ABORT 4
942 #define ERRACT_PANIC 5
943 #define ERRACT_IGNORE 6
944 #define ERRACT_INTRET 7
945
946 #define ERRCLASS_OUTRES 1
947 #define ERRCLASS_TEMPSIT 2
948 #define ERRCLASS_AUTH 3
949 #define ERRCLASS_INTRN 4
950 #define ERRCLASS_HRDFAIL 5
951 #define ERRCLASS_SYSFAIL 6
952 #define ERRCLASS_APPERR 7
953 #define ERRCLASS_NOTFND 8
954 #define ERRCLASS_BADFMT 9
955 #define ERRCLASS_LOCKED 10
956 #define ERRCLASS_MEDIA 11
957 #define ERRCLASS_ALREADY 12
958 #define ERRCLASS_UNK 13
959 #define ERRCLASS_CANT 14
960 #define ERRCLASS_TIME 15
961
962 #define ERRLOC_UNK 1
963 #define ERRLOC_DISK 2
964 #define ERRLOC_NET 3
965 #define ERRLOC_SERDEV 4
966 #define ERRLOC_MEM 5
967
968 #endif /* INCL_DOSERRORS */
969
970 #if defined (INCL_DOSMISC)
971
972 #define FERR_DISABLEHARDERR 0x0000L
973 #define FERR_ENABLEHARDERR 0x0001L
974 #define FERR_ENABLEEXCEPTION 0x0000L
975 #define FERR_DISABLEEXCEPTION 0x0002L
976
977 #define BEGIN_LIBPATH 1
978 #define END_LIBPATH 2
979
980 ULONG DosErrClass (ULONG ulCode, PULONG pulClass, PULONG pulAction,
981 PULONG pulLocus);
982 ULONG DosError (ULONG ulError);
983 ULONG DosQueryExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
984 ULONG DosSetExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
985
986 #endif /* INCL_DOSMISC */
987
988 /* ----------------------------- FONTS ------------------------------------ */
989
990 #define FACESIZE 32
991
992 #define FATTR_SEL_ITALIC 0x0001
993 #define FATTR_SEL_UNDERSCORE 0x0002
994 #define FATTR_SEL_OUTLINE 0x0008
995 #define FATTR_SEL_STRIKEOUT 0x0010
996 #define FATTR_SEL_BOLD 0x0020
997
998 #define FATTR_TYPE_KERNING 0x0004
999 #define FATTR_TYPE_MBCS 0x0008
1000 #define FATTR_TYPE_DBCS 0x0010
1001 #define FATTR_TYPE_ANTIALIASED 0x0020
1002
1003 #define FATTR_FONTUSE_NOMIX 0x0002
1004 #define FATTR_FONTUSE_OUTLINE 0x0004
1005 #define FATTR_FONTUSE_TRANSFORMABLE 0x0008
1006
1007 #define FM_TYPE_FIXED 0x0001
1008 #define FM_TYPE_LICENSED 0x0002
1009 #define FM_TYPE_KERNING 0x0004
1010 #define FM_TYPE_DBCS 0x0010
1011 #define FM_TYPE_MBCS 0x0018
1012 #define FM_TYPE_64K 0x8000
1013 #define FM_TYPE_ATOMS 0x4000
1014 #define FM_TYPE_FAMTRUNC 0x2000
1015 #define FM_TYPE_FACETRUNC 0x1000
1016
1017 #define FM_DEFN_OUTLINE 0x0001
1018 #define FM_DEFN_IFI 0x0002
1019 #define FM_DEFN_WIN 0x0004
1020 #define FM_DEFN_GENERIC 0x8000
1021
1022 #define FM_SEL_ITALIC 0x0001
1023 #define FM_SEL_UNDERSCORE 0x0002
1024 #define FM_SEL_NEGATIVE 0x0004
1025 #define FM_SEL_OUTLINE 0x0008
1026 #define FM_SEL_STRIKEOUT 0x0010
1027 #define FM_SEL_BOLD 0x0020
1028 #define FM_SEL_ISO9241_TESTED 0x0040
1029
1030 #define FM_CAP_NOMIX 0x0001
1031
1032 #define FM_ISO_9518_640 0x01
1033 #define FM_ISO_9515_640 0x02
1034 #define FM_ISO_9515_1024 0x04
1035 #define FM_ISO_9517_640 0x08
1036 #define FM_ISO_9517_1024 0x10
1037
1038
1039 typedef struct _PANOSE
1040 {
1041 BYTE bFamilyType;
1042 BYTE bSerifStyle;
1043 BYTE bWeight;
1044 BYTE bProportion;
1045 BYTE bContrast;
1046 BYTE bStrokeVariation;
1047 BYTE bArmStyle;
1048 BYTE bLetterform;
1049 BYTE bMidline;
1050 BYTE bXHeight;
1051 BYTE fbPassedISO;
1052 BYTE fbFailedISO;
1053 } PANOSE;
1054
1055 typedef struct _FONTMETRICS
1056 {
1057 CHAR szFamilyname[FACESIZE];
1058 CHAR szFacename[FACESIZE];
1059 USHORT idRegistry;
1060 USHORT usCodePage;
1061 LONG lEmHeight;
1062 LONG lXHeight;
1063 LONG lMaxAscender;
1064 LONG lMaxDescender;
1065 LONG lLowerCaseAscent;
1066 LONG lLowerCaseDescent;
1067 LONG lInternalLeading;
1068 LONG lExternalLeading;
1069 LONG lAveCharWidth;
1070 LONG lMaxCharInc;
1071 LONG lEmInc;
1072 LONG lMaxBaselineExt;
1073 SHORT sCharSlope;
1074 SHORT sInlineDir;
1075 SHORT sCharRot;
1076 USHORT usWeightClass;
1077 USHORT usWidthClass;
1078 SHORT sXDeviceRes;
1079 SHORT sYDeviceRes;
1080 SHORT sFirstChar;
1081 SHORT sLastChar;
1082 SHORT sDefaultChar;
1083 SHORT sBreakChar;
1084 SHORT sNominalPointSize;
1085 SHORT sMinimumPointSize;
1086 SHORT sMaximumPointSize;
1087 USHORT fsType;
1088 USHORT fsDefn;
1089 USHORT fsSelection;
1090 USHORT fsCapabilities;
1091 LONG lSubscriptXSize;
1092 LONG lSubscriptYSize;
1093 LONG lSubscriptXOffset;
1094 LONG lSubscriptYOffset;
1095 LONG lSuperscriptXSize;
1096 LONG lSuperscriptYSize;
1097 LONG lSuperscriptXOffset;
1098 LONG lSuperscriptYOffset;
1099 LONG lUnderscoreSize;
1100 LONG lUnderscorePosition;
1101 LONG lStrikeoutSize;
1102 LONG lStrikeoutPosition;
1103 SHORT sKerningPairs;
1104 SHORT sFamilyClass;
1105 LONG lMatch;
1106 LONG FamilyNameAtom;
1107 LONG FaceNameAtom;
1108 PANOSE panose;
1109 } FONTMETRICS;
1110 typedef FONTMETRICS *PFONTMETRICS;
1111
1112 typedef struct _FATTRS
1113 {
1114 USHORT usRecordLength;
1115 USHORT fsSelection;
1116 LONG lMatch;
1117 CHAR szFacename[FACESIZE];
1118 USHORT idRegistry;
1119 USHORT usCodePage;
1120 LONG lMaxBaselineExt;
1121 LONG lAveCharWidth;
1122 USHORT fsType;
1123 USHORT fsFontUse;
1124 } FATTRS;
1125 typedef FATTRS *PFATTRS;
1126
1127 /* ------------------------- MEMORY MANAGEMENT ---------------------------- */
1128
1129 #if defined (INCL_DOSMEMMGR) || !defined (INCL_NOCOMMON)
1130
1131 #define PAG_READ 0x0001
1132 #define PAG_WRITE 0x0002
1133 #define PAG_EXECUTE 0x0004
1134 #define PAG_GUARD 0x0008
1135 #define PAG_COMMIT 0x0010
1136 #define PAG_DECOMMIT 0x0020
1137 #define OBJ_TILE 0x0040
1138 #define OBJ_PROTECTED 0x0080
1139 #define OBJ_GETTABLE 0x0100
1140 #define OBJ_GIVEABLE 0x0200
1141 #define PAG_DEFAULT 0x0400
1142 #define PAG_SHARED 0x2000
1143 #define PAG_FREE 0x4000
1144 #define PAG_BASE 0x00010000
1145
1146 #define DOSSUB_INIT 0x0001
1147 #define DOSSUB_GROW 0x0002
1148 #define DOSSUB_SPARSE_OBJ 0x0004
1149 #define DOSSUB_SERIALIZE 0x0008
1150
1151 #define fPERM (PAG_EXECUTE | PAG_READ | PAG_WRITE)
1152 #define fSHARE (OBJ_GETTABLE | OBJ_GIVEABLE)
1153 #define fALLOC (fPERM | OBJ_TILE | PAG_COMMIT)
1154 #define fALLOCSHR (fPERM | fSHARE | OBJ_TILE | PAG_COMMIT)
1155 #define fGETNMSHR (fPERM)
1156 #define fGETSHR (fPERM)
1157 #define fGIVESHR (fPERM)
1158 #define fSET (fPERM|PAG_COMMIT|PAG_DECOMMIT|PAG_DEFAULT)
1159
1160 ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize,
1161 ULONG ulAllocationFlags);
1162 ULONG DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName,
1163 ULONG ulObjectSize, ULONG ulAllocationFlags);
1164 ULONG DosFreeMem (PVOID pBaseAddress);
1165 ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName,
1166 ULONG ulAttributeFlags);
1167 ULONG DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags);
1168 ULONG DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId,
1169 ULONG ulAttributeFlags);
1170 ULONG DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize,
1171 PULONG pulAllocationFlags);
1172 ULONG DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize,
1173 ULONG ulAttributeFlags);
1174 ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize);
1175 ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize);
1176 ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize);
1177 ULONG DosSubUnsetMem (PVOID pOffset);
1178
1179 #endif /* INCL_DOSMEMMGR || !INCL_NOCOMMON */
1180
1181 /* --------------------------- FILE SYSTEM -------------------------------- */
1182
1183 #define CCHMAXPATH 260
1184 #define CCHMAXPATHCOMP 256
1185
1186 #if defined (INCL_DOSMISC)
1187 #define DSP_IMPLIEDCUR 1
1188 #define DSP_PATHREF 2
1189 #define DSP_IGNORENETERR 4
1190 #endif
1191
1192 #if defined (INCL_DOSFILEMGR) || !defined (INCL_NOCOMMON)
1193
1194 #define DCPY_EXISTING 0x0001
1195 #define DCPY_APPEND 0x0002
1196 #define DCPY_FAILEAS 0x0004
1197
1198 #define DSPI_WRTTHRU 0x0010
1199
1200 #define EAT_BINARY 0xfffe
1201 #define EAT_ASCII 0xfffd
1202 #define EAT_BITMAP 0xfffb
1203 #define EAT_METAFILE 0xfffa
1204 #define EAT_ICON 0xfff9
1205 #define EAT_EA 0xffee
1206 #define EAT_MVMT 0xffdf
1207 #define EAT_MVST 0xffde
1208 #define EAT_ASN1 0xffdd
1209
1210 #define ENUMEA_LEVEL_NO_VALUE 1
1211
1212 #define ENUMEA_REFTYPE_FHANDLE 0
1213 #define ENUMEA_REFTYPE_PATH 1
1214 #define ENUMEA_REFTYPE_MAX ENUMEA_REFTYPE_PATH
1215
1216 #define ENUMEA_REFTYPE_FHANDLE 0
1217 #define ENUMEA_REFTYPE_PATH 1
1218
1219 #define FEA_NEEDEA 0x80
1220
1221 #define FHB_DSKREMOTE 0x8000
1222 #define FHB_CHRDEVREMOTE 0x8000
1223 #define FHB_PIPEREMOTE 0x8000
1224
1225 #define FHT_DISKFILE 0x0000
1226 #define FHT_CHRDEV 0x0001
1227 #define FHT_PIPE 0x0002
1228
1229 #define FIL_STANDARD 1
1230 #define FIL_QUERYEASIZE 2
1231 #define FIL_QUERYEASFROMLIST 3
1232 #define FIL_QUERYFULLNAME 5 /* DosQueryPathInfo */
1233
1234 #define FILE_BEGIN 0
1235 #define FILE_CURRENT 1
1236 #define FILE_END 2
1237
1238 #define FILE_NORMAL 0x0000
1239 #define FILE_READONLY 0x0001
1240 #define FILE_HIDDEN 0x0002
1241 #define FILE_SYSTEM 0x0004
1242 #define FILE_DIRECTORY 0x0010
1243 #define FILE_ARCHIVED 0x0020
1244
1245 #define FILE_IGNORE 0x10000
1246
1247 #define FILE_EXISTED 0x0001
1248 #define FILE_CREATED 0x0002
1249 #define FILE_TRUNCATED 0x0003
1250
1251 #define FILE_OPEN 0x0001
1252 #define FILE_TRUNCATE 0x0002
1253 #define FILE_CREATE 0x0010
1254
1255 #define FS_ATTACH 0
1256 #define FS_DETACH 1
1257 #define FS_SPOOLATTACH 2
1258 #define FS_SPOOLDETACH 3
1259
1260 #define FSAIL_QUERYNAME 1
1261 #define FSAIL_DEVNUMBER 2
1262 #define FSAIL_DRVNUMBER 3
1263
1264 #define FSAT_CHARDEV 1
1265 #define FSAT_PSEUDODEV 2
1266 #define FSAT_LOCALDRV 3
1267 #define FSAT_REMOTEDRV 4
1268
1269 #define FSCTL_HANDLE 1
1270 #define FSCTL_PATHNAME 2
1271 #define FSCTL_FSDNAME 3
1272
1273 #define FSCTL_ERROR_INFO 1
1274 #define FSCTL_MAX_EASIZE 2
1275 #define FSCTL_GET_NEXT_ROUTE_NAME 3
1276 #define FSCTL_DAEMON_QUERY 4
1277
1278 #define FSCTL_QUERY_COMPLETE 0
1279 #define FSCTL_QUERY_AGAIN 1
1280
1281 #define FSIL_ALLOC 1
1282 #define FSIL_VOLSER 2
1283
1284 #define HANDTYPE_FILE 0x0000
1285 #define HANDTYPE_DEVICE 0x0001
1286 #define HANDTYPE_PIPE 0x0002
1287 #define HANDTYPE_PROTECTED 0x4000
1288 #define HANDTYPE_NETWORK 0x8000
1289
1290 #define HDIR_SYSTEM 1
1291 #define HDIR_CREATE ((HDIR)-1)
1292
1293 #define MUST_HAVE_READONLY (FILE_READONLY | (FILE_READONLY << 8))
1294 #define MUST_HAVE_HIDDEN (FILE_HIDDEN | (FILE_HIDDEN << 8))
1295 #define MUST_HAVE_SYSTEM (FILE_SYSTEM | (FILE_SYSTEM << 8))
1296 #define MUST_HAVE_DIRECTORY (FILE_DIRECTORY | (FILE_DIRECTORY << 8))
1297 #define MUST_HAVE_ARCHIVED (FILE_ARCHIVED | (FILE_ARCHIVED << 8))
1298
1299 #define OPEN_ACTION_FAIL_IF_EXISTS 0x0000
1300 #define OPEN_ACTION_OPEN_IF_EXISTS 0x0001
1301 #define OPEN_ACTION_REPLACE_IF_EXISTS 0x0002
1302 #define OPEN_ACTION_FAIL_IF_NEW 0x0000
1303 #define OPEN_ACTION_CREATE_IF_NEW 0x0010
1304
1305 #define OPEN_ACCESS_READONLY 0x0000
1306 #define OPEN_ACCESS_WRITEONLY 0x0001
1307 #define OPEN_ACCESS_READWRITE 0x0002
1308
1309 #define OPEN_SHARE_DENYREADWRITE 0x0010
1310 #define OPEN_SHARE_DENYWRITE 0x0020
1311 #define OPEN_SHARE_DENYREAD 0x0030
1312 #define OPEN_SHARE_DENYNONE 0x0040
1313
1314 #define OPEN_FLAGS_NOINHERIT 0x0080
1315 #define OPEN_FLAGS_NO_LOCALITY 0x0000
1316 #define OPEN_FLAGS_SEQUENTIAL 0x0100
1317 #define OPEN_FLAGS_RANDOM 0x0200
1318 #define OPEN_FLAGS_RANDOMSEQUENTIAL 0x0300
1319 #define OPEN_FLAGS_NO_CACHE 0x1000
1320 #define OPEN_FLAGS_FAIL_ON_ERROR 0x2000
1321 #define OPEN_FLAGS_WRITE_THROUGH 0x4000
1322 #define OPEN_FLAGS_DASD 0x8000
1323 #define OPEN_FLAGS_NONSPOOLED 0x40000
1324 #define OPEN_FLAGS_PROTECTED_HANDLE 0x40000000
1325
1326 #define SEARCH_PATH 0x0000
1327 #define SEARCH_CUR_DIRECTORY 0x0001
1328 #define SEARCH_ENVIRONMENT 0x0002
1329 #define SEARCH_IGNORENETERRS 0x0004
1330
1331
1332 typedef LHANDLE HFILE;
1333 typedef HFILE *PHFILE;
1334
1335 typedef ULONG FHLOCK;
1336 typedef PULONG PFHLOCK;
1337
1338 typedef LHANDLE HDIR;
1339 typedef HDIR *PHDIR;
1340
1341
1342 typedef struct _FTIME
1343 {
1344 USHORT twosecs : 5;
1345 USHORT minutes : 6;
1346 USHORT hours : 5;
1347 } FTIME;
1348 typedef FTIME *PFTIME;
1349
1350 typedef struct _FDATE
1351 {
1352 USHORT day : 5;
1353 USHORT month : 4;
1354 USHORT year : 7;
1355 } FDATE;
1356 typedef FDATE *PFDATE;
1357
1358 typedef struct _FEA
1359 {
1360 BYTE fEA;
1361 BYTE cbName;
1362 USHORT cbValue;
1363 } FEA;
1364 typedef FEA *PFEA;
1365
1366 typedef struct _FEALIST
1367 {
1368 ULONG cbList;
1369 FEA list[1];
1370 } FEALIST;
1371 typedef FEALIST *PFEALIST;
1372
1373 typedef struct _GEA
1374 {
1375 BYTE cbName;
1376 CHAR szName[1];
1377 } GEA;
1378 typedef GEA *PGEA;
1379
1380 typedef struct _GEALIST
1381 {
1382 ULONG cbList;
1383 GEA list[1];
1384 } GEALIST;
1385 typedef GEALIST *PGEALIST;
1386
1387 typedef struct _EAOP
1388 {
1389 PGEALIST fpGEAList;
1390 PFEALIST fpFEAList;
1391 ULONG oError;
1392 } EAOP;
1393 typedef EAOP *PEAOP;
1394
1395 typedef struct _FEA2
1396 {
1397 ULONG oNextEntryOffset;
1398 BYTE fEA;
1399 BYTE cbName;
1400 USHORT cbValue;
1401 CHAR szName[1];
1402 } FEA2;
1403 typedef FEA2 *PFEA2;
1404
1405 typedef struct _FEA2LIST
1406 {
1407 ULONG cbList;
1408 FEA2 list[1];
1409 } FEA2LIST;
1410 typedef FEA2LIST *PFEA2LIST;
1411
1412 typedef struct _GEA2
1413 {
1414 ULONG oNextEntryOffset;
1415 BYTE cbName;
1416 CHAR szName[1];
1417 } GEA2;
1418 typedef GEA2 *PGEA2;
1419
1420 typedef struct _GEA2LIST
1421 {
1422 ULONG cbList;
1423 GEA2 list[1];
1424 } GEA2LIST;
1425 typedef GEA2LIST *PGEA2LIST;
1426
1427 typedef struct _EAOP2
1428 {
1429 PGEA2LIST fpGEA2List;
1430 PFEA2LIST fpFEA2List;
1431 ULONG oError;
1432 } EAOP2;
1433 typedef EAOP2 *PEAOP2;
1434
1435 typedef struct _DENA1
1436 {
1437 UCHAR reserved;
1438 UCHAR cbName;
1439 USHORT cbValue;
1440 UCHAR szName[1];
1441 } DENA1;
1442 typedef DENA1 *PDENA1;
1443
1444 typedef FEA2 DENA2;
1445 typedef PFEA2 PDENA2;
1446
1447 typedef struct _EASIZEBUF
1448 {
1449 USHORT cbMaxEASize;
1450 ULONG cbMaxEAListSize; /* Packed? */
1451 } EASIZEBUF;
1452 typedef EASIZEBUF *PEASIZEBUF;
1453
1454 typedef struct _ROUTENAMEBUF
1455 {
1456 ULONG hRouteHandle;
1457 UCHAR szRouteName;
1458 } ROUTENAMEBUF;
1459 typedef ROUTENAMEBUF *PROUTENAMEBUF;
1460
1461 typedef struct _FSDTHREAD
1462 {
1463 USHORT usFunc;
1464 USHORT usStackSize;
1465 ULONG ulPriorityClass;
1466 LONG lPriorityLevel;
1467 } FSDTHREAD;
1468
1469 typedef struct _FSDDAEMON
1470 {
1471 USHORT usNumThreads;
1472 USHORT usMoreFlag;
1473 USHORT usCallInstance;
1474 FSDTHREAD tdThrds[16];
1475 } FSDDAEMON;
1476
1477 typedef struct _FILEFINDBUF
1478 {
1479 FDATE fdateCreation;
1480 FTIME ftimeCreation;
1481 FDATE fdateLastAccess;
1482 FTIME ftimeLastAccess;
1483 FDATE fdateLastWrite;
1484 FTIME ftimeLastWrite;
1485 ULONG cbFile;
1486 ULONG cbFileAlloc;
1487 USHORT attrFile;
1488 UCHAR cchName;
1489 CHAR achName[CCHMAXPATHCOMP];
1490 } FILEFINDBUF;
1491 typedef FILEFINDBUF *PFILEFINDBUF;
1492
1493 typedef struct _FILEFINDBUF2
1494 {
1495 FDATE fdateCreation;
1496 FTIME ftimeCreation;
1497 FDATE fdateLastAccess;
1498 FTIME ftimeLastAccess;
1499 FDATE fdateLastWrite;
1500 FTIME ftimeLastWrite;
1501 ULONG cbFile;
1502 ULONG cbFileAlloc;
1503 USHORT attrFile;
1504 ULONG cbList;
1505 UCHAR cchName;
1506 CHAR achName[CCHMAXPATHCOMP];
1507 } FILEFINDBUF2;
1508 typedef FILEFINDBUF2 *PFILEFINDBUF2;
1509
1510 typedef struct _FILEFINDBUF3
1511 {
1512 ULONG oNextEntryOffset;
1513 FDATE fdateCreation;
1514 FTIME ftimeCreation;
1515 FDATE fdateLastAccess;
1516 FTIME ftimeLastAccess;
1517 FDATE fdateLastWrite;
1518 FTIME ftimeLastWrite;
1519 ULONG cbFile;
1520 ULONG cbFileAlloc;
1521 ULONG attrFile;
1522 UCHAR cchName;
1523 CHAR achName[CCHMAXPATHCOMP];
1524 } FILEFINDBUF3;
1525 typedef FILEFINDBUF3 *PFILEFINDBUF3;
1526
1527 typedef struct _FILEFINDBUF4
1528 {
1529 ULONG oNextEntryOffset;
1530 FDATE fdateCreation;
1531 FTIME ftimeCreation;
1532 FDATE fdateLastAccess;
1533 FTIME ftimeLastAccess;
1534 FDATE fdateLastWrite;
1535 FTIME ftimeLastWrite;
1536 ULONG cbFile;
1537 ULONG cbFileAlloc;
1538 ULONG attrFile;
1539 ULONG cbList;
1540 UCHAR cchName;
1541 CHAR achName[CCHMAXPATHCOMP];
1542 } FILEFINDBUF4;
1543 typedef FILEFINDBUF4 *PFILEFINDBUF4;
1544
1545 typedef struct _FILELOCK
1546 {
1547 LONG lOffset;
1548 LONG lRange;
1549 } FILELOCK;
1550 typedef FILELOCK *PFILELOCK;
1551
1552 typedef struct _FILESTATUS
1553 {
1554 FDATE fdateCreation;
1555 FTIME ftimeCreation;
1556 FDATE fdateLastAccess;
1557 FTIME ftimeLastAccess;
1558 FDATE fdateLastWrite;
1559 FTIME ftimeLastWrite;
1560 ULONG cbFile;
1561 ULONG cbFileAlloc;
1562 USHORT attrFile;
1563 } FILESTATUS;
1564 typedef FILESTATUS *PFILESTATUS;
1565
1566 typedef struct _FILESTATUS2
1567 {
1568 FDATE fdateCreation;
1569 FTIME ftimeCreation;
1570 FDATE fdateLastAccess;
1571 FTIME ftimeLastAccess;
1572 FDATE fdateLastWrite;
1573 FTIME ftimeLastWrite;
1574 ULONG cbFile;
1575 ULONG cbFileAlloc;
1576 USHORT attrFile;
1577 ULONG cbList;
1578 } FILESTATUS2;
1579 typedef FILESTATUS2 *PFILESTATUS2;
1580
1581 typedef struct _FILESTATUS3
1582 {
1583 FDATE fdateCreation;
1584 FTIME ftimeCreation;
1585 FDATE fdateLastAccess;
1586 FTIME ftimeLastAccess;
1587 FDATE fdateLastWrite;
1588 FTIME ftimeLastWrite;
1589 ULONG cbFile;
1590 ULONG cbFileAlloc;
1591 ULONG attrFile;
1592 } FILESTATUS3;
1593 typedef FILESTATUS3 *PFILESTATUS3;
1594
1595 typedef struct _FILESTATUS4
1596 {
1597 FDATE fdateCreation;
1598 FTIME ftimeCreation;
1599 FDATE fdateLastAccess;
1600 FTIME ftimeLastAccess;
1601 FDATE fdateLastWrite;
1602 FTIME ftimeLastWrite;
1603 ULONG cbFile;
1604 ULONG cbFileAlloc;
1605 ULONG attrFile;
1606 ULONG cbList;
1607 } FILESTATUS4;
1608 typedef FILESTATUS4 *PFILESTATUS4;
1609
1610 typedef struct _FSALLOCATE
1611 {
1612 ULONG idFileSystem;
1613 ULONG cSectorUnit;
1614 ULONG cUnit;
1615 ULONG cUnitAvail;
1616 USHORT cbSector;
1617 } FSALLOCATE;
1618 typedef FSALLOCATE *PFSALLOCATE;
1619
1620 typedef struct _FSQBUFFER
1621 {
1622 USHORT iType;
1623 USHORT cbName;
1624 UCHAR szName[1];
1625 USHORT cbFSDName;
1626 UCHAR szFSDName[1];
1627 USHORT cbFSAData;
1628 UCHAR rgFSAData[1];
1629 } FSQBUFFER;
1630 typedef FSQBUFFER *PFSQBUFFER;
1631
1632 typedef struct _FSQBUFFER2
1633 {
1634 USHORT iType;
1635 USHORT cbName;
1636 USHORT cbFSDName;
1637 USHORT cbFSAData;
1638 UCHAR szName[1];
1639 UCHAR szFSDName[1];
1640 UCHAR rgFSAData[1];
1641 } FSQBUFFER2;
1642 typedef FSQBUFFER2 *PFSQBUFFER2;
1643
1644 typedef struct _SPOOLATTACH
1645 {
1646 USHORT hNmPipe;
1647 ULONG ulKey;
1648 } SPOOLATTACH;
1649 typedef SPOOLATTACH *PSPOOLATTACH;
1650
1651 typedef struct _VOLUMELABEL
1652 {
1653 BYTE cch;
1654 CHAR szVolLabel[12];
1655 } VOLUMELABEL;
1656 typedef VOLUMELABEL *PVOLUMELABEL;
1657
1658 typedef struct _FSINFO
1659 {
1660 FDATE fdateCreation;
1661 FTIME ftimeCreation;
1662 VOLUMELABEL vol;
1663 } FSINFO;
1664 typedef FSINFO *PFSINFO;
1665
1666
1667 ULONG DosCancelLockRequest (HFILE hFile, __const__ FILELOCK *pfl);
1668 ULONG DosClose (HFILE hFile);
1669 ULONG DosCopy (PCSZ pszSource, PCSZ pszTarget, ULONG ulOption);
1670 ULONG DosCreateDir (PCSZ pszDirName, PEAOP2 pEABuf);
1671 ULONG DosDelete (PCSZ pszFileName);
1672 ULONG DosDeleteDir (PCSZ pszDirName);
1673 ULONG DosDupHandle (HFILE hFile, PHFILE phFile);
1674 ULONG DosEditName (ULONG ulLevel, PCSZ pszSource, PCSZ pszEdit,
1675 PBYTE pszTargetBuf, ULONG ulTargetBufLength);
1676 ULONG DosEnumAttribute (ULONG ulRefType, CPVOID pvFile, ULONG ulEntry,
1677 PVOID pvBuf, ULONG ulBufLength, PULONG pulCount, ULONG ulInfoLevel);
1678 ULONG DosFindClose (HDIR hDir);
1679 ULONG DosFindFirst (PCSZ pszFileSpec, PHDIR phDir, ULONG flAttribute,
1680 PVOID pFindBuf, ULONG ulFindBufLength, PULONG pulFileNames,
1681 ULONG ulInfoLevel);
1682 ULONG DosFindNext (HDIR hDir, PVOID pFindBuf, ULONG ulFindBufLength,
1683 PULONG pulFileNames);
1684 ULONG DosForceDelete (PCSZ pszFileName);
1685 ULONG DosFSAttach (PCSZ pszDevice, PCSZ pszFilesystem,
1686 __const__ VOID *pData, ULONG ulDataLength, ULONG ulFlag);
1687 ULONG DosFSCtl (PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength,
1688 PVOID pParmList, ULONG ulParmLengthMax, PULONG pulParmLength,
1689 ULONG ulFunction, PCSZ pszRouteName, HFILE hFile, ULONG ulMethod);
1690 ULONG DosMove (PCSZ pszOldName, PCSZ pszNewName);
1691 ULONG DosOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
1692 ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
1693 PEAOP2 pEABuf);
1694 ULONG DosProtectClose (HFILE hFile, FHLOCK fhFileHandleLockID);
1695 ULONG DosProtectEnumAttribute (ULONG ulRefType, CPVOID pvFile,
1696 ULONG ulEntry, PVOID pvBuf, ULONG ulBufLength, PULONG pulCount,
1697 ULONG ulInfoLevel, FHLOCK fhFileHandleLockID);
1698 ULONG DosProtectOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
1699 ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
1700 PEAOP2 pEABuf, PFHLOCK pfhFileHandleLockID);
1701 ULONG DosProtectQueryFHState (HFILE hFile, PULONG pulMode,
1702 FHLOCK fhFileHandleLockID);
1703 ULONG DosProtectQueryFileInfo (HFILE hFile, ULONG ulInfoLevel,
1704 PVOID pInfoBuffer, ULONG ulInfoLength, FHLOCK fhFileHandleLockID);
1705 ULONG DosProtectRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
1706 PULONG pulBytesRead, FHLOCK fhFileHandleLockID);
1707 ULONG DosProtectSetFHState (HFILE hFile, ULONG ulMode,
1708 FHLOCK fhFileHandleLockID);
1709 ULONG DosProtectSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
1710 ULONG ulInfoLength, FHLOCK fhFileHandleLockID);
1711 ULONG DosProtectSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
1712 __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags,
1713 FHLOCK fhFileHandleLockID);
1714 ULONG DosProtectSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin,
1715 PULONG pulPos, FHLOCK fhFileHandleLockID);
1716 ULONG DosProtectSetFileSize (HFILE hFile, ULONG ulSize,
1717 FHLOCK fhFileHandleLockID);
1718 ULONG DosProtectWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
1719 PULONG pulBytesWritten, FHLOCK fhFileHandleLockID);
1720 ULONG DosQueryCurrentDir (ULONG ulDrive, PBYTE pPath, PULONG pulPathLength);
1721 ULONG DosQueryCurrentDisk (PULONG pulDrive, PULONG pulLogical);
1722 ULONG DosQueryFHState (HFILE hFile, PULONG pulMode);
1723 ULONG DosQueryFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
1724 ULONG ulInfoLength);
1725 ULONG DosQueryFSAttach (PCSZ pszDeviceName, ULONG ulOrdinal,
1726 ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb, PULONG pulBufLength);
1727 ULONG DosQueryFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
1728 ULONG ulBufLength);
1729 ULONG DosQueryHType (HFILE hFile, PULONG pulType, PULONG pulAttr);
1730 ULONG DosQueryPathInfo (PCSZ pszPathName, ULONG ulInfoLevel,
1731 PVOID pInfoBuffer, ULONG ulInfoLength);
1732 ULONG DosQueryVerify (PBOOL32 pVerify);
1733 ULONG DosRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
1734 PULONG pulBytesRead);
1735 ULONG DosResetBuffer (HFILE hf);
1736 ULONG DosSetCurrentDir (PCSZ pszDir);
1737 ULONG DosSetDefaultDisk (ULONG ulDrive);
1738 ULONG DosSetFHState (HFILE hFile, ULONG ulMode);
1739 ULONG DosSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
1740 ULONG ulInfoLength);
1741 ULONG DosSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
1742 __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags);
1743 ULONG DosSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin, PULONG pulPos);
1744 ULONG DosSetFileSize (HFILE hFile, ULONG ulSize);
1745 ULONG DosSetFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
1746 ULONG ulBufLength);
1747 ULONG DosSetMaxFH (ULONG ulCount);
1748 ULONG DosSetPathInfo (PCSZ pszPathName, ULONG ulInfoLevel, PVOID pInfoBuffer,
1749 ULONG ulInfoLength, ULONG ulOptions);
1750 ULONG DosSetRelMaxFH (PLONG pulReqCount, PULONG pulCurMaxFH);
1751 ULONG DosSetVerify (BOOL32 f32Verify);
1752 ULONG DosShutdown (ULONG ulReserved);
1753 ULONG DosWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
1754 PULONG pulBytesWritten);
1755
1756 #endif /* INCL_DOSFILEMGR || !INCL_NOCOMMON */
1757
1758
1759 #if defined (INCL_DOSMISC)
1760 ULONG DosSearchPath (ULONG ulControl, PCSZ pszPath, PCSZ pszFilename,
1761 PBYTE pBuf, ULONG ulBufLength);
1762 #endif /* INCL_DOSMISC */
1763
1764 /* ---------------------------- DEVICE I/O -------------------------------- */
1765
1766 #if defined (INCL_DOSDEVICES)
1767
1768 #define DEVINFO_PRINTER 0
1769 #define DEVINFO_RS232 1
1770 #define DEVINFO_FLOPPY 2
1771 #define DEVINFO_COPROCESSOR 3
1772 #define DEVINFO_SUBMODEL 4
1773 #define DEVINFO_MODEL 5
1774 #define DEVINFO_ADAPTER 6
1775
1776 #define INFO_COUNT_PARTITIONABLE_DISKS 1
1777 #define INFO_GETIOCTLHANDLE 2
1778 #define INFO_FREEIOCTLHANDLE 3
1779
1780 ULONG DosDevConfig (PVOID pInfo, ULONG ulItem);
1781 ULONG DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction,
1782 PVOID pParams, ULONG ulParamsLengthMax, PULONG pulParamsLength,
1783 PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength);
1784 ULONG DosPhysicalDisk (ULONG ulFunction, PVOID pBuffer, ULONG ulBufferLength,
1785 PVOID pParams, ULONG ulParamsLength);
1786
1787 #endif /* INCL_DOSDEVICES */
1788
1789 #if defined (INCL_DOSDEVIOCTL)
1790
1791 #define IOCTL_ASYNC 0x0001
1792 #define IOCTL_SCR_AND_PTRDRAW 0x0003
1793 #define IOCTL_KEYBOARD 0x0004
1794 #define IOCTL_PRINTER 0x0005
1795 #define IOCTL_LIGHTPEN 0x0006
1796 #define IOCTL_POINTINGDEVICE 0x0007
1797 #define IOCTL_DISK 0x0008
1798 #define IOCTL_PHYSICALDISK 0x0009
1799 #define IOCTL_MONITOR 0x000a
1800 #define IOCTL_GENERAL 0x000b
1801 #define IOCTL_POWER 0x000c
1802 #define IOCTL_OEMHLP 0x0080
1803 #define IOCTL_TESTCFG_SYS 0x0080
1804 #define IOCTL_CDROMDISK 0x0080
1805 #define IOCTL_CDROMAUDIO 0x0081
1806 #define IOCTL_TOUCH_DEVDEP 0x0081
1807 #define IOCTL_TOUCH_DEVINDEP 0x0081
1808
1809 #define ASYNC_SETBAUDRATE 0x0041
1810 #define ASYNC_SETLINECTRL 0x0042
1811 #define ASYNC_EXTSETBAUDRATE 0x0043
1812 #define ASYNC_TRANSMITIMM 0x0044
1813 #define ASYNC_SETBREAKOFF 0x0045
1814 #define ASYNC_SETMODEMCTRL 0x0046
1815 #define ASYNC_STOPTRANSMIT 0x0047
1816 #define ASYNC_STARTTRANSMIT 0x0048
1817 #define ASYNC_SETBREAKON 0x004b
1818 #define ASYNC_SETDCBINFO 0x0053
1819 #define ASYNC_SETENHANCEDMODEPARMS 0x0054
1820 #define ASYNC_GETBAUDRATE 0x0061
1821 #define ASYNC_GETLINECTRL 0x0062
1822 #define ASYNC_EXTGETBAUDRATE 0x0063
1823 #define ASYNC_GETCOMMSTATUS 0x0064
1824 #define ASYNC_GETLINESTATUS 0x0065
1825 #define ASYNC_GETMODEMOUTPUT 0x0066
1826 #define ASYNC_GETMODEMINPUT 0x0067
1827 #define ASYNC_GETINQUECOUNT 0x0068
1828 #define ASYNC_GETOUTQUECOUNT 0x0069
1829 #define ASYNC_GETCOMMERROR 0x006d
1830 #define ASYNC_GETCOMMEVENT 0x0072
1831 #define ASYNC_GETDCBINFO 0x0073
1832 #define ASYNC_GETENHANCEDMODEPARMS 0x0074
1833
1834 #define SCR_ALLOCLDT 0x0070
1835 #define SCR_DEALLOCLDT 0x0071
1836 #define PTR_GETPTRDRAWADDRESS 0x0072
1837 #define VID_INITCALLVECTOR 0x0073
1838 #define SCR_ABIOSPASSTHRU 0x0074
1839 #define SCR_ALLOCLDTOFF 0x0075
1840 #define SCR_ALLOCLDTBGVAL 0x0076
1841 #define SCR_ALLOCVIDEOBUFFER 0x007e
1842 #define SCR_GETROMFONTADDR 0x007f
1843
1844 #define KBD_SETTRANSTABLE 0x0050
1845 #define KBD_SETINPUTMODE 0x0051
1846 #define KBD_SETINTERIMFLAG 0x0052
1847 #define KBD_SETSHIFTSTATE 0x0053
1848 #define KBD_SETTYPAMATICRATE 0x0054
1849 #define KBD_SETFGNDSCREENGRP 0x0055
1850 #define KBD_SETSESMGRHOTKEY 0x0056
1851 #define KBD_SETFOCUS 0x0057
1852 #define KBD_SETKCB 0x0058
1853 #define KBD_SETREADNOTIFICATION 0x0059
1854 #define KBD_ALTERKBDLED 0x005a
1855 #define KBD_SETNLS 0x005c
1856 #define KBD_CREATE 0x005d
1857 #define KBD_DESTROY 0x005e
1858 #define KBD_GETINPUTMODE 0x0071
1859 #define KBD_GETINTERIMFLAG 0x0072
1860 #define KBD_GETSHIFTSTATE 0x0073
1861 #define KBD_READCHAR 0x0074
1862 #define KBD_PEEKCHAR 0x0075
1863 #define KBD_GETSESMGRHOTKEY 0x0076
1864 #define KBD_GETKEYBDTYPE 0x0077
1865 #define KBD_GETCODEPAGEID 0x0078
1866 #define KBD_XLATESCAN 0x0079
1867 #define KBD_QUERYKBDHARDWAREID 0x007a
1868 #define KBD_QUERYKBDCODEPAGESUPPORT 0x007b
1869
1870 #define PRT_QUERYJOBHANDLE 0x0021
1871 #define PRT_SETFRAMECTL 0x0042
1872 #define PRT_SETINFINITERETRY 0x0044
1873 #define PRT_INITPRINTER 0x0046
1874 #define PRT_ACTIVATEFONT 0x0048
1875 #define PRT_SETPRINTJOBTITLE 0x004d
1876 #define PRT_SETIRQTIMEOUT 0x004e
1877 #define PRT_GETFRAMECTL 0x0062
1878 #define PRT_GETINFINITERETRY 0x0064
1879 #define PRT_GETPRINTERSTATUS 0x0066
1880 #define PRT_QUERYACTIVEFONT 0x0069
1881 #define PRT_VERIFYFONT 0x006a
1882 #define PRT_QUERYIRQTIMEOUT 0x006e
1883
1884 #define MOU_ALLOWPTRDRAW 0x0050
1885 #define MOU_UPDATEDISPLAYMODE 0x0051
1886 #define MOU_SCREENSWITCH 0x0052
1887 #define MOU_SETSCALEFACTORS 0x0053
1888 #define MOU_SETEVENTMASK 0x0054
1889 #define MOU_SETHOTKEYBUTTON 0x0055
1890 #define MOU_REASSIGNTHRESHOLDVALUES 0x0055 /* ? */
1891 #define MOU_SETPTRSHAPE 0x0056
1892 #define MOU_DRAWPTR 0x0057
1893 #define MOU_UNMARKCOLLISIONAREA 0x0057 /* ? */
1894 #define MOU_REMOVEPTR 0x0058
1895 #define MOU_MARKCOLLISIONAREA 0x0058 /* ? */
1896 #define MOU_SETPTRPOS 0x0059
1897 #define MOU_SETPROTDRAWADDRESS 0x005a
1898 #define MOU_SETREALDRAWADDRESS 0x005b
1899 #define MOU_SETMOUSTATUS 0x005c
1900 #define MOU_DISPLAYMODECHANGE 0x005d
1901 #define MOU_GETBUTTONCOUNT 0x0060
1902 #define MOU_GETMICKEYCOUNT 0x0061
1903 #define MOU_GETMOUSTATUS 0x0062
1904 #define MOU_READEVENTQUE 0x0063
1905 #define MOU_GETQUESTATUS 0x0064
1906 #define MOU_GETEVENTMASK 0x0065
1907 #define MOU_GETSCALEFACTORS 0x0066
1908 #define MOU_GETPTRPOS 0x0067
1909 #define MOU_GETPTRSHAPE 0x0068
1910 #define MOU_GETHOTKEYBUTTON 0x0069
1911 #define MOU_QUERYTHRESHOLDVALUES 0x0069 /* ? */
1912 #define MOU_VER 0x006a
1913 #define MOU_QUERYPOINTERID 0x006b /* ? */
1914
1915 #define DSK_LOCKDRIVE 0x0000
1916 #define DSK_UNLOCKDRIVE 0x0001
1917 #define DSK_REDETERMINEMEDIA 0x0002
1918 #define DSK_SETLOGICALMAP 0x0003
1919 #define DSK_BEGINFORMAT 0x0004
1920 #define DSK_BLOCKREMOVABLE 0x0020
1921 #define DSK_GETLOGICALMAP 0x0021
1922 #define DSK_UNLOCKEJECTMEDIA 0x0040
1923 #define DSK_SETDEVICEPARAMS 0x0043
1924 #define DSK_WRITETRACK 0x0044
1925 #define DSK_FORMATVERIFY 0x0045
1926 #define DSK_DISKETTECONTROL 0x005d
1927 #define DSK_QUERYMEDIASENSE 0x0060
1928 #define DSK_GETDEVICEPARAMS 0x0063
1929 #define DSK_READTRACK 0x0064
1930 #define DSK_VERIFYTRACK 0x0065
1931 #define DSK_GETLOCKSTATUS 0x0066
1932
1933 #define PDSK_LOCKPHYSDRIVE 0x0000
1934 #define PDSK_UNLOCKPHYSDRIVE 0x0001
1935 #define PDSK_WRITEPHYSTRACK 0x0044
1936 #define PDSK_GETPHYSDEVICEPARAMS 0x0063
1937 #define PDSK_READPHYSTRACK 0x0064
1938 #define PDSK_VERIFYPHYSTRACK 0x0065
1939
1940 #define POWER_SENDPOWEREVENT 0x0040
1941 #define POWER_SETPOWEREVENTRES 0x0041
1942 #define POWER_GETPOWERSTATUS 0x0060
1943 #define POWER_GETPOWEREVENT 0x0061
1944 #define POWER_GETPOWERINFO 0x0062
1945
1946 #define OEMHLP_GETOEMADAPTIONINFO 0x0000
1947 #define OEMHLP_GETMACHINEINFO 0x0001
1948 #define OEMHLP_GETDISPLAYCOMBCODE 0x0002
1949 #define OEMHLP_GETVIDEOFONTS 0x0003
1950 #define OEMHLP_READEISACONFIGINFO 0x0004
1951 #define OEMHLP_GETROMBIOSINFO 0x0005
1952 #define OEMHLP_GETMISCVIDEOINFO 0x0006
1953 #define OEMHLP_GETVIDEOADAPTER 0x0007
1954 #define OEMHLP_GETSVGAINFO 0x0008
1955 #define OEMHLP_GETMEMINFO 0x0009
1956 #define OEMHLP_GETDMQSINFO 0x000a
1957 #define OEMHLP_PCI 0x000b
1958
1959 #define TESTCFG_SYS_GETBIOSADAPTER 0x0040
1960 #define TESTCFG_SYS_ISSUEINIOINSTR 0x0041
1961 #define TESTCFG_SYS_ISSUEOUTIOINSTR 0x0042
1962 #define TESTCFG_SYS_GETBUSARCH 0x0060
1963 #define TESTCFG_SYS_GETALLPOSIDS 0x0061
1964 #define TESTCFG_SYS_GETALLEISAIDS 0x0062
1965
1966 #define CDROMDISK_RESETDRIVE 0x0040
1967 #define CDROMDISK_EJECTDISK 0x0044
1968 #define CDROMDISK_LOCKUNLOCKDOOR 0x0046
1969 #define CDROMDISK_SEEK 0x0050
1970 #define CDROMDISK_DEVICESTATUS 0x0060
1971 #define CDROMDISK_GETDRIVER 0x0061
1972 #define CDROMDISK_GETSECTORSIZE 0x0063
1973 #define CDROMDISK_GETHEADLOC 0x0070
1974 #define CDROMDISK_READLONG 0x0072
1975 #define CDROMDISK_GETVOLUMESIZE 0x0078
1976 #define CDROMDISK_GETUPC 0x0079
1977
1978 #define CDROMAUDIO_SETCHANNELCTRL 0x0040
1979 #define CDROMAUDIO_PLAYAUDIO 0x0050
1980 #define CDROMAUDIO_STOPAUDIO 0x0051
1981 #define CDROMAUDIO_RESUMEAUDIO 0x0052
1982 #define CDROMAUDIO_GETCHANNEL 0x0060
1983 #define CDROMAUDIO_GETAUDIODISK 0x0061
1984 #define CDROMAUDIO_GETAUDIOTRACK 0x0062
1985 #define CDROMAUDIO_GETSUBCHANNELQ 0x0063
1986 #define CDROMAUDIO_GETAUDIOSTATUS 0x0065
1987
1988 #define TOUCH_DEVDEP_SETCALIBCONST 0x0052
1989 #define TOUCH_DEVDEP_READDATA 0x0053
1990 #define TOUCH_DEVDEP_SETDATAMODE 0x0054
1991 #define TOUCH_DEVDEP_SETCLICKLOCK 0x0055
1992 #define TOUCH_DEVDEP_SETTOUCHTHRESHOLD 0x0056
1993 #define TOUCH_DEVDEP_SETEMULXY 0x0057
1994 #define TOUCH_DEVDEP_SETDATAREPORTRATE 0x0058
1995 #define TOUCH_DEVDEP_SETLOWPASSFILTER 0x0059
1996 #define TOUCH_DEVDEP_WRITEMEMLOC 0x005a
1997 #define TOUCH_DEVDEP_GETCALIBCONST 0x0060
1998 #define TOUCH_DEVDEP_GETDATAMODE 0x0061
1999 #define TOUCH_DEVDEP_GETCLICKLOCK 0x0062
2000 #define TOUCH_DEVDEP_GETTOUCHTHRESHOLD 0x0063
2001 #define TOUCH_DEVDEP_GETEMULXY 0x0064
2002 #define TOUCH_DEVDEP_GETDATAREPORTRATE 0x0065
2003 #define TOUCH_DEVDEP_GETLOWPASSFILTER 0x0066
2004 #define TOUCH_DEVDEP_READMEMLOC 0x0067
2005
2006 #define TOUCH_DEVINDEP_SETCOORDSYS 0x0050
2007 #define TOUCH_DEVINDEP_SETSELECTMECH 0x0052
2008 #define TOUCH_DEVINDEP_SETEVENTMASK 0x0053
2009 #define TOUCH_DEVINDEP_SETQUEUESIZE 0x0054
2010 #define TOUCH_DEVINDEP_SETEMULSTATE 0x0055
2011 #define TOUCH_DEVINDEP_GETCOORDSYS 0x0060
2012 #define TOUCH_DEVINDEP_GETSELECTMECH 0x0062
2013 #define TOUCH_DEVINDEP_GETEVENTMASK 0x0063
2014 #define TOUCH_DEVINDEP_GETQUEUESIZE 0x0064
2015 #define TOUCH_DEVINDEP_GETEMULSTATE 0x0065
2016 #define TOUCH_DEVINDEP_GETREADEVENTQUEUE 0x0066
2017
2018 #define MON_REGISTERMONITOR 0x0040
2019
2020 #define DEV_FLUSHINPUT 0x0001
2021 #define DEV_FLUSHOUTPUT 0x0002
2022 #define DEV_SYSTEMNOTIFYPDD 0x0041
2023 #define DEV_QUERYMONSUPPORT 0x0060
2024
2025 #define RX_QUE_OVERRUN 0x0001
2026 #define RX_HARDWARE_OVERRUN 0x0002
2027 #define PARITY_ERROR 0x0004
2028 #define FRAMING_ERROR 0x0008
2029
2030 #define CHAR_RECEIVED 0x0001
2031 #define LAST_CHAR_SENT 0x0004
2032 #define CTS_CHANGED 0x0008
2033 #define DSR_CHANGED 0x0010
2034 #define DCD_CHANGED 0x0020
2035 #define BREAK_DETECTED 0x0040
2036 #define ERROR_OCCURRED 0x0080
2037 #define RI_DETECTED 0x0100
2038
2039 #define TX_WAITING_FOR_CTS 0x0001
2040 #define TX_WAITING_FOR_DSR 0x0002
2041 #define TX_WAITING_FOR_DCD 0x0004
2042 #define TX_WAITING_FOR_XON 0x0008
2043 #define TX_WAITING_TO_SEND_XON 0x0010
2044 #define TX_WAITING_WHILE_BREAK_ON 0x0020
2045 #define TX_WAITING_TO_SEND_IMM 0x0040
2046 #define RX_WAITING_FOR_DSR 0x0080
2047
2048 #define WRITE_REQUEST_QUEUED 0x0001
2049 #define DATA_IN_TX_QUE 0x0002
2050 #define HARDWARE_TRANSMITTING 0x0004
2051 #define CHAR_READY_TO_SEND_IMM 0x0008
2052 #define WAITING_TO_SEND_XON 0x0010
2053 #define WAITING_TO_SEND_XOFF 0x0020
2054
2055 #define CTS_ON 0x10
2056 #define DSR_ON 0x20
2057 #define RI_ON 0x40
2058 #define DCD_ON 0x80
2059
2060 #define MODE_DTR_CONTROL 0x01
2061 #define MODE_DTR_HANDSHAKE 0x02
2062 #define MODE_CTS_HANDSHAKE 0x08
2063 #define MODE_DSR_HANDSHAKE 0x10
2064 #define MODE_DCD_HANDSHAKE 0x20
2065 #define MODE_DSR_SENSITIVITY 0x40
2066
2067 #define MODE_AUTO_TRANSMIT 0x01
2068 #define MODE_AUTO_RECEIVE 0x02
2069 #define MODE_ERROR_CHAR 0x04
2070 #define MODE_NULL_STRIPPING 0x08
2071 #define MODE_BREAK_CHAR 0x10
2072 #define MODE_RTS_CONTROL 0x40
2073 #define MODE_RTS_HANDSHAKE 0x80
2074 #define MODE_TRANSMIT_TOGGLE 0xc0
2075
2076 #define MODE_NO_WRITE_TIMEOUT 0x01
2077 #define MODE_READ_TIMEOUT 0x02
2078 #define MODE_WAIT_READ_TIMEOUT 0x04
2079 #define MODE_NOWAIT_READ_TIMEOUT 0x06
2080
2081 #define DTR_ON 0x01
2082 #define RTS_ON 0x02
2083
2084 #define DTR_OFF 0xfe
2085 #define RTS_OFF 0xfd
2086
2087 #define ASCII_MODE 0x00
2088 #define BINARY_MODE 0x80
2089
2090 #define CONVERSION_REQUEST 0x20
2091 #define INTERIM_CHAR 0x80
2092
2093 #define HOTKEY_MAX_COUNT 0x0000
2094 #define HOTKEY_CURRENT_COUNT 0x0001
2095
2096 #define KBD_DATA_RECEIVED 0x0001
2097 #define KBD_DATA_BINARY 0x8000
2098
2099 #define KBD_READ_WAIT 0x0000
2100 #define KBD_READ_NOWAIT 0x8000
2101
2102 #define SHIFT_REPORT_MODE 0x01
2103
2104 #define RIGHTSHIFT 0x0001
2105 #define LEFTSHIFT 0x0002
2106 #define CONTROL 0x0004
2107 #define ALT 0x0008
2108 #define SCROLLLOCK_ON 0x0010
2109 #define NUMLOCK_ON 0x0020
2110 #define CAPSLOCK_ON 0x0040
2111 #define INSERT_ON 0x0080
2112 #define LEFTCONTROL 0x0100
2113 #define LEFTALT 0x0200
2114 #define RIGHTCONTROL 0x0400
2115 #define RIGHTALT 0x0800
2116 #define SCROLLLOCK 0x1000
2117 #define NUMLOCK 0x2000
2118 #define CAPSLOCK 0x4000
2119 #define SYSREQ 0x8000
2120
2121 #define PRINTER_TIMEOUT 0x0001
2122 #define PRINTER_IO_ERROR 0x0008
2123 #define PRINTER_SELECTED 0x0010
2124 #define PRINTER_OUT_OF_PAPER 0x0020
2125 #define PRINTER_ACKNOWLEDGED 0x0040
2126 #define PRINTER_NOT_BUSY 0x0080
2127
2128 #define MOUSE_MOTION 0x0001
2129 #define MOUSE_MOTION_WITH_BN1_DOWN 0x0002
2130 #define MOUSE_BN1_DOWN 0x0004
2131 #define MOUSE_MOTION_WITH_BN2_DOWN 0x0008
2132 #define MOUSE_BN2_DOWN 0x0010
2133 #define MOUSE_MOTION_WITH_BN3_DOWN 0x0020
2134 #define MOUSE_BN3_DOWN 0x0040
2135
2136 #define MHK_BUTTON1 0x0001
2137 #define MHK_BUTTON2 0x0002
2138 #define MHK_BUTTON3 0x0004
2139
2140 #define MOU_NOWAIT 0x0000
2141 #define MOU_WAIT 0x0001
2142
2143 #define MHK_NO_HOTKEY 0x0000
2144
2145 #define MOUSE_QUEUEBUSY 0x0001
2146 #define MOUSE_BLOCKREAD 0x0002
2147 #define MOUSE_FLUSH 0x0004
2148 #define MOUSE_UNSUPPORTED_MODE 0x0008
2149 #define MOUSE_DISABLED 0x0100
2150 #define MOUSE_MICKEYS 0x0200
2151
2152 #define BUILD_BPB_FROM_MEDIUM 0x00
2153 #define REPLACE_BPB_FOR_DEVICE 0x01
2154 #define REPLACE_BPB_FOR_MEDIUM 0x02
2155
2156 #define DEVTYPE_48TPI 0x0000
2157 #define DEVTYPE_96TPI 0x0001
2158 #define DEVTYPE_35 0x0002
2159 #define DEVTYPE_8SD 0x0003
2160 #define DEVTYPE_8DD 0x0004
2161 #define DEVTYPE_FIXED 0x0005
2162 #define DEVTYPE_TAPE 0x0006
2163 #define DEVTYPE_UNKNOWN 0x0007
2164
2165 #define SCREENDD_GETCURRENTBANK 0x00
2166 #define SCREENDD_SETCURRENTBANK 0x01
2167 #define SCREENDD_SVGA_ID 0x08
2168 #define SCREENDD_SVGA_OEM 0x09
2169 #define SCREENDD_UPDATEMEMORY 0x0a
2170 #define SCREENDD_GETLINEARACCESS 0x0b
2171 #define SCREENDD_GETGLOBALACCESS 0x0c
2172 #define SCREENDD_FREEGLOBALACCESS 0x0d
2173 #define SCREENDD_REGISTER_RING0_CALLER 0x0e
2174 #define SCREENDD_WAIT_ON_RING0_CALLER 0x0f
2175 #define SCREENDD_CATEGORY 0x80
2176 #define SCREENDD_NAME "SCREEN$"
2177
2178 #define GETLINEAR_FLAG_MAPPHYSICAL 0x00000010
2179 #define GETLINEAR_FLAG_MAPPROCESS 0x00000020
2180 #define GETLINEAR_FLAG_MAPSHARED 0x00000400
2181 #define GETLINEAR_FLAG_MAPATTACH 0x80000000
2182
2183 #define EGA_BIT 4
2184 #define VGA_BIT 8
2185 #define EGAVGA_BIT (EGA_BIT|VGA_BIT)
2186
2187 #define READ_BANK 0
2188 #define WRITE_BANK 1
2189 #define MODE_TEXT 0
2190 #define MODE_PLANAR 1
2191 #define MODE_LINEAR 2
2192
2193 typedef struct _DCBINFO
2194 {
2195 USHORT usWriteTimeout;
2196 USHORT usReadTimeout;
2197 BYTE fbCtlHndShake;
2198 BYTE fbFlowReplace;
2199 BYTE fbTimeout;
2200 BYTE bErrorReplacementChar;
2201 BYTE bBreakReplacementChar;
2202 BYTE bXONChar;
2203 BYTE bXOFFChar;
2204 } DCBINFO;
2205 typedef DCBINFO *PDCBINFO;
2206
2207 typedef struct _LINECONTROL
2208 {
2209 BYTE bDataBits;
2210 BYTE bParity;
2211 BYTE bStopBits;
2212 BYTE fTransBreak;
2213 } LINECONTROL;
2214 typedef LINECONTROL *PLINECONTROL;
2215
2216 typedef struct _MODEMSTATUS
2217 {
2218 BYTE fbModemOn;
2219 BYTE fbModemOff;
2220 } MODEMSTATUS;
2221 typedef MODEMSTATUS *PMODEMSTATUS;
2222
2223 typedef struct _KBDTYPE
2224 {
2225 USHORT usType;
2226 USHORT reserved1;
2227 USHORT reserved2;
2228 } KBDTYPE;
2229 typedef KBDTYPE *PKBDTYPE;
2230
2231 typedef struct _RATEDELAY
2232 {
2233 USHORT usDelay;
2234 USHORT usRate;
2235 } RATEDELAY;
2236 typedef RATEDELAY *PRATEDELAY;
2237
2238 typedef struct _CODEPAGEINFO
2239 {
2240 PBYTE pbTransTable;
2241 USHORT idCodePage;
2242 USHORT idTable;
2243 } CODEPAGEINFO;
2244 typedef CODEPAGEINFO *PCODEPAGEINFO;
2245
2246 typedef struct _CPID
2247 {
2248 USHORT idCodePage;
2249 USHORT Reserved;
2250 } CPID;
2251 typedef CPID *PCPID;
2252
2253 typedef struct _SHIFTSTATE
2254 {
2255 USHORT fsState;
2256 BYTE fNLS;
2257 } SHIFTSTATE;
2258 typedef SHIFTSTATE *PSHIFTSTATE;
2259
2260 typedef struct _HOTKEY
2261 {
2262 USHORT fsHotKey;
2263 UCHAR uchScancodeMake;
2264 UCHAR uchScancodeBreak;
2265 USHORT idHotKey;
2266 } HOTKEY;
2267 typedef HOTKEY *PHOTKEY;
2268
2269 typedef struct _PTRDRAWFUNCTION
2270 {
2271 USHORT usReturnCode;
2272 PFN pfnDraw;
2273 PCH pchDataSeg;
2274 } PTRDRAWFUNCTION;
2275 typedef PTRDRAWFUNCTION *PPTRDRAWFUNCTION;
2276
2277 typedef struct _PTRDRAWADDRESS
2278 {
2279 USHORT reserved;
2280 PTRDRAWFUNCTION ptrdfnc;
2281 } PTRDRAWADDRESS;
2282 typedef PTRDRAWADDRESS *PPTRDRAWADDRESS;
2283
2284 typedef struct _PTRDRAWDATA
2285 {
2286 USHORT cb;
2287 USHORT usConfig;
2288 USHORT usFlag;
2289 } PTRDRAWDATA;
2290 typedef PTRDRAWDATA *PPTRDRAWDATA;
2291
2292 typedef struct _TRACKLAYOUT
2293 {
2294 BYTE bCommand;
2295 USHORT usHead;
2296 USHORT usCylinder;
2297 USHORT usFirstSector;
2298 USHORT cSectors;
2299 struct
2300 {
2301 USHORT usSectorNumber;
2302 USHORT usSectorSize;
2303 } TrackTable[1];
2304 } TRACKLAYOUT;
2305 typedef TRACKLAYOUT *PTRACKLAYOUT;
2306
2307 typedef struct _TRACKFORMAT
2308 {
2309 BYTE bCommand;
2310 USHORT usHead;
2311 USHORT usCylinder;
2312 USHORT usReserved;
2313 USHORT cSectors;
2314 struct
2315 {
2316 BYTE bCylinder;
2317 BYTE bHead;
2318 BYTE idSector;
2319 BYTE bBytesSector;
2320 } FormatTable[1];
2321 } TRACKFORMAT;
2322 typedef TRACKFORMAT *PTRACKFORMAT;
2323
2324 typedef struct _BIOSPARAMETERBLOCK
2325 {
2326 USHORT usBytesPerSector;
2327 BYTE bSectorsPerCluster;
2328 USHORT usReservedSectors;
2329 BYTE cFATs;
2330 USHORT cRootEntries;
2331 USHORT cSectors;
2332 BYTE bMedia;
2333 USHORT usSectorsPerFAT;
2334 USHORT usSectorsPerTrack;
2335 USHORT cHeads;
2336 ULONG cHiddenSectors;
2337 ULONG cLargeSectors;
2338 BYTE abReserved[6];
2339 USHORT cCylinders;
2340 BYTE bDeviceType;
2341 USHORT fsDeviceAttr;
2342 } BIOSPARAMETERBLOCK;
2343 typedef BIOSPARAMETERBLOCK *PBIOSPARAMETERBLOCK;
2344
2345 typedef struct _DEVICEPARAMETERBLOCK
2346 {
2347 USHORT reserved1;
2348 USHORT cCylinders;
2349 USHORT cHeads;
2350 USHORT cSectorsPerTrack;
2351 USHORT reserved2;
2352 USHORT reserved3;
2353 USHORT reserved4;
2354 USHORT reserved5;
2355 } DEVICEPARAMETERBLOCK;
2356 typedef DEVICEPARAMETERBLOCK *PDEVICEPARAMETERBLOCK;
2357
2358 typedef struct _MONITORPOSITION
2359 {
2360 USHORT fPosition;
2361 USHORT index;
2362 ULONG pbInBuf;
2363 USHORT offOutBuf;
2364 } MONITORPOSITION;
2365 typedef MONITORPOSITION *PMONITORPOSITION;
2366
2367 typedef struct _FRAME
2368 {
2369 BYTE bCharsPerLine;
2370 BYTE bLinesPerInch;
2371 } FRAME;
2372 typedef FRAME *PFRAME;
2373
2374 typedef struct _LDTADDRINFO
2375 {
2376 PULONG pulPhysAddr;
2377 USHORT cb;
2378 } LDTADDRINFO;
2379 typedef LDTADDRINFO *PLDTADDRINFO;
2380
2381 typedef struct _SCREENGROUP
2382 {
2383 USHORT idScreenGrp;
2384 USHORT fTerminate;
2385 } SCREENGROUP;
2386 typedef SCREENGROUP *PSCREENGROUP;
2387
2388 typedef struct _RXQUEUE
2389 {
2390 USHORT cch;
2391 USHORT cb;
2392 } RXQUEUE;
2393 typedef RXQUEUE *PRXQUEUE;
2394
2395 typedef struct _GETLINIOCTLDATA
2396 {
2397 ULONG PacketLength;
2398 ULONG PhysicalAddress;
2399 ULONG ApertureSize;
2400 PBYTE LinearAddress;
2401 ULONG LinearFlags;
2402 } GETLINIOCTLDATA;
2403 typedef GETLINIOCTLDATA *PGETLINIOCTLDATA;
2404
2405 typedef struct _BANKINFO
2406 {
2407 ULONG ulBankLength;
2408 USHORT usBank;
2409 USHORT usVideoModeType;
2410 USHORT usReadWriteMode;
2411 } BANKINFO;
2412
2413 typedef struct _GLOBALIOCTLDATA
2414 {
2415 ULONG ProcessAddress;
2416 ULONG AddressLength;
2417 ULONG GlobalAddress;
2418 } GLOBALIOCTLDATA;
2419
2420 typedef struct _OEMSVGAINFO
2421 {
2422 USHORT AdapterType;
2423 USHORT ChipType;
2424 ULONG Memory;
2425 } OEMSVGAINFO;
2426
2427 typedef struct _OEMINFO
2428 {
2429 ULONG OEMLength;
2430 USHORT Manufacturer;
2431 ULONG ManufacturerData;
2432 } OEMINFO;
2433
2434 typedef struct _GETGLOBALPACKET
2435 {
2436 ULONG GlobalPktLength;
2437 GLOBALIOCTLDATA GlobalPktData[1];
2438 } GETGLOBALPACKET;
2439
2440 #endif /* INCL_DOSDEVIOCTL */
2441
2442 /* -------------------- NATIONAL LANGUAGE SUPPORT ------------------------- */
2443
2444 #if defined (INCL_DOSNLS)
2445
2446 typedef struct _COUNTRYCODE
2447 {
2448 ULONG country;
2449 ULONG codepage;
2450 } COUNTRYCODE;
2451 typedef COUNTRYCODE *PCOUNTRYCODE;
2452
2453 typedef struct _COUNTRYINFO
2454 {
2455 ULONG country;
2456 ULONG codepage;
2457 ULONG fsDateFmt;
2458 CHAR szCurrency[5];
2459 CHAR szThousandsSeparator[2];
2460 CHAR szDecimal[2];
2461 CHAR szDateSeparator[2];
2462 CHAR szTimeSeparator[2];
2463 UCHAR fsCurrencyFmt;
2464 UCHAR cDecimalPlace;
2465 UCHAR fsTimeFmt;
2466 USHORT abReserved1[2];
2467 CHAR szDataSeparator[2];
2468 USHORT abReserved2[5];
2469 } COUNTRYINFO;
2470 typedef COUNTRYINFO *PCOUNTRYINFO;
2471
2472
2473 ULONG DosMapCase (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
2474 PCHAR pchString);
2475 ULONG DosQueryCollate (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
2476 PCHAR pchBuffer, PULONG pulDataLength);
2477 ULONG DosQueryCp (ULONG ulLength, PULONG pCodePageList, PULONG pDataLength);
2478 ULONG DosQueryCtryInfo (ULONG ulLength, PCOUNTRYCODE pCountryCode,
2479 PCOUNTRYINFO pCountryInfo, PULONG pulDataLength);
2480 ULONG DosQueryDBCSEnv (ULONG ulLength, PCOUNTRYCODE pCountryCode, PCHAR pBuf);
2481 ULONG DosSetProcessCp (ULONG ulCodePage);
2482
2483 #endif /* INCL_DOSNLS */
2484
2485 /* -------------------------- DYNAMIC LINKING ----------------------------- */
2486
2487 #if defined (INCL_DOSMODULEMGR)
2488
2489 #define PT_16BIT 0
2490 #define PT_32BIT 1
2491
2492
2493 ULONG DosFreeModule (HMODULE hmod);
2494 ULONG DosLoadModule (PSZ pszObject, ULONG uObjectLen, PCSZ pszModule,
2495 PHMODULE phmod);
2496 ULONG DosQueryModuleHandle (PCSZ pszModname, PHMODULE phmod);
2497 ULONG DosQueryModuleName (HMODULE hmod, ULONG ulNameLength, PCHAR pNameBuf);
2498 ULONG DosQueryProcAddr (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
2499 PPFN pProcAddr);
2500 ULONG DosQueryProcType (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
2501 PULONG pulProcType);
2502
2503 #endif /* INCL_DOSMODULEMGR */
2504
2505 /* ----------------------------- RESOURCES -------------------------------- */
2506
2507 #if defined (INCL_DOSRESOURCES) || !defined (INCL_NOCOMMON)
2508
2509 #define RT_POINTER 1
2510 #define RT_BITMAP 2
2511 #define RT_MENU 3
2512 #define RT_DIALOG 4
2513 #define RT_STRING 5
2514 #define RT_FONTDIR 6
2515 #define RT_FONT 7
2516 #define RT_ACCELTABLE 8
2517 #define RT_RCDATA 9
2518 #define RT_MESSAGE 10
2519 #define RT_DLGINCLUDE 11
2520 #define RT_VKEYTBL 12
2521 #define RT_KEYTBL 13
2522 #define RT_CHARTBL 14
2523 #define RT_DISPLAYINFO 15
2524 #define RT_FKASHORT 16
2525 #define RT_FKALONG 17
2526 #define RT_HELPTABLE 18
2527 #define RT_HELPSUBTABLE 19
2528 #define RT_FDDIR 20
2529 #define RT_FD 21
2530 #define RT_MAX 22
2531
2532 #define RF_ORDINALID 0x80000000L
2533
2534
2535 ULONG DosFreeResource (PVOID pResAddr);
2536 ULONG DosGetResource (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
2537 PPVOID pOffset);
2538 ULONG DosQueryResourceSize (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
2539 PULONG pulSize);
2540
2541 #endif /* INCL_DOSRESOURCES || !INCL_NOCOMMON */
2542
2543 /* -------------------------------- TASKS --------------------------------- */
2544
2545 #if defined (INCL_DOSPROCESS) || !defined (INCL_NOCOMMON)
2546
2547 #define EXIT_THREAD 0
2548 #define EXIT_PROCESS 1
2549
2550 ULONG DosBeep (ULONG ulFrequency, ULONG ulDuration);
2551 VOID DosExit (ULONG ulAction, ULONG ulResult) __attribute__ ((__noreturn__));
2552
2553 #endif /* INCL_DOSPROCESS || !defined (INCL_NOCOMMON) */
2554
2555
2556 #if defined (INCL_DOSPROCESS)
2557
2558 #define CREATE_READY 0
2559 #define CREATE_SUSPENDED 1
2560
2561 #define STACK_SPARSE 0
2562 #define STACK_COMMITTED 2
2563
2564 #define DCWA_PROCESS 0
2565 #define DCWA_PROCESSTREE 1
2566
2567 #define DCWW_WAIT 0
2568 #define DCWW_NOWAIT 1
2569
2570 #define DKP_PROCESSTREE 0
2571 #define DKP_PROCESS 1
2572
2573 #define EXEC_SYNC 0
2574 #define EXEC_ASYNC 1
2575 #define EXEC_ASYNCRESULT 2
2576 #define EXEC_TRACE 3
2577 #define EXEC_BACKGROUND 4
2578 #define EXEC_LOAD 5
2579 #define EXEC_ASYNCRESULTDB 6
2580
2581 #define EXLST_ADD 1
2582 #define EXLST_REMOVE 2
2583 #define EXLST_EXIT 3
2584
2585 #define PRTYC_NOCHANGE 0
2586 #define PRTYC_IDLETIME 1
2587 #define PRTYC_REGULAR 2
2588 #define PRTYC_TIMECRITICAL 3
2589 #define PRTYC_FOREGROUNDSERVER 4
2590
2591 #define PRTYD_MINIMUM (-31)
2592 #define PRTYD_MAXIMUM 31
2593
2594 #define PRTYS_PROCESS 0
2595 #define PRTYS_PROCESSTREE 1
2596 #define PRTYS_THREAD 2
2597
2598 #define TC_EXIT 0
2599 #define TC_HARDERROR 1
2600 #define TC_TRAP 2
2601 #define TC_KILLPROCESS 3
2602 #define TC_EXCEPTION 4
2603
2604
2605 typedef struct _RESULTCODES
2606 {
2607 ULONG codeTerminate;
2608 ULONG codeResult;
2609 } RESULTCODES;
2610 typedef RESULTCODES *PRESULTCODES;
2611
2612 typedef struct tib2_s
2613 {
2614 ULONG tib2_ultid;
2615 ULONG tib2_ulpri;
2616 ULONG tib2_version;
2617 USHORT tib2_usMCCount;
2618 USHORT tib2_fMCForceFlag;
2619 } TIB2;
2620 typedef TIB2 *PTIB2;
2621
2622 typedef struct tib_s
2623 {
2624 PVOID tib_pexchain;
2625 PVOID tib_pstack;
2626 PVOID tib_pstacklimit;
2627 PTIB2 tib_ptib2;
2628 ULONG tib_version;
2629 ULONG tib_ordinal;
2630 } TIB;
2631 typedef TIB *PTIB;
2632
2633 typedef struct pib_s
2634 {
2635 ULONG pib_ulpid;
2636 ULONG pib_ulppid;
2637 ULONG pib_hmte;
2638 PCHAR pib_pchcmd;
2639 PCHAR pib_pchenv;
2640 ULONG pib_flstatus;
2641 ULONG pib_ultype;
2642 } PIB;
2643 typedef PIB *PPIB;
2644
2645 typedef VOID (*PFNTHREAD)(ULONG ulThreadArg);
2646 typedef VOID (*PFNEXITLIST)(ULONG ulArg);
2647
2648
2649 ULONG DosAllocThreadLocalMemory (ULONG cb, PULONG *p);
2650 ULONG DosCreateThread (PTID ptidThreadID, PFNTHREAD pfnThreadAddr,
2651 ULONG ulThreadArg, ULONG ulFlags, ULONG ulStackSize);
2652 ULONG DosEnterCritSec (VOID);
2653 ULONG DosExecPgm (PCHAR pObjname, LONG lObjnameLength, ULONG ulFlagS,
2654 PCSZ pszArg, PCSZ pszEnv, PRESULTCODES pReturnCodes, PCSZ pszName);
2655 ULONG DosExitCritSec (VOID);
2656 ULONG DosExitList (ULONG ulOrder, PFNEXITLIST pfn);
2657 ULONG DosFreeThreadLocalMemory (ULONG *p);
2658 ULONG DosGetInfoBlocks (PTIB *ptib, PPIB *ppib);
2659 ULONG DosKillProcess (ULONG ulAction, PID pid);
2660 ULONG DosKillThread (TID tid);
2661 ULONG DosResumeThread (TID tid);
2662 ULONG DosSetPriority (ULONG ulScope, ULONG ulClass, LONG lDelta, ULONG ulID);
2663
2664 #define STDCALL __attribute__ ((stdcall))
2665 //#define CDECL __attribute__ ((cdecl))
2666 //#define CALLBACK WINAPI
2667 //#define PASCAL WINAPI
2668
2669 #define WINAPI STDCALL
2670 //#define APIENTRY STDCALL
2671
2672 //ULONG WINAPI DosSleep (ULONG ulInterval);
2673 ULONG DosSleep (ULONG ulInterval);
2674
2675 ULONG DosSuspendThread (TID tid);
2676 ULONG DosVerifyPidTid (PID pid, TID tid);
2677 ULONG DosWaitChild (ULONG ulAction, ULONG ulWait, PRESULTCODES pReturnCodes,
2678 PPID ppidOut, PID pidIn);
2679 ULONG DosWaitThread (PTID ptid, ULONG ulWait);
2680
2681 #endif /* INCL_DOSPROCESS */
2682
2683 /* ------------------------------ SESSIONS -------------------------------- */
2684
2685 #if defined (INCL_DOSSESMGR) || defined (INCL_DOSFILEMGR)
2686
2687 #define FAPPTYP_NOTSPEC 0x0000
2688 #define FAPPTYP_NOTWINDOWCOMPAT 0x0001
2689 #define FAPPTYP_WINDOWCOMPAT 0x0002
2690 #define FAPPTYP_WINDOWAPI 0x0003
2691 #define FAPPTYP_BOUND 0x0008
2692 #define FAPPTYP_DLL 0x0010
2693 #define FAPPTYP_DOS 0x0020
2694 #define FAPPTYP_PHYSDRV 0x0040
2695 #define FAPPTYP_VIRTDRV 0x0080
2696 #define FAPPTYP_PROTDLL 0x0100
2697 #define FAPPTYP_WINDOWSREAL 0x0200
2698 #define FAPPTYP_WINDOWSPROT 0x0400
2699 #define FAPPTYP_WINDOWSPROT31 0x1000
2700 #define FAPPTYP_32BIT 0x4000
2701 #define FAPPTYP_EXETYPE 0x0003
2702 #define FAPPTYP_RESERVED (~(FAPPTYP_WINDOWAPI | FAPPTYP_BOUND | \
2703 FAPPTYP_DLL | FAPPTYP_DOS | \
2704 FAPPTYP_PHYSDRV | FAPPTYP_VIRTDRV | \
2705 FAPPTYP_PROTDLL | FAPPTYP_32BIT))
2706
2707 #endif /* INCL_DOSSESMGR || INCL_DOSFILEMGR */
2708
2709 #if defined (INCL_DOSSESMGR)
2710
2711 #define SET_SESSION_UNCHANGED 0
2712 #define SET_SESSION_SELECTABLE 1
2713 #define SET_SESSION_NON_SELECTABLE 2
2714 #define SET_SESSION_BOND 1
2715 #define SET_SESSION_NO_BOND 2
2716
2717 #define SSF_RELATED_INDEPENDENT 0
2718 #define SSF_RELATED_CHILD 1
2719
2720 #define SSF_FGBG_FORE 0
2721 #define SSF_FGBG_BACK 1
2722
2723 #define SSF_TRACEOPT_NONE 0
2724 #define SSF_TRACEOPT_TRACE 1
2725 #define SSF_TRACEOPT_TRACEALL 2
2726
2727 #define SSF_INHERTOPT_SHELL 0
2728 #define SSF_INHERTOPT_PARENT 1
2729
2730 #define SSF_TYPE_DEFAULT 0
2731 #define SSF_TYPE_FULLSCREEN 1
2732 #define SSF_TYPE_WINDOWABLEVIO 2
2733 #define SSF_TYPE_PM 3
2734 #define SSF_TYPE_VDM 4
2735 #define SSF_TYPE_GROUP 5
2736 #define SSF_TYPE_DLL 6
2737 #define SSF_TYPE_WINDOWEDVDM 7
2738 #define SSF_TYPE_PDD 8
2739 #define SSF_TYPE_VDD 9
2740
2741 #define SSF_CONTROL_VISIBLE 0x0000
2742 #define SSF_CONTROL_INVISIBLE 0x0001
2743 #define SSF_CONTROL_MAXIMIZE 0x0002
2744 #define SSF_CONTROL_MINIMIZE 0x0004
2745 #define SSF_CONTROL_NOAUTOCLOSE 0x0008
2746 #define SSF_CONTROL_SETPOS 0x8000
2747
2748 #define STOP_SESSION_SPECIFIED 0
2749 #define STOP_SESSION_ALL 1
2750
2751 typedef struct _STARTDATA
2752 {
2753 USHORT Length;
2754 USHORT Related;
2755 USHORT FgBg;
2756 USHORT TraceOpt;
2757 PSZ PgmTitle;
2758 PSZ PgmName;
2759 PBYTE PgmInputs;
2760 PBYTE TermQ;
2761 PBYTE Environment;
2762 USHORT InheritOpt;
2763 USHORT SessionType;
2764 PSZ IconFile;
2765 ULONG PgmHandle;
2766 USHORT PgmControl;
2767 USHORT InitXPos;
2768 USHORT InitYPos;
2769 USHORT InitXSize;
2770 USHORT InitYSize;
2771 USHORT Reserved;
2772 PSZ ObjectBuffer;
2773 ULONG ObjectBuffLen;
2774 } STARTDATA;
2775 typedef STARTDATA *PSTARTDATA;
2776
2777 typedef struct _STATUSDATA
2778 {
2779 USHORT Length;
2780 USHORT SelectInd;
2781 USHORT BondInd;
2782 } STATUSDATA;
2783 typedef STATUSDATA *PSTATUSDATA;
2784
2785 ULONG DosQueryAppType (PCSZ pszName, PULONG pulFlags);
2786 ULONG DosSelectSession (ULONG ulIDSession);
2787 ULONG DosSetSession (ULONG ulIDSession, PSTATUSDATA psd);
2788 ULONG DosStartSession (PSTARTDATA psd, PULONG pulIDSession, PPID ppid);
2789 ULONG DosStopSession (ULONG ulScope, ULONG ulIDSession);
2790
2791 #endif /* INCL_DOSSESMGR */
2792
2793 /* ----------------------------- SEMAPHORES ------------------------------- */
2794
2795 #if defined (INCL_DOSSEMAPHORES) || !defined (INCL_NOCOMMON)
2796
2797 #define DC_SEM_SHARED 0x01
2798 #define DCMW_WAIT_ANY 0x02
2799 #define DCMW_WAIT_ALL 0x04
2800
2801 #define SEM_INDEFINITE_WAIT ((ULONG)-1)
2802 #define SEM_IMMEDIATE_RETURN 0
2803
2804 typedef ULONG HEV;
2805 typedef HEV *PHEV;
2806
2807 typedef struct _PSEMRECORD /* Note 1 */
2808 {
2809 HSEM hsemCur;
2810 ULONG ulUser;
2811 } SEMRECORD;
2812 typedef SEMRECORD *PSEMRECORD;
2813
2814 #endif /* INCL_DOSSEMAPHORES || !INCL_NOCOMMON */
2815
2816 #if defined (INCL_DOSSEMAPHORES)
2817
2818 ULONG DosCloseEventSem (HEV hev);
2819 ULONG DosCreateEventSem (PCSZ pszName, PHEV phev, ULONG ulAttr, BOOL32 fState);
2820 ULONG DosOpenEventSem (PCSZ pszName, PHEV phev);
2821 ULONG DosPostEventSem (HEV hev);
2822 ULONG DosQueryEventSem (HEV hev, PULONG pulCount);
2823 ULONG DosResetEventSem (HEV hev, PULONG pulCount);
2824 ULONG DosWaitEventSem (HEV hev, ULONG ulTimeout);
2825
2826 ULONG DosCloseMutexSem (HMTX hmtx);
2827 ULONG DosCreateMutexSem (PCSZ pszName, PHMTX phmtx, ULONG ulAttr,
2828 BOOL32 fState);
2829 ULONG DosOpenMutexSem (PCSZ pszName, PHMTX phmtx);
2830 ULONG DosQueryMutexSem (HMTX hmtx, PPID ppid, PTID ptid, PULONG pulCount);
2831 ULONG DosReleaseMutexSem (HMTX hmtx);
2832 ULONG DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
2833
2834 ULONG DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec);
2835 ULONG DosCloseMuxWaitSem (HMUX hmux);
2836 ULONG DosCreateMuxWaitSem (PCSZ pszName, PHMUX phmux, ULONG ulcSemRec,
2837 PSEMRECORD pSemRec, ULONG ulAttr);
2838 ULONG DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem);
2839 ULONG DosOpenMuxWaitSem (PCSZ pszName, PHMUX phmux);
2840 ULONG DosQueryMuxWaitSem (HMUX hmux, PULONG pulcSemRec, PSEMRECORD pSemRec,
2841 PULONG pulAttr);
2842 ULONG DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
2843
2844 #endif /* INCL_DOSSEMAPHORES */
2845
2846 /* ---------------------------- NAMED PIPES ------------------------------- */
2847
2848 #define NP_INDEFINITE_WAIT ((ULONG)-1)
2849 #define NP_DEFAULT_WAIT 0
2850
2851 #define NP_STATE_DISCONNECTED 1
2852 #define NP_STATE_LISTENING 2
2853 #define NP_STATE_CONNECTED 3
2854 #define NP_STATE_CLOSING 4
2855
2856 #define NP_ACCESS_INBOUND 0x0000
2857 #define NP_ACCESS_OUTBOUND 0x0001
2858 #define NP_ACCESS_DUPLEX 0x0002
2859 #define NP_INHERIT 0x0000
2860 #define NP_NOINHERIT 0x0080
2861 #define NP_WRITEBEHIND 0x0000
2862 #define NP_NOWRITEBEHIND 0x4000
2863
2864 #define NP_READMODE_BYTE 0x0000
2865 #define NP_READMODE_MESSAGE 0x0100
2866 #define NP_TYPE_BYTE 0x0000
2867 #define NP_TYPE_MESSAGE 0x0400
2868 #define NP_END_CLIENT 0x0000
2869 #define NP_END_SERVER 0x4000
2870 #define NP_WAIT 0x0000
2871 #define NP_NOWAIT 0x8000
2872 #define NP_UNLIMITED_INSTANCES 0x00ff
2873
2874 #define NP_NBLK NO_WAIT
2875 #define NP_SERVER NP_END_SERVER
2876 #define NP_WMESG NP_TYPE_MESSAGE
2877 #define NP_RMESG NP_READMODE_MESSAGE
2878 #define NP_ICOUNT 0x00ff
2879
2880 #define NPSS_EOI 0
2881 #define NPSS_RDATA 1
2882 #define NPSS_WSPACE 2
2883 #define NPSS_CLOSE 3
2884
2885 #define NPSS_WAIT 0x0001
2886
2887 typedef struct _AVAILDATA
2888 {
2889 USHORT cbpipe;
2890 USHORT cbmessage;
2891 } AVAILDATA;
2892 typedef AVAILDATA *PAVAILDATA;
2893
2894 typedef struct _PIPEINFO
2895 {
2896 USHORT cbOut;
2897 USHORT cbIn;
2898 BYTE cbMaxInst;
2899 BYTE cbCurInst;
2900 BYTE cbName;
2901 CHAR szName[1];
2902 } PIPEINFO;
2903 typedef PIPEINFO *PPIPEINFO;
2904
2905 typedef struct _PIPESEMSTATE
2906 {
2907 BYTE fStatus;
2908 BYTE fFlag;
2909 USHORT usKey;
2910 USHORT usAvail;
2911 } PIPESEMSTATE;
2912 typedef PIPESEMSTATE *PPIPESEMSTATE;
2913
2914 ULONG DosCallNPipe (PCSZ pszName, PVOID pInbuf, ULONG ulInbufLength,
2915 PVOID pOutbuf, ULONG ulOutbufSize, PULONG pulActualLength,
2916 ULONG ulTimeout);
2917 ULONG DosConnectNPipe (HPIPE hpipe);
2918 ULONG DosCreateNPipe (PCSZ pszName, PHPIPE phpipe, ULONG ulOpenMode,
2919 ULONG ulPipeMode, ULONG ulInbufLength, ULONG ulOutbufLength,
2920 ULONG ulTimeout);
2921 ULONG DosDisConnectNPipe (HPIPE hpipe);
2922 ULONG DosPeekNPipe (HPIPE hpipe, PVOID pBuf, ULONG ulBufLength,
2923 PULONG pulActualLength, PAVAILDATA pAvail, PULONG pulState);
2924 ULONG DosQueryNPHState (HPIPE hpipe, PULONG pulState);
2925 ULONG DosQueryNPipeInfo (HPIPE hpipe, ULONG ulInfoLevel, PVOID pBuf,
2926 ULONG ulBufLength);
2927 ULONG DosQueryNPipeSemState (HSEM hsem, PPIPESEMSTATE pState,
2928 ULONG ulBufLength);
2929 ULONG DosRawReadNPipe (PCSZ pszName, ULONG ulCount, PULONG pulLength,
2930 PVOID pBuf);
2931 ULONG DosRawWriteNPipe (PCSZ pszName, ULONG ulCount);
2932 ULONG DosSetNPHState (HPIPE hpipe, ULONG ulState);
2933 ULONG DosSetNPipeSem (HPIPE hpipe, HSEM hsem, ULONG ulKey);
2934 ULONG DosTransactNPipe (HPIPE hpipe, PVOID pOutbuf, ULONG ulOutbufLength,
2935 PVOID pInbuf, ULONG ulInbufLength, PULONG pulBytesRead);
2936 ULONG DosWaitNPipe (PCSZ pszName, ULONG ulTimeout);
2937
2938 /* ------------------------------- QUEUES --------------------------------- */
2939
2940 #if defined (INCL_DOSQUEUES)
2941
2942 #define QUE_FIFO 0x0000
2943 #define QUE_LIFO 0x0001
2944 #define QUE_PRIORITY 0x0002
2945 #define QUE_NOCONVERT_ADDRESS 0x0000
2946 #define QUE_CONVERT_ADDRESS 0x0004
2947
2948 typedef struct _REQUESTDATA
2949 {
2950 PID pid;
2951 ULONG ulData;
2952 } REQUESTDATA;
2953 typedef REQUESTDATA *PREQUESTDATA;
2954
2955 ULONG DosCreatePipe (PHFILE phfReadHandle, PHFILE phfWriteHandle,
2956 ULONG ulPipeSize);
2957
2958 ULONG DosCloseQueue (HQUEUE hq);
2959 ULONG DosCreateQueue (PHQUEUE phq, ULONG ulPriority, PCSZ pszName);
2960 ULONG DosOpenQueue (PPID ppid, PHQUEUE phq, PCSZ pszName);
2961 ULONG DosPeekQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
2962 PPVOID pDataAddress, PULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
2963 HEV hsem);
2964 ULONG DosPurgeQueue (HQUEUE hq);
2965 ULONG DosQueryQueue (HQUEUE hq, PULONG pulCount);
2966 ULONG DosReadQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
2967 PPVOID pDataAddress, ULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
2968 HEV hsem);
2969 ULONG DosWriteQueue (HQUEUE hq, ULONG ulRequest, ULONG ulDataLength,
2970 PVOID pData, ULONG ulPriority);
2971
2972 #endif /* INCL_DOSQUEUES */
2973
2974 /* --------------------------- EXCEPTIONS --------------------------------- */
2975
2976 #if defined (INCL_DOSEXCEPTIONS)
2977
2978 #define CONTEXT_CONTROL 0x0001
2979 #define CONTEXT_INTEGER 0x0002
2980 #define CONTEXT_SEGMENTS 0x0004
2981 #define CONTEXT_FLOATING_POINT 0x0008
2982 #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | \
2983 CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT)
2984
2985 #define EH_NONCONTINUABLE 0x0001
2986 #define EH_UNWINDING 0x0002
2987 #define EH_EXIT_UNWIND 0x0004
2988 #define EH_STACK_INVALID 0x0008
2989 #define EH_NESTED_CALL 0x0010
2990
2991 #define SIG_UNSETFOCUS 0
2992 #define SIG_SETFOCUS 1
2993
2994 #define UNWIND_ALL 0
2995
2996 #define XCPT_CONTINUE_SEARCH 0x00000000
2997 #define XCPT_CONTINUE_EXECUTION 0xffffffff
2998 #define XCPT_CONTINUE_STOP 0x00716668
2999
3000 #define XCPT_SIGNAL_INTR 1
3001 #define XCPT_SIGNAL_KILLPROC 3
3002 #define XCPT_SIGNAL_BREAK 4
3003
3004 #define XCPT_FATAL_EXCEPTION 0xc0000000
3005 #define XCPT_SEVERITY_CODE 0xc0000000
3006 #define XCPT_CUSTOMER_CODE 0x20000000
3007 #define XCPT_FACILITY_CODE 0x1fff0000
3008 #define XCPT_EXCEPTION_CODE 0x0000ffff
3009
3010 #define XCPT_UNKNOWN_ACCESS 0x00000000
3011 #define XCPT_READ_ACCESS 0x00000001
3012 #define XCPT_WRITE_ACCESS 0x00000002
3013 #define XCPT_EXECUTE_ACCESS 0x00000004
3014 #define XCPT_SPACE_ACCESS 0x00000008
3015 #define XCPT_LIMIT_ACCESS 0x00000010
3016 #define XCPT_DATA_UNKNOWN 0xffffffff
3017
3018 #define XCPT_GUARD_PAGE_VIOLATION 0x80000001
3019 #define XCPT_UNABLE_TO_GROW_STACK 0x80010001
3020 #define XCPT_ACCESS_VIOLATION 0xc0000005
3021 #define XCPT_IN_PAGE_ERROR 0xc0000006
3022 #define XCPT_ILLEGAL_INSTRUCTION 0xc000001c
3023 #define XCPT_INVALID_LOCK_SEQUENCE 0xc000001d
3024 #define XCPT_NONCONTINUABLE_EXCEPTION 0xc0000024
3025 #define XCPT_INVALID_DISPOSITION 0xc0000025
3026 #define XCPT_UNWIND 0xc0000026
3027 #define XCPT_BAD_STACK 0xc0000027
3028 #define XCPT_INVALID_UNWIND_TARGET 0xc0000028
3029 #define XCPT_ARRAY_BOUNDS_EXCEEDED 0xc0000093
3030 #define XCPT_FLOAT_DENORMAL_OPERAND 0xc0000094
3031 #define XCPT_FLOAT_DIVIDE_BY_ZERO 0xc0000095
3032 #define XCPT_FLOAT_INEXACT_RESULT 0xc0000096
3033 #define XCPT_FLOAT_INVALID_OPERATION 0xc0000097
3034 #define XCPT_FLOAT_OVERFLOW 0xc0000098
3035 #define XCPT_FLOAT_STACK_CHECK 0xc0000099
3036 #define XCPT_FLOAT_UNDERFLOW 0xc000009a
3037 #define XCPT_INTEGER_DIVIDE_BY_ZERO 0xc000009b
3038 #define XCPT_INTEGER_OVERFLOW 0xc000009c
3039 #define XCPT_PRIVILEGED_INSTRUCTION 0xc000009d
3040 #define XCPT_DATATYPE_MISALIGNMENT 0xc000009e
3041 #define XCPT_BREAKPOINT 0xc000009f
3042 #define XCPT_SINGLE_STEP 0xc00000a0
3043 #define XCPT_PROCESS_TERMINATE 0xc0010001
3044 #define XCPT_ASYNC_PROCESS_TERMINATE 0xc0010002
3045 #define XCPT_SIGNAL 0xc0010003
3046
3047 typedef struct _fpreg /* Note 1 */
3048 {
3049 ULONG losig;
3050 ULONG hisig;
3051 USHORT signexp;
3052 } FPREG;
3053 typedef FPREG *PFPREG;
3054
3055 typedef struct _CONTEXT /* Note 1 */
3056 {
3057 ULONG ContextFlags;
3058 ULONG ctx_env[7];
3059 FPREG ctx_stack[8];
3060 ULONG ctx_SegGs;
3061 ULONG ctx_SegFs;
3062 ULONG ctx_SegEs;
3063 ULONG ctx_SegDs;
3064 ULONG ctx_RegEdi;
3065 ULONG ctx_RegEsi;
3066 ULONG ctx_RegEax;
3067 ULONG ctx_RegEbx;
3068 ULONG ctx_RegEcx;
3069 ULONG ctx_RegEdx;
3070 ULONG ctx_RegEbp;
3071 ULONG ctx_RegEip;
3072 ULONG ctx_SegCs;
3073 ULONG ctx_EFlags;
3074 ULONG ctx_RegEsp;
3075 ULONG ctx_SegSs;
3076 } CONTEXTRECORD;
3077 typedef CONTEXTRECORD *PCONTEXTRECORD;
3078
3079 #define EXCEPTION_MAXIMUM_PARAMETERS 4
3080
3081 typedef struct _EXCEPTIONREPORTRECORD
3082 {
3083 ULONG ExceptionNum;
3084 ULONG fHandlerFlags;
3085 struct _EXCEPTIONREPORTRECORD * NestedExceptionReportRecord;
3086 PVOID ExceptionAddress;
3087 ULONG cParameters;
3088 ULONG ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS];
3089 } EXCEPTIONREPORTRECORD;
3090 typedef EXCEPTIONREPORTRECORD *PEXCEPTIONREPORTRECORD;
3091
3092 struct _EXCEPTIONREGISTRATIONRECORD;
3093
3094 typedef ULONG _ERR (PEXCEPTIONREPORTRECORD pReport,
3095 struct _EXCEPTIONREGISTRATIONRECORD *pRegistration,
3096 PCONTEXTRECORD pContext, PVOID pWhatever);
3097 typedef _ERR *ERR;
3098
3099 typedef struct _EXCEPTIONREGISTRATIONRECORD
3100 {
3101 struct _EXCEPTIONREGISTRATIONRECORD * __volatile__ prev_structure;
3102 ERR __volatile__ ExceptionHandler;
3103 } EXCEPTIONREGISTRATIONRECORD;
3104 typedef EXCEPTIONREGISTRATIONRECORD *PEXCEPTIONREGISTRATIONRECORD;
3105
3106 #define END_OF_CHAIN ((PEXCEPTIONREGISTRATIONRECORD)(-1))
3107
3108 ULONG DosAcknowledgeSignalException (ULONG ulSignal);
3109 ULONG DosEnterMustComplete (PULONG pulNesting);
3110 ULONG DosExitMustComplete (PULONG pulNesting);
3111 ULONG DosQueryThreadContext (TID tid, ULONG ulLevel, PCONTEXTRECORD pContext);
3112 ULONG DosRaiseException (PEXCEPTIONREPORTRECORD pXRepRec);
3113 ULONG DosSendSignalException (PID pid, ULONG ulSignal);
3114 ULONG DosSetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
3115 ULONG DosSetSignalExceptionFocus (BOOL32 flag, PULONG pulTimes);
3116 ULONG DosUnsetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
3117 ULONG DosUnwindException (PEXCEPTIONREGISTRATIONRECORD pXRegRec,
3118 PVOID pJumpThere, PEXCEPTIONREPORTRECORD pXRepRec);
3119
3120 #endif /* INCL_DOSEXCEPTIONS */
3121
3122 /* --------------------------- INFORMATION -------------------------------- */
3123
3124 #if defined (INCL_DOSMISC)
3125
3126 #define QSV_MAX_PATH_LENGTH 1
3127 #define QSV_MAX_TEXT_SESSIONS 2
3128 #define QSV_MAX_PM_SESSIONS 3
3129 #define QSV_MAX_VDM_SESSIONS 4
3130 #define QSV_BOOT_DRIVE 5
3131 #define QSV_DYN_PRI_VARIATION 6
3132 #define QSV_MAX_WAIT 7
3133 #define QSV_MIN_SLICE 8
3134 #define QSV_MAX_SLICE 9
3135 #define QSV_PAGE_SIZE 10
3136 #define QSV_VERSION_MAJOR 11
3137 #define QSV_VERSION_MINOR 12
3138 #define QSV_VERSION_REVISION 13
3139 #define QSV_MS_COUNT 14
3140 #define QSV_TIME_LOW 15
3141 #define QSV_TIME_HIGH 16
3142 #define QSV_TOTPHYSMEM 17
3143 #define QSV_TOTRESMEM 18
3144 #define QSV_TOTAVAILMEM 19
3145 #define QSV_MAXPRMEM 20
3146 #define QSV_MAXSHMEM 21
3147 #define QSV_TIMER_INTERVAL 22
3148 #define QSV_MAX_COMP_LENGTH 23
3149 #define QSV_FOREGROUND_FS_SESSION 24
3150 #define QSV_FOREGROUND_PROCESS 25
3151 #define QSV_MAX QSV_FOREGROUND_PROCESS
3152
3153 #define SIS_MMIOADDR 0
3154 #define SIS_MEC_TABLE 1
3155 #define SIS_SYS_LOG 2
3156
3157 ULONG DosQuerySysInfo (ULONG ulStart, ULONG ulLast, PVOID pBuf,
3158 ULONG ulBufLength);
3159 ULONG DosScanEnv (PCSZ pszName, PSZ *pszValue);
3160 ULONG DosQueryRASInfo (ULONG Index, PPVOID Addr);
3161
3162 #endif /* INCL_DOSMISC */
3163
3164 /* ---------------------------- TIMERS ------------------------------------ */
3165
3166 #if defined (INCL_DOSDATETIME) || !defined (INCL_NOCOMMON)
3167
3168 typedef struct _DATETIME
3169 {
3170 UCHAR hours;
3171 UCHAR minutes;
3172 UCHAR seconds;
3173 UCHAR hundredths;
3174 UCHAR day;
3175 UCHAR month;
3176 USHORT year;
3177 SHORT timezone;
3178 UCHAR weekday;
3179 } DATETIME;
3180 typedef DATETIME *PDATETIME;
3181
3182 ULONG DosGetDateTime (PDATETIME pdt);
3183 ULONG DosSetDateTime (__const__ DATETIME *pdt);
3184
3185 #endif /* INCL_DOSDATETIME || !INCL_NOCOMMON */
3186
3187
3188 #if defined (INCL_DOSDATETIME)
3189
3190 typedef LHANDLE HTIMER;
3191 typedef HTIMER *PHTIMER;
3192
3193 ULONG DosAsyncTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
3194 ULONG DosStartTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
3195 ULONG DosStopTimer (HTIMER htimer);
3196
3197 #endif /* INCL_DOSDATETIME */
3198
3199 #if defined (INCL_DOSPROFILE)
3200
3201 typedef struct _QWORD
3202 {
3203 ULONG ulLo;
3204 ULONG ulHi;
3205 } QWORD;
3206 typedef QWORD *PQWORD;
3207
3208 ULONG DosTmrQueryFreq (PULONG pulTmrFreq);
3209 ULONG DosTmrQueryTime (PQWORD pqwTmrTime);
3210
3211 #endif /* INCL_DOSPROFILE */
3212
3213 /* ---------------------- VIRTUAL DOS MACHINES----------------------------- */
3214
3215 typedef USHORT SGID;
3216
3217 #if defined (INCL_DOSMVDM)
3218
3219 typedef LHANDLE HVDD;
3220 typedef HVDD *PHVDD;
3221
3222 ULONG DosCloseVDD (HVDD hvdd);
3223 ULONG DosOpenVDD (PCSZ pszVDD, PHVDD phvdd);
3224 ULONG DosQueryDOSProperty (SGID sgidSesssionID, PCSZ pszName,
3225 ULONG ulBufferLength, PSZ pBuffer);
3226 ULONG DosRequestVDD (HVDD hvdd, SGID sgidSessionID, ULONG ulCommand,
3227 ULONG ulInputBufferLength, PVOID pInputBuffer,
3228 ULONG ulOutputBufferLength, PVOID pOutputBuffer);
3229 ULONG DosSetDOSProperty (SGID sgidSessionID, PCSZ pszName,
3230 ULONG ulBufferLength, PCSZ pBuffer);
3231
3232 #endif /* INCL_DOSMVDM */
3233
3234 /* --------------------------- DEBUGGING ---------------------------------- */
3235
3236 #if defined (INCL_DOSPROCESS)
3237
3238 #define DBG_C_Null 0
3239 #define DBG_C_ReadMem 1
3240 #define DBG_C_ReadMem_I 1
3241 #define DBG_C_ReadMem_D 2
3242 #define DBG_C_ReadReg 3
3243 #define DBG_C_WriteMem 4
3244 #define DBG_C_WriteMem_I 4
3245 #define DBG_C_WriteMem_D 5
3246 #define DBG_C_WriteReg 6
3247 #define DBG_C_Go 7
3248 #define DBG_C_Term 8
3249 #define DBG_C_SStep 9
3250 #define DBG_C_Stop 10
3251 #define DBG_C_Freeze 11
3252 #define DBG_C_Resume 12
3253 #define DBG_C_NumToAddr 13
3254 #define DBG_C_ReadCoRegs 14
3255 #define DBG_C_WriteCoRegs 15
3256 #define DBG_C_ThrdStat 17
3257 #define DBG_C_MapROAlias 18
3258 #define DBG_C_MapRWAlias 19
3259 #define DBG_C_UnMapAlias 20
3260 #define DBG_C_Connect 21
3261 #define DBG_C_ReadMemBuf 22
3262 #define DBG_C_WriteMemBuf 23
3263 #define DBG_C_SetWatch 24
3264 #define DBG_C_ClearWatch 25
3265 #define DBG_C_RangeStep 26
3266 #define DBG_C_Continue 27
3267 #define DBG_C_AddrToObject 28
3268 #define DBG_C_XchngOpcode 29
3269 #define DBG_C_LinToSel 30
3270 #define DBG_C_SelToLin 31
3271
3272 #define DBG_N_Success 0
3273 #define DBG_N_Error (-1)
3274 #define DBG_N_ProcTerm (-6)
3275 #define DBG_N_Exception (-7)
3276 #define DBG_N_ModuleLoad (-8)
3277 #define DBG_N_CoError (-9)
3278 #define DBG_N_ThreadTerm (-10)
3279 #define DBG_N_AsyncStop (-11)
3280 #define DBG_N_NewProc (-12)
3281 #define DBG_N_AliasFree (-13)
3282 #define DBG_N_Watchpoint (-14)
3283 #define DBG_N_ThreadCreate (-15)
3284 #define DBG_N_ModuleFree (-16)
3285 #define DBG_N_RangeStep (-17)
3286
3287 #define DBG_D_Thawed 0
3288 #define DBG_D_Frozen 1
3289
3290 #define DBG_T_Runnable 0
3291 #define DBG_T_Suspended 1
3292 #define DBG_T_Blocked 2
3293 #define DBG_T_CritSec 3
3294
3295 #define DBG_L_386 1
3296
3297 #define DBG_LEN_387 108
3298
3299 #define DBG_CO_387 1
3300
3301 #define DBG_O_OBJMTE 0x10000000
3302
3303 #define DBG_W_Global 0x00000001
3304 #define DBG_W_Local 0x00000002
3305 #define DBG_W_Execute 0x00010000
3306 #define DBG_W_Write 0x00020000
3307 #define DBG_W_ReadWrite 0x00030000
3308
3309 #define DBG_X_PRE_FIRST_CHANCE 0x00000000
3310 #define DBG_X_FIRST_CHANCE 0x00000001
3311 #define DBG_X_LAST_CHANCE 0x00000002
3312 #define DBG_X_STACK_INVALID 0x00000003
3313
3314 typedef struct _TStat
3315 {
3316 UCHAR DbgState;
3317 UCHAR TState;
3318 USHORT TPriority;
3319 } TStat_t;
3320
3321 typedef struct _uDB
3322 {
3323 ULONG Pid;
3324 ULONG Tid;
3325 LONG Cmd;
3326 LONG Value;
3327 ULONG Addr;
3328 ULONG Buffer;
3329 ULONG Len;
3330 ULONG Index;
3331 ULONG MTE;
3332 ULONG EAX;
3333 ULONG ECX;
3334 ULONG EDX;
3335 ULONG EBX;
3336 ULONG ESP;
3337 ULONG EBP;
3338 ULONG ESI;
3339 ULONG EDI;
3340 ULONG EFlags;
3341 ULONG EIP;
3342 ULONG CSLim;
3343 ULONG CSBase;
3344 UCHAR CSAcc;
3345 UCHAR CSAtr;
3346 USHORT CS;
3347 ULONG DSLim;
3348 ULONG DSBase;
3349 UCHAR DSAcc;
3350 UCHAR DSAtr;
3351 USHORT DS;
3352 ULONG ESLim;
3353 ULONG ESBase;
3354 UCHAR ESAcc;
3355 UCHAR ESAtr;
3356 USHORT ES;
3357 ULONG FSLim;
3358 ULONG FSBase;
3359 UCHAR FSAcc;
3360 UCHAR FSAtr;
3361 USHORT FS;
3362 ULONG GSLim;
3363 ULONG GSBase;
3364 UCHAR GSAcc;
3365 UCHAR GSAtr;
3366 USHORT GS;
3367 ULONG SSLim;
3368 ULONG SSBase;
3369 UCHAR SSAcc;
3370 UCHAR SSAtr;
3371 USHORT SS;
3372 } uDB_t;
3373
3374 ULONG DosDebug (uDB_t *pDebugBuffer);
3375
3376 #endif /* INCL_DOSPROCESS */
3377
3378 /* ---------------------------- MESSAGES ---------------------------------- */
3379
3380 #if defined (INCL_DOSMISC)
3381
3382 ULONG DosGetMessage (PCHAR *pTable, ULONG ulTableEntries,
3383 PCHAR pBuffer, ULONG ulBufferLengthMax, ULONG ulMsgnNumber,
3384 PCSZ pszFile, PULONG pulBufferLength);
3385 ULONG DosInsertMessage (PCHAR *pTable, ULONG ulCount, PCSZ pszMsg,
3386 ULONG ulMsgLength, PCHAR pBuffer, ULONG ulBufferLengthMax,
3387 PULONG pulBufferLength);
3388 ULONG DosPutMessage (HFILE hfile, ULONG ulMessageLength, PCHAR pMessage);
3389 ULONG DosQueryMessageCP (PCHAR pBuffer, ULONG ulBufferLengthMax,
3390 PCSZ pszFilename, PULONG pulBufferLength);
3391
3392 #endif /* INCL_DOSMISC */
3393
3394 /* ----------------------------- RAS -------------------------------------- */
3395
3396 #if defined (INCL_DOSRAS)
3397
3398 #define DDP_DISABLEPROCDUMP 0
3399 #define DDP_ENABLEPROCDUMP 1
3400 #define DDP_PERFORMPROCDUMP 2
3401
3402 #define LF_LOGENABLE 0x0001
3403 #define LF_LOGAVAILABLE 0x0002
3404
3405 #define SIS_MMIOADDR 0
3406 #define SIS_MEC_TABLE 1
3407 #define SIS_SYS_LOG 2
3408
3409 #define SPU_DISABLESUPPRESSION 0
3410 #define SPU_ENABLESUPPRESSION 1
3411
3412 ULONG DosDumpProcess (ULONG ulFlag, ULONG ulDrive, PID pid);
3413 ULONG DosForceSystemDump (ULONG ulReserved);
3414 ULONG DosQueryRASInfo (ULONG ulIndex, PPVOID addr);
3415 ULONG DosSuppressPopUps (ULONG ulFlag, ULONG ulDrive);
3416
3417 #endif /* INCL_DOSRAS */
3418
3419 /* ---------------------------- REXX -------------------------------------- */
3420
3421 #define RXAUTOBUFLEN 256
3422
3423 typedef struct _RXSTRING
3424 {
3425 ULONG strlength;
3426 PCH strptr;
3427 } RXSTRING;
3428 typedef RXSTRING *PRXSTRING;
3429
3430 typedef struct _RXSYSEXIT
3431 {
3432 PSZ sysexit_name;
3433 LONG sysexit_code;
3434 } RXSYSEXIT;
3435 typedef RXSYSEXIT *PRXSYSEXIT;
3436
3437 #define RXNULLSTRING(r) ((r).strptr == (PCH)0)
3438 #define RXZEROLENSTRING(r) ((r).strptr != (PCH)0 && (r).strlength == 0)
3439 #define RXVALIDSTRING(r) ((r).strptr != (PCH)0 && (r).strlength != 0)
3440 #define RXSTRLEN(r) (RXNULLSTRING(r) ? 0 : (r).strlength)
3441 #define RXSTRPTR(r) (r).strptr
3442 #define MAKERXSTRING(r,p,l) \
3443 ((r).strptr = (PCH)p, (r).strlength = (ULONG)l)
3444
3445 #define RXCOMMAND 0
3446 #define RXSUBROUTINE 1
3447 #define RXFUNCTION 2
3448
3449 #if defined (INCL_RXSUBCOM)
3450
3451 #define RXSUBCOM_DROPPABLE 0x0000
3452 #define RXSUBCOM_NONDROP 0x0001
3453
3454 #define RXSUBCOM_ISREG 0x0001
3455 #define RXSUBCOM_ERROR 0x0001
3456 #define RXSUBCOM_FAILURE 0x0002
3457
3458 #define RXSUBCOM_BADENTRY 1001
3459 #define RXSUBCOM_NOEMEM 1002
3460 #define RXSUBCOM_BADTYPE 1003
3461 #define RXSUBCOM_NOTINIT 1004
3462
3463 #define RXSUBCOM_OK 0
3464 #define RXSUBCOM_DUP 10
3465 #define RXSUBCOM_MAXREG 20
3466 #define RXSUBCOM_NOTREG 30
3467 #define RXSUBCOM_NOCANDROP 40
3468 #define RXSUBCOM_LOADERR 50
3469 #define RXSUBCOM_NOPROC 127
3470
3471 typedef ULONG RexxSubcomHandler (PRXSTRING prxCommand, PUSHORT pusFlags,
3472 PRXSTRING prxResult);
3473
3474 ULONG RexxDeregisterSubcom (PCSZ pszEnvName, PCSZ pszModuleName);
3475 ULONG RexxQuerySubcom (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlags,
3476 PUCHAR pUserWord);
3477 ULONG RexxRegisterSubcomDll (PCSZ pszEnvName, PCSZ pszModuleName,
3478 PCSZ pszEntryPoint, PUCHAR pUserArea, ULONG ulDropAuth);
3479 ULONG RexxRegisterSubcomExe (PCSZ pszEnvName, PFN pfnEntryPoint,
3480 PUCHAR pUserArea);
3481
3482 #define REXXDEREGISTERSUBCOM RexxDeregisterSubcom
3483 #define REXXREGISTERSUBCOMDLL RexxRegisterSubcomDll
3484 #define REXXREGISTERSUBCOMEXE RexxRegisterSubcomExe
3485 #define REXXQUERYSUBCOM RexxQuerySubcom
3486
3487 #endif /* INCL_RXSUBCOM */
3488
3489 #if defined (INCL_RXSHV)
3490
3491 #define RXSHV_SET 0x0000
3492 #define RXSHV_FETCH 0x0001
3493 #define RXSHV_DROPV 0x0002
3494 #define RXSHV_SYSET 0x0003
3495 #define RXSHV_SYFET 0x0004
3496 #define RXSHV_SYDRO 0x0005
3497 #define RXSHV_NEXTV 0x0006
3498 #define RXSHV_PRIV 0x0007
3499 #define RXSHV_EXIT 0x0008
3500
3501 #define RXSHV_NOAVL 144
3502
3503 #define RXSHV_OK 0x0000
3504 #define RXSHV_NEWV 0x0001
3505 #define RXSHV_LVAR 0x0002
3506 #define RXSHV_TRUNC 0x0004
3507 #define RXSHV_BADN 0x0008
3508 #define RXSHV_MEMFL 0x0010
3509 #define RXSHV_BADF 0x0080
3510
3511 typedef struct _SHVBLOCK
3512 {
3513 struct _SHVBLOCK *shvnext;
3514 RXSTRING shvname;
3515 RXSTRING shvvalue;
3516 ULONG shvnamelen;
3517 ULONG shvvaluelen;
3518 UCHAR shvcode;
3519 UCHAR shvret;
3520 } SHVBLOCK;
3521 typedef SHVBLOCK *PSHVBLOCK;
3522
3523 ULONG RexxVariablePool (PSHVBLOCK pRequest);
3524
3525 #define REXXVARIABLEPOOL RexxVariablePool
3526
3527 #endif /* INCL_RXSHV */
3528
3529 #if defined (INCL_RXFUNC)
3530
3531 #define RXFUNC_DYNALINK 1
3532 #define RXFUNC_CALLENTRY 2
3533
3534 #define RXFUNC_OK 0
3535 #define RXFUNC_DEFINED 10
3536 #define RXFUNC_NOMEM 20
3537 #define RXFUNC_NOTREG 30
3538 #define RXFUNC_MODNOTFND 40
3539 #define RXFUNC_ENTNOTFND 50
3540 #define RXFUNC_NOTINIT 60
3541 #define RXFUNC_BADTYPE 70
3542
3543 typedef ULONG RexxFunctionHandler (PCSZ pszName, ULONG ulArgCount,
3544 PRXSTRING prxArgList, PCSZ pszQueueName, PRXSTRING prxResult);
3545
3546 ULONG RexxDeregisterFunction (PCSZ pszFuncName);
3547 ULONG RexxQueryFunction (PCSZ pszFuncName);
3548 ULONG RexxRegisterFunctionDll (PCSZ pszFuncName, PCSZ pszModuleName,
3549 PCSZ pszEntryPoint);
3550 ULONG RexxRegisterFunctionExe (PCSZ pszFuncName,
3551 RexxFunctionHandler *pfnEntryPoint);
3552
3553 #define REXXDEREGISTERFUNCTION RexxDeregisterFunction
3554 #define REXXQUERYFUNCTION RexxQueryFunction
3555 #define REXXREGISTERFUNCTIONDLL RexxRegisterFunctionDll
3556 #define REXXREGISTERFUNCTIONEXE RexxRegisterFunctionExe
3557
3558 #endif /* INCL_RXFUNC */
3559
3560 #if defined (INCL_RXSYSEXIT)
3561
3562 #define RXEXIT_DROPPABLE 0x0000
3563 #define RXEXIT_NONDROP 0x0001
3564
3565 #define RXEXIT_HANDLED 0
3566 #define RXEXIT_NOT_HANDLED 1
3567 #define RXEXIT_RAISE_ERROR (-1)
3568
3569 #define RXEXIT_ISREG 0x0001
3570 #define RXEXIT_ERROR 0x0001
3571 #define RXEXIT_FAILURE 0x0002
3572
3573 #define RXEXIT_BADENTRY 1001
3574 #define RXEXIT_NOEMEM 1002
3575 #define RXEXIT_BADTYPE 1003
3576 #define RXEXIT_NOTINIT 1004
3577
3578 #define RXEXIT_OK 0
3579 #define RXEXIT_DUP 10
3580 #define RXEXIT_MAXREG 20
3581 #define RXEXIT_NOTREG 30
3582 #define RXEXIT_NOCANDROP 40
3583 #define RXEXIT_LOADERR 50
3584 #define RXEXIT_NOPROC 127
3585
3586 #define RXENDLST 0
3587
3588 #define RXFNC 2
3589 #define RXFNCCAL 1
3590
3591 #define RXCMD 3
3592 #define RXCMDHST 1
3593
3594 #define RXMSQ 4
3595 #define RXMSQPLL 1
3596 #define RXMSQPSH 2
3597 #define RXMSQSIZ 3
3598 #define RXMSQNAM 20
3599
3600 #define RXSIO 5
3601 #define RXSIOSAY 1
3602 #define RXSIOTRC 2
3603 #define RXSIOTRD 3
3604 #define RXSIODTR 4
3605 #define RXSIOTLL 5
3606
3607 #define RXHLT 7
3608 #define RXHLTCLR 1
3609 #define RXHLTTST 2
3610
3611 #define RXTRC 8
3612 #define RXTRCTST 1
3613
3614 #define RXINI 9
3615 #define RXINIEXT 1
3616
3617 #define RXTER 10
3618 #define RXTEREXT 1
3619
3620 #define RXNOOFEXITS 11
3621
3622 typedef PUCHAR PEXIT;
3623
3624 typedef struct _RXFNC_FLAGS
3625 {
3626 ULONG rxfferr : 1;
3627 ULONG rxffnfnd : 1;
3628 ULONG rxffsub : 1;
3629 } RXFNC_FLAGS;
3630
3631 typedef struct _RXFNCCAL_PARM
3632 {
3633 RXFNC_FLAGS rxfnc_flags;
3634 PUCHAR rxfnc_name;
3635 USHORT rxfnc_namel;
3636 PUCHAR rxfnc_que;
3637 USHORT rxfnc_quel;
3638 USHORT rxfnc_argc;
3639 PRXSTRING rxfnc_argv;
3640 RXSTRING rxfnc_retc;
3641 } RXFNCCAL_PARM;
3642
3643 typedef struct _RXCMD_FLAGS
3644 {
3645 ULONG rxfcfail : 1;
3646 ULONG rxfcerr : 1;
3647 } RXCMD_FLAGS;
3648
3649 typedef struct _RXCMDHST_PARM
3650 {
3651 RXCMD_FLAGS rxcmd_flags;
3652 PUCHAR rxcmd_address;
3653 USHORT rxcmd_addressl;
3654 PUCHAR rxcmd_dll;
3655 USHORT rxcmd_dll_len;
3656 RXSTRING rxcmd_command;
3657 RXSTRING rxcmd_retc;
3658 } RXCMDHST_PARM;
3659
3660 typedef struct _RXMSQPLL_PARM
3661 {
3662 RXSTRING rxmsq_retc;
3663 } RXMSQPLL_PARM;
3664
3665 typedef struct _RXMSQ_FLAGS
3666 {
3667 ULONG rxfmlifo : 1;
3668 } RXMSQ_FLAGS;
3669
3670 typedef struct _RXMSQPSH_PARM
3671 {
3672 RXMSQ_FLAGS rxmsq_flags;
3673 RXSTRING rxmsq_value;
3674 } RXMSQPSH_PARM;
3675
3676 typedef struct _RXMSQSIZ_PARM
3677 {
3678 ULONG rxmsq_size;
3679 } RXMSQSIZ_PARM;
3680
3681 typedef struct _RXMSQNAM_PARM
3682 {
3683 RXSTRING rxmsq_name;
3684 } RXMSQNAM_PARM;
3685
3686 typedef struct _RXSIOSAY_PARM
3687 {
3688 RXSTRING rxsio_string;
3689 } RXSIOSAY_PARM;
3690
3691 typedef struct _RXSIOTRC_PARM
3692 {
3693 RXSTRING rxsio_string;
3694 } RXSIOTRC_PARM;
3695
3696 typedef struct _RXSIOTRD_PARM
3697 {
3698 RXSTRING rxsiotrd_retc;
3699 } RXSIOTRD_PARM;
3700
3701 typedef struct _RXSIODR_PARM
3702 {
3703 RXSTRING rxsiodtr_retc;
3704 } RXSIODTR_PARM;
3705
3706 typedef struct _RXHLT_FLAGS
3707 {
3708 ULONG rxfhhalt : 1;
3709 } RXHLT_FLAGS;
3710
3711 typedef struct _RXHLTTST_PARM
3712 {
3713 RXHLT_FLAGS rxhlt_flags;
3714 } RXHLTTST_PARM;
3715
3716 typedef struct _RXTRC_FLAGS
3717 {
3718 ULONG rxftrace : 1;
3719 } RXTRC_FLAGS;
3720
3721 typedef struct _RXTRCTST_PARM
3722 {
3723 RXTRC_FLAGS rxtrc_flags;
3724 } RXTRCTST_PARM;
3725
3726 typedef LONG RexxExitHandler (LONG lExitNumber, LONG lSubfunction,
3727 PEXIT pParmBlock);
3728
3729 ULONG RexxDeregisterExit (PCSZ pszEnvName, PCSZ pszModuleName);
3730 ULONG RexxQueryExit (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlag,
3731 PUCHAR pUserWord);
3732 ULONG RexxRegisterExitDll (PCSZ pszEnvName, PCSZ pszModuleName,
3733 PCSZ pszEntryName, PUCHAR pUserArea, ULONG ulDropAuth);
3734 ULONG RexxRegisterExitExe (PCSZ pszEnvName, PFN pfnEntryPoint,
3735 PUCHAR pUserArea);
3736
3737 #define REXXDEREGISTEREXIT RexxDeregisterExit
3738 #define REXXQUERYEXIT RexxQueryExit
3739 #define REXXREGISTEREXITDLL RexxRegisterExitDll
3740 #define REXXREGISTEREXITEXE RexxRegisterExitExe
3741
3742 #endif /* INCL_RXSYSEXIT */
3743
3744 #if defined (INCL_RXARI)
3745
3746 #define RXARI_OK 0
3747 #define RXARI_NOT_FOUND 1
3748 #define RXARI_PROCESSING_ERROR 2
3749
3750 ULONG RexxResetTrace (PID pid, TID tid);
3751 ULONG RexxSetHalt (PID pid, TID tid);
3752 ULONG RexxSetTrace (PID pid, TID tid);
3753
3754 #define REXXRESETTRACE RexxResetTrace
3755 #define REXXSETHALT RexxSetHalt
3756 #define REXXSETTRACE RexxSetTrace
3757
3758 #endif /* INCL_RXARI */
3759
3760 #if defined (INCL_RXMACRO)
3761
3762 #define RXMACRO_SEARCH_BEFORE 1
3763 #define RXMACRO_SEARCH_AFTER 2
3764
3765 #define RXMACRO_OK 0
3766 #define RXMACRO_NO_STORAGE 1
3767 #define RXMACRO_NOT_FOUND 2
3768 #define RXMACRO_EXTENSION_REQUIRED 3
3769 #define RXMACRO_ALREADY_EXISTS 4
3770 #define RXMACRO_FILE_ERROR 5
3771 #define RXMACRO_SIGNATURE_ERROR 6
3772 #define RXMACRO_SOURCE_NOT_FOUND 7
3773 #define RXMACRO_INVALID_POSITION 8
3774 #define RXMACRO_NOT_INIT 9
3775
3776 ULONG RexxAddMacro (PCSZ pszFuncName, PCSZ pszSourceFile, ULONG ulPosition);
3777 ULONG RexxClearMacroSpace (VOID);
3778 ULONG RexxDropMacro (PCSZ pszFuncName);
3779 ULONG RexxLoadMacroSpace (ULONG ulFuncCout, PCSZ *apszFuncNames,
3780 PCSZ pszMacroLibFile);
3781 ULONG RexxQueryMacro (PCSZ pszFuncName, PUSHORT pusPosition);
3782 ULONG RexxReorderMacro(PCSZ pszFuncName, ULONG ulPosition);
3783 ULONG RexxSaveMacroSpace (ULONG ulFuncCount, PCSZ *apszFuncNames,
3784 PCSZ pszMacroLibFile);
3785
3786 #define REXXADDMACRO RexxAddMacro
3787 #define REXXCLEARMACROSPACE RexxClearMacroSpace
3788 #define REXXDROPMACRO RexxDropMacro
3789 #define REXXSAVEMACROSPACE RexxSaveMacroSpace
3790 #define REXXLOADMACROSPACE RexxLoadMacroSpace
3791 #define REXXQUERYMACRO RexxQueryMacro
3792 #define REXXREORDERMACRO RexxReorderMacro
3793
3794 #endif /* INCL_RXMACRO */
3795
3796 LONG RexxStart (LONG lArgCount, PRXSTRING prxArgList, PCSZ pszProgramName,
3797 PRXSTRING prxInstore, PCSZ pszEnvName, LONG lCallType, PRXSYSEXIT pExits,
3798 PSHORT psReturnCode, PRXSTRING prxResult);
3799
3800 #define REXXSTART RexxStart
3801
3802 /* ----------------------- PRESENTATION MANAGER --------------------------- */
3803
3804 #define CTLS_WM_BIDI_FIRST 0x390
3805 #define CTLS_WM_BIDI_LAST 0x39f
3806
3807 #if defined (INCL_NLS)
3808 #define WM_DBCSFIRST 0x00b0
3809 #define WM_DBCSLAST 0x00cf
3810 #endif /* INCL_NLS */
3811
3812 #define WC_FRAME ((PSZ)0xffff0001)
3813 #define WC_COMBOBOX ((PSZ)0xffff0002)
3814 #define WC_BUTTON ((PSZ)0xffff0003)
3815 #define WC_MENU ((PSZ)0xffff0004)
3816 #define WC_STATIC ((PSZ)0xffff0005)
3817 #define WC_ENTRYFIELD ((PSZ)0xffff0006)
3818 #define WC_LISTBOX ((PSZ)0xffff0007)
3819 #define WC_SCROLLBAR ((PSZ)0xffff0008)
3820 #define WC_TITLEBAR ((PSZ)0xffff0009)
3821 #define WC_MLE ((PSZ)0xffff000a)
3822 #define WC_APPSTAT ((PSZ)0xffff0010)
3823 #define WC_KBDSTAT ((PSZ)0xffff0011)
3824 #define WC_PECIC ((PSZ)0xffff0012)
3825 #define WC_DBE_KKPOPUP ((PSZ)0xffff0013)
3826 #define WC_SPINBUTTON ((PSZ)0xffff0020)
3827 #define WC_CONTAINER ((PSZ)0xffff0025)
3828 #define WC_SLIDER ((PSZ)0xffff0026)
3829 #define WC_VALUESET ((PSZ)0xffff0027)
3830 #define WC_NOTEBOOK ((PSZ)0xffff0028)
3831 #define WC_PENFIRST ((PSZ)0xffff0029)
3832 #define WC_PENLAST ((PSZ)0xffff002c)
3833 #define WC_MMPMFIRST ((PSZ)0xffff0040)
3834 #define WC_CIRCULARSLIDER ((PSZ)0xffff0041)
3835 #define WC_MMPMLAST ((PSZ)0xffff004f)
3836
3837 #define WS_VISIBLE 0x80000000
3838 #define WS_DISABLED 0x40000000
3839 #define WS_CLIPCHILDREN 0x20000000
3840 #define WS_CLIPSIBLINGS 0x10000000
3841 #define WS_PARENTCLIP 0x08000000
3842 #define WS_SAVEBITS 0x04000000
3843 #define WS_SYNCPAINT 0x02000000
3844 #define WS_MINIMIZED 0x01000000
3845 #define WS_MAXIMIZED 0x00800000
3846 #define WS_ANIMATE 0x00400000
3847 #define WS_GROUP 0x00010000
3848 #define WS_TABSTOP 0x00020000
3849 #define WS_MULTISELECT 0x00040000
3850
3851 #define CS_MOVENOTIFY 0x00000001
3852 #define CS_SIZEREDRAW 0x00000004
3853 #define CS_HITTEST 0x00000008
3854 #define CS_PUBLIC 0x00000010
3855 #define CS_FRAME 0x00000020
3856 #define CS_CLIPCHILDREN 0x20000000
3857 #define CS_CLIPSIBLINGS 0x10000000
3858 #define CS_PARENTCLIP 0x08000000
3859 #define CS_SAVEBITS 0x04000000
3860 #define CS_SYNCPAINT 0x02000000
3861
3862 #define MID_NONE (-1)
3863 #define MID_ERROR (-1)
3864
3865 #define DB_PATCOPY 0x0000
3866 #define DB_PATINVERT 0x0001
3867 #define DB_DESTINVERT 0x0002
3868 #define DB_AREAMIXMODE 0x0003
3869
3870 #define DB_ROP 0x0007
3871 #define DB_INTERIOR 0x0008
3872 #define DB_AREAATTRS 0x0010
3873 #define DB_STANDARD 0x0100
3874 #define DB_DLGBORDER 0x0200
3875
3876 #define DBM_NORMAL 0x0000
3877 #define DBM_INVERT 0x0001
3878 #define DBM_HALFTONE 0x0002
3879 #define DBM_STRETCH 0x0004
3880 #define DBM_IMAGEATTRS 0x0008
3881
3882 #define DT_LEFT 0x00000000
3883 #define DT_QUERYEXTENT 0x00000002
3884 #define DT_UNDERSCORE 0x00000010
3885 #define DT_STRIKEOUT 0x00000020
3886 #define DT_TEXTATTRS 0x00000040
3887 #define DT_EXTERNALLEADING 0x00000080
3888 #define DT_CENTER 0x00000100
3889 #define DT_RIGHT 0x00000200
3890 #define DT_TOP 0x00000000
3891 #define DT_VCENTER 0x00000400
3892 #define DT_BOTTOM 0x00000800
3893 #define DT_HALFTONE 0x00001000
3894 #define DT_MNEMONIC 0x00002000
3895 #define DT_WORDBREAK 0x00004000
3896 #define DT_ERASERECT 0x00008000
3897
3898 #define QW_NEXT 0
3899 #define QW_PREV 1
3900 #define QW_TOP 2
3901 #define QW_BOTTOM 3
3902 #define QW_OWNER 4
3903 #define QW_PARENT 5
3904 #define QW_NEXTTOP 6
3905 #define QW_PREVTOP 7
3906 #define QW_FRAMEOWNER 8
3907
3908 #define SWP_SIZE 0x0001
3909 #define SWP_MOVE 0x0002
3910 #define SWP_ZORDER 0x0004
3911 #define SWP_SHOW 0x0008
3912 #define SWP_HIDE 0x0010
3913 #define SWP_NOREDRAW 0x0020
3914 #define SWP_NOADJUST 0x0040
3915 #define SWP_ACTIVATE 0x0080
3916 #define SWP_DEACTIVATE 0x0100
3917 #define SWP_EXTSTATECHANGE 0x0200
3918 #define SWP_MINIMIZE 0x0400
3919 #define SWP_MAXIMIZE 0x0800
3920 #define SWP_RESTORE 0x1000
3921 #define SWP_FOCUSACTIVATE 0x2000
3922 #define SWP_FOCUSDEACTIVATE 0x4000
3923 #define SWP_NOAUTOCLOSE 0x8000
3924
3925 #define AWP_MINIMIZED 0x00010000
3926 #define AWP_MAXIMIZED 0x00020000
3927 #define AWP_RESTORED 0x00040000
3928 #define AWP_ACTIVATE 0x00080000
3929 #define AWP_DEACTIVATE 0x00100000
3930
3931 #define HWND_DESKTOP ((HWND)1)
3932 #define HWND_OBJECT ((HWND)2)
3933 #define HWND_TOP ((HWND)3)
3934 #define HWND_BOTTOM ((HWND)4)
3935 #define HWND_THREADCAPTURE ((HWND)5)
3936
3937 #define EAF_DEFAULTOWNER 0x0001
3938 #define EAF_UNCHANGEABLE 0x0002
3939 #define EAF_REUSEICON 0x0004
3940
3941 #define ICON_FILE 1
3942 #define ICON_RESOURCE 2
3943 #define ICON_DATA 3
3944 #define ICON_CLEAR 4
3945
3946 #define SZDDEFMT_RTF "Rich Text Format"
3947 #define SZDDEFMT_PTRPICT "Printer_Picture"
3948
3949 #define STR_DLLNAME "keyremap"
3950
3951 #if defined (INCL_WINERRORS)
3952
3953 #define PMERR_INVALID_HWND 0x1001
3954 #define PMERR_INVALID_HMQ 0x1002
3955 #define PMERR_PARAMETER_OUT_OF_RANGE 0x1003
3956 #define PMERR_WINDOW_LOCK_UNDERFLOW 0x1004
3957 #define PMERR_WINDOW_LOCK_OVERFLOW 0x1005
3958 #define PMERR_BAD_WINDOW_LOCK_COUNT 0x1006
3959 #define PMERR_WINDOW_NOT_LOCKED 0x1007
3960 #define PMERR_INVALID_SELECTOR 0x1008
3961 #define PMERR_CALL_FROM_WRONG_THREAD 0x1009
3962 #define PMERR_RESOURCE_NOT_FOUND 0x100a
3963 #define PMERR_INVALID_STRING_PARM 0x100b
3964 #define PMERR_INVALID_HHEAP 0x100c
3965 #define PMERR_INVALID_HEAP_POINTER 0x100d
3966 #define PMERR_INVALID_HEAP_SIZE_PARM 0x100e
3967 #define PMERR_INVALID_HEAP_SIZE 0x100f
3968 #define PMERR_INVALID_HEAP_SIZE_WORD 0x1010
3969 #define PMERR_HEAP_OUT_OF_MEMORY 0x1011
3970 #define PMERR_HEAP_MAX_SIZE_REACHED 0x1012
3971 #define PMERR_INVALID_HATOMTBL 0x1013
3972 #define PMERR_INVALID_ATOM 0x1014
3973 #define PMERR_INVALID_ATOM_NAME 0x1015
3974 #define PMERR_INVALID_INTEGER_ATOM 0x1016
3975 #define PMERR_ATOM_NAME_NOT_FOUND 0x1017
3976 #define PMERR_QUEUE_TOO_LARGE 0x1018
3977 #define PMERR_INVALID_FLAG 0x1019
3978 #define PMERR_INVALID_HACCEL 0x101a
3979 #define PMERR_INVALID_HPTR 0x101b
3980 #define PMERR_INVALID_HENUM 0x101c
3981 #define PMERR_INVALID_SRC_CODEPAGE 0x101d
3982 #define PMERR_INVALID_DST_CODEPAGE 0x101e
3983 #define PMERR_UNKNOWN_COMPONENT_ID 0x101f
3984 #define PMERR_UNKNOWN_ERROR_CODE 0x1020
3985 #define PMERR_SEVERITY_LEVELS 0x1021
3986 #define PMERR_INVALID_RESOURCE_FORMAT 0x1034
3987 #define PMERR_NO_MSG_QUEUE 0x1036
3988 #define PMERR_CANNOT_SET_FOCUS 0x1037
3989 #define PMERR_QUEUE_FULL 0x1038
3990 #define PMERR_LIBRARY_LOAD_FAILED 0x1039
3991 #define PMERR_PROCEDURE_LOAD_FAILED 0x103a
3992 #define PMERR_LIBRARY_DELETE_FAILED 0x103b
3993 #define PMERR_PROCEDURE_DELETE_FAILED 0x103c
3994 #define PMERR_ARRAY_TOO_LARGE 0x103d
3995 #define PMERR_ARRAY_TOO_SMALL 0x103e
3996 #define PMERR_DATATYPE_ENTRY_BAD_INDEX 0x103f
3997 #define PMERR_DATATYPE_ENTRY_CTL_BAD 0x1040
3998 #define PMERR_DATATYPE_ENTRY_CTL_MISS 0x1041
3999 #define PMERR_DATATYPE_ENTRY_INVALID 0x1042
4000 #define PMERR_DATATYPE_ENTRY_NOT_NUM 0x1043
4001 #define PMERR_DATATYPE_ENTRY_NOT_OFF 0x1044
4002 #define PMERR_DATATYPE_INVALID 0x1045
4003 #define PMERR_DATATYPE_NOT_UNIQUE 0x1046
4004 #define PMERR_DATATYPE_TOO_LONG 0x1047
4005 #define PMERR_DATATYPE_TOO_SMALL 0x1048
4006 #define PMERR_DIRECTION_INVALID 0x1049
4007 #define PMERR_INVALID_HAB 0x104a
4008 #define PMERR_INVALID_HSTRUCT 0x104d
4009 #define PMERR_LENGTH_TOO_SMALL 0x104e
4010 #define PMERR_MSGID_TOO_SMALL 0x104f
4011 #define PMERR_NO_HANDLE_ALLOC 0x1050
4012 #define PMERR_NOT_IN_A_PM_SESSION 0x1051
4013 #define PMERR_MSG_QUEUE_ALREADY_EXISTS 0x1052
4014 #define PMERR_SEND_MSG_TIMEOUT 0x1053
4015 #define PMERROR_SEND_MSG_FAILED 0x1054
4016 #define PMERR_OLD_RESOURCE 0x1055
4017 #define PMERR_WPDSERVER_IS_ACTIVE 0x1056
4018 #define PMERR_WPDSERVER_NOT_STARTED 0x1057
4019 #define PMERR_SOMDD_IS_ACTIVE 0x1058
4020 #define PMERR_SOMDD_NOT_STARTED 0x1059
4021
4022 #define PMERR_BIDI_FIRST 0x10f0
4023 #define PMERR_BIDI_LAST 0x10ff
4024
4025 #endif /* INCL_WINERRORS */
4026
4027 #if defined (INCL_SHLERRORS)
4028
4029 #define PMERR_INVALID_PIB 0x1101
4030 #define PMERR_INSUFF_SPACE_TO_ADD 0x1102
4031 #define PMERR_INVALID_GROUP_HANDLE 0x1103
4032 #define PMERR_DUPLICATE_TITLE 0x1104
4033 #define PMERR_INVALID_TITLE 0x1105
4034 #define PMERR_HANDLE_NOT_IN_GROUP 0x1107
4035 #define PMERR_INVALID_TARGET_HANDLE 0x1106
4036 #define PMERR_INVALID_PATH_STATEMENT 0x1108
4037 #define PMERR_NO_PROGRAM_FOUND 0x1109
4038 #define PMERR_INVALID_BUFFER_SIZE 0x110a
4039 #define PMERR_BUFFER_TOO_SMALL 0x110b
4040 #define PMERR_PL_INITIALISATION_FAIL 0x110c
4041 #define PMERR_CANT_DESTROY_SYS_GROUP 0x110d
4042 #define PMERR_INVALID_TYPE_CHANGE 0x110e
4043 #define PMERR_INVALID_PROGRAM_HANDLE 0x110f
4044 #define PMERR_NOT_CURRENT_PL_VERSION 0x1110
4045 #define PMERR_INVALID_CIRCULAR_REF 0x1111
4046 #define PMERR_MEMORY_ALLOCATION_ERR 0x1112
4047 #define PMERR_MEMORY_DEALLOCATION_ERR 0x1113
4048 #define PMERR_TASK_HEADER_TOO_BIG 0x1114
4049 #define PMERR_INVALID_INI_FILE_HANDLE 0x1115
4050 #define PMERR_MEMORY_SHARE 0x1116
4051 #define PMERR_OPEN_QUEUE 0x1117
4052 #define PMERR_CREATE_QUEUE 0x1118
4053 #define PMERR_WRITE_QUEUE 0x1119
4054 #define PMERR_READ_QUEUE 0x111a
4055 #define PMERR_CALL_NOT_EXECUTED 0x111b
4056 #define PMERR_UNKNOWN_APIPKT 0x111c
4057 #define PMERR_INITHREAD_EXISTS 0x111d
4058 #define PMERR_CREATE_THREAD 0x111e
4059 #define PMERR_NO_HK_PROFILE_INSTALLED 0x111f
4060 #define PMERR_INVALID_DIRECTORY 0x1120
4061 #define PMERR_WILDCARD_IN_FILENAME 0x1121
4062 #define PMERR_FILENAME_BUFFER_FULL 0x1122
4063 #define PMERR_FILENAME_TOO_LONG 0x1123
4064 #define PMERR_INI_FILE_IS_SYS_OR_USER 0x1124
4065 #define PMERR_BROADCAST_PLMSG 0x1125
4066 #define PMERR_190_INIT_DONE 0x1126
4067 #define PMERR_HMOD_FOR_PMSHAPI 0x1127
4068 #define PMERR_SET_HK_PROFILE 0x1128
4069 #define PMERR_API_NOT_ALLOWED 0x1129
4070 #define PMERR_INI_STILL_OPEN 0x112a
4071 #define PMERR_PROGDETAILS_NOT_IN_INI 0x112b
4072 #define PMERR_PIBSTRUCT_NOT_IN_INI 0x112c
4073 #define PMERR_INVALID_DISKPROGDETAILS 0x112d
4074 #define PMERR_PROGDETAILS_READ_FAILURE 0x112e
4075 #define PMERR_PROGDETAILS_WRITE_FAILURE 0x112f
4076 #define PMERR_PROGDETAILS_QSIZE_FAILURE 0x1130
4077 #define PMERR_INVALID_PROGDETAILS 0x1131
4078 #define PMERR_SHEPROFILEHOOK_NOT_FOUND 0x1132
4079 #define PMERR_190PLCONVERTED 0x1133
4080 #define PMERR_FAILED_TO_CONVERT_INI_PL 0x1134
4081 #define PMERR_PMSHAPI_NOT_INITIALISED 0x1135
4082 #define PMERR_INVALID_SHELL_API_HOOK_ID 0x1136
4083 #define PMERR_DOS_ERROR 0x1200
4084 #define PMERR_NO_SPACE 0x1201
4085 #define PMERR_INVALID_SWITCH_HANDLE 0x1202
4086 #define PMERR_NO_HANDLE 0x1203
4087 #define PMERR_INVALID_PROCESS_ID 0x1204
4088 #define PMERR_NOT_SHELL 0x1205
4089 #define PMERR_INVALID_WINDOW 0x1206
4090 #define PMERR_INVALID_POST_MSG 0x1207
4091 #define PMERR_INVALID_PARAMETERS 0x1208
4092 #define PMERR_INVALID_PROGRAM_TYPE 0x1209
4093 #define PMERR_NOT_EXTENDED_FOCUS 0x120a
4094 #define PMERR_INVALID_SESSION_ID 0x120b
4095 #define PMERR_SMG_INVALID_ICON_FILE 0x120c
4096 #define PMERR_SMG_ICON_NOT_CREATED 0x120d
4097 #define PMERR_SHL_DEBUG 0x120e
4098 #define PMERR_OPENING_INI_FILE 0x1301
4099 #define PMERR_INI_FILE_CORRUPT 0x1302
4100 #define PMERR_INVALID_PARM 0x1303
4101 #define PMERR_NOT_IN_IDX 0x1304
4102 #define PMERR_NO_ENTRIES_IN_GROUP 0x1305
4103 #define PMERR_INI_WRITE_FAIL 0x1306
4104 #define PMERR_IDX_FULL 0x1307
4105 #define PMERR_INI_PROTECTED 0x1308
4106 #define PMERR_MEMORY_ALLOC 0x1309
4107 #define PMERR_INI_INIT_ALREADY_DONE 0x130a
4108 #define PMERR_INVALID_INTEGER 0x130b
4109 #define PMERR_INVALID_ASCIIZ 0x130c
4110 #define PMERR_CAN_NOT_CALL_SPOOLER 0x130d
4111 #define PMERR_VALIDATION_REJECTED 0x130d /*!*/
4112 #define PMERR_WARNING_WINDOW_NOT_KILLED 0x1401
4113 #define PMERR_ERROR_INVALID_WINDOW 0x1402
4114 #define PMERR_ALREADY_INITIALIZED 0x1403
4115 #define PMERR_MSG_PROG_NO_MOU 0x1405
4116 #define PMERR_MSG_PROG_NON_RECOV 0x1406
4117 #define PMERR_WINCONV_INVALID_PATH 0x1407
4118 #define PMERR_PI_NOT_INITIALISED 0x1408
4119 #define PMERR_PL_NOT_INITIALISED 0x1409
4120 #define PMERR_NO_TASK_MANAGER 0x140a
4121 #define PMERR_SAVE_NOT_IN_PROGRESS 0x140b
4122 #define PMERR_NO_STACK_SPACE 0x140c
4123 #define PMERR_INVALID_COLR_FIELD 0x140d
4124 #define PMERR_INVALID_COLR_VALUE 0x140e
4125 #define PMERR_COLR_WRITE 0x140f
4126 #define PMERR_TARGET_FILE_EXISTS 0x1501
4127 #define PMERR_SOURCE_SAME_AS_TARGET 0x1502
4128 #define PMERR_SOURCE_FILE_NOT_FOUND 0x1503
4129 #define PMERR_INVALID_NEW_PATH 0x1504
4130 #define PMERR_TARGET_FILE_NOT_FOUND 0x1505
4131 #define PMERR_INVALID_DRIVE_NUMBER 0x1506
4132 #define PMERR_NAME_TOO_LONG 0x1507
4133 #define PMERR_NOT_ENOUGH_ROOM_ON_DISK 0x1508
4134 #define PMERR_NOT_ENOUGH_MEM 0x1509
4135 #define PMERR_LOG_DRV_DOES_NOT_EXIST 0x150b
4136 #define PMERR_INVALID_DRIVE 0x150c
4137 #define PMERR_ACCESS_DENIED 0x150d
4138 #define PMERR_NO_FIRST_SLASH 0x150e
4139 #define PMERR_READ_ONLY_FILE 0x150f
4140 #define PMERR_GROUP_PROTECTED 0x151f
4141 #define PMERR_INVALID_PROGRAM_CATEGORY 0x152f
4142 #define PMERR_INVALID_APPL 0x1530
4143 #define PMERR_CANNOT_START 0x1531
4144 #define PMERR_STARTED_IN_BACKGROUND 0x1532
4145 #define PMERR_INVALID_HAPP 0x1533
4146 #define PMERR_CANNOT_STOP 0x1534
4147 #define PMERR_INVALID_FREE_MESSAGE_ID 0x1630
4148 #define PMERR_FUNCTION_NOT_SUPPORTED 0x1641
4149 #define PMERR_INVALID_ARRAY_COUNT 0x1642
4150 #define PMERR_INVALID_LENGTH 0x1643
4151 #define PMERR_INVALID_BUNDLE_TYPE 0x1644
4152 #define PMERR_INVALID_PARAMETER 0x1645
4153 #define PMERR_INVALID_NUMBER_OF_PARMS 0x1646
4154 #define PMERR_GREATER_THAN_64K 0x1647
4155 #define PMERR_INVALID_PARAMETER_TYPE 0x1648
4156 #define PMERR_NEGATIVE_STRCOND_DIM 0x1649
4157 #define PMERR_INVALID_NUMBER_OF_TYPES 0x164a
4158 #define PMERR_INCORRECT_HSTRUCT 0x164b
4159 #define PMERR_INVALID_ARRAY_SIZE 0x164c
4160 #define PMERR_INVALID_CONTROL_DATATYPE 0x164d
4161 #define PMERR_INCOMPLETE_CONTROL_SEQU 0x164e
4162 #define PMERR_INVALID_DATATYPE 0x164f
4163 #define PMERR_INCORRECT_DATATYPE 0x1650
4164 #define PMERR_NOT_SELF_DESCRIBING_DTYP 0x1651
4165 #define PMERR_INVALID_CTRL_SEQ_INDEX 0x1652
4166 #define PMERR_INVALID_TYPE_FOR_LENGTH 0x1653
4167 #define PMERR_INVALID_TYPE_FOR_OFFSET 0x1654
4168 #define PMERR_INVALID_TYPE_FOR_MPARAM 0x1655
4169 #define PMERR_INVALID_MESSAGE_ID 0x1656
4170 #define PMERR_C_LENGTH_TOO_SMALL 0x1657
4171 #define PMERR_APPL_STRUCTURE_TOO_SMALL 0x1658
4172 #define PMERR_INVALID_ERRORINFO_HANDLE 0x1659
4173 #define PMERR_INVALID_CHARACTER_INDEX 0x165a
4174
4175 #endif /* INCL_SHLERRORS */
4176
4177 #if defined (INCL_GPIERRORS)
4178
4179 #define PMERR_OK 0x0000
4180 #define PMERR_ALREADY_IN_AREA 0x2001
4181 #define PMERR_ALREADY_IN_ELEMENT 0x2002
4182 #define PMERR_ALREADY_IN_PATH 0x2003
4183 #define PMERR_ALREADY_IN_SEG 0x2004
4184 #define PMERR_AREA_INCOMPLETE 0x2005
4185 #define PMERR_BASE_ERROR 0x2006
4186 #define PMERR_BITBLT_LENGTH_EXCEEDED 0x2007
4187 #define PMERR_BITMAP_IN_USE 0x2008
4188 #define PMERR_BITMAP_IS_SELECTED 0x2009
4189 #define PMERR_BITMAP_NOT_FOUND 0x200a
4190 #define PMERR_BITMAP_NOT_SELECTED 0x200b
4191 #define PMERR_BOUNDS_OVERFLOW 0x200c
4192 #define PMERR_CALLED_SEG_IS_CHAINED 0x200d
4193 #define PMERR_CALLED_SEG_IS_CURRENT 0x200e
4194 #define PMERR_CALLED_SEG_NOT_FOUND 0x200f
4195 #define PMERR_CANNOT_DELETE_ALL_DATA 0x2010
4196 #define PMERR_CANNOT_REPLACE_ELEMENT_0 0x2011
4197 #define PMERR_COL_TABLE_NOT_REALIZABLE 0x2012
4198 #define PMERR_COL_TABLE_NOT_REALIZED 0x2013
4199 #define PMERR_COORDINATE_OVERFLOW 0x2014
4200 #define PMERR_CORR_FORMAT_MISMATCH 0x2015
4201 #define PMERR_DATA_TOO_LONG 0x2016
4202 #define PMERR_DC_IS_ASSOCIATED 0x2017
4203 #define PMERR_DESC_STRING_TRUNCATED 0x2018
4204 #define PMERR_DEVICE_DRIVER_ERROR_1 0x2019
4205 #define PMERR_DEVICE_DRIVER_ERROR_2 0x201a
4206 #define PMERR_DEVICE_DRIVER_ERROR_3 0x201b
4207 #define PMERR_DEVICE_DRIVER_ERROR_4 0x201c
4208 #define PMERR_DEVICE_DRIVER_ERROR_5 0x201d
4209 #define PMERR_DEVICE_DRIVER_ERROR_6 0x201e
4210 #define PMERR_DEVICE_DRIVER_ERROR_7 0x201f
4211 #define PMERR_DEVICE_DRIVER_ERROR_8 0x2020
4212 #define PMERR_DEVICE_DRIVER_ERROR_9 0x2021
4213 #define PMERR_DEVICE_DRIVER_ERROR_10 0x2022
4214 #define PMERR_DEV_FUNC_NOT_INSTALLED 0x2023
4215 #define PMERR_DOSOPEN_FAILURE 0x2024
4216 #define PMERR_DOSREAD_FAILURE 0x2025
4217 #define PMERR_DRIVER_NOT_FOUND 0x2026
4218 #define PMERR_DUP_SEG 0x2027
4219 #define PMERR_DYNAMIC_SEG_SEQ_ERROR 0x2028
4220 #define PMERR_DYNAMIC_SEG_ZERO_INV 0x2029
4221 #define PMERR_ELEMENT_INCOMPLETE 0x202a
4222 #define PMERR_ESC_CODE_NOT_SUPPORTED 0x202b
4223 #define PMERR_EXCEEDS_MAX_SEG_LENGTH 0x202c
4224 #define PMERR_FONT_AND_MODE_MISMATCH 0x202d
4225 #define PMERR_FONT_FILE_NOT_LOADED 0x202e
4226 #define PMERR_FONT_NOT_LOADED 0x202f
4227 #define PMERR_FONT_TOO_BIG 0x2030
4228 #define PMERR_HARDWARE_INIT_FAILURE 0x2031
4229 #define PMERR_HBITMAP_BUSY 0x2032
4230 #define PMERR_HDC_BUSY 0x2033
4231 #define PMERR_HRGN_BUSY 0x2034
4232 #define PMERR_HUGE_FONTS_NOT_SUPPORTED 0x2035
4233 #define PMERR_ID_HAS_NO_BITMAP 0x2036
4234 #define PMERR_IMAGE_INCOMPLETE 0x2037
4235 #define PMERR_INCOMPAT_COLOR_FORMAT 0x2038
4236 #define PMERR_INCOMPAT_COLOR_OPTIONS 0x2039
4237 #define PMERR_INCOMPATIBLE_BITMAP 0x203a
4238 #define PMERR_INCOMPATIBLE_METAFILE 0x203b
4239 #define PMERR_INCORRECT_DC_TYPE 0x203c
4240 #define PMERR_INSUFFICIENT_DISK_SPACE 0x203d
4241 #define PMERR_INSUFFICIENT_MEMORY 0x203e
4242 #define PMERR_INV_ANGLE_PARM 0x203f
4243 #define PMERR_INV_ARC_CONTROL 0x2040
4244 #define PMERR_INV_AREA_CONTROL 0x2041
4245 #define PMERR_INV_ARC_POINTS 0x2042
4246 #define PMERR_INV_ATTR_MODE 0x2043
4247 #define PMERR_INV_BACKGROUND_COL_ATTR 0x2044
4248 #define PMERR_INV_BACKGROUND_MIX_ATTR 0x2045
4249 #define PMERR_INV_BITBLT_MIX 0x2046
4250 #define PMERR_INV_BITBLT_STYLE 0x2047
4251 #define PMERR_INV_BITMAP_DIMENSION 0x2048
4252 #define PMERR_INV_BOX_CONTROL 0x2049
4253 #define PMERR_INV_BOX_ROUNDING_PARM 0x204a
4254 #define PMERR_INV_CHAR_ANGLE_ATTR 0x204b
4255 #define PMERR_INV_CHAR_DIRECTION_ATTR 0x204c
4256 #define PMERR_INV_CHAR_MODE_ATTR 0x204d
4257 #define PMERR_INV_CHAR_POS_OPTIONS 0x204e
4258 #define PMERR_INV_CHAR_SET_ATTR 0x204f
4259 #define PMERR_INV_CHAR_SHEAR_ATTR 0x2050
4260 #define PMERR_INV_CLIP_PATH_OPTIONS 0x2051
4261 #define PMERR_INV_CODEPAGE 0x2052
4262 #define PMERR_INV_COLOR_ATTR 0x2053
4263 #define PMERR_INV_COLOR_DATA 0x2054
4264 #define PMERR_INV_COLOR_FORMAT 0x2055
4265 #define PMERR_INV_COLOR_INDEX 0x2056
4266 #define PMERR_INV_COLOR_OPTIONS 0x2057
4267 #define PMERR_INV_COLOR_START_INDEX 0x2058
4268 #define PMERR_INV_COORD_OFFSET 0x2059
4269 #define PMERR_INV_COORD_SPACE 0x205a
4270 #define PMERR_INV_COORDINATE 0x205b
4271 #define PMERR_INV_CORRELATE_DEPTH 0x205c
4272 #define PMERR_INV_CORRELATE_TYPE 0x205d
4273 #define PMERR_INV_CURSOR_BITMAP 0x205e
4274 #define PMERR_INV_DC_DATA 0x205f
4275 #define PMERR_INV_DC_TYPE 0x2060
4276 #define PMERR_INV_DEVICE_NAME 0x2061
4277 #define PMERR_INV_DEV_MODES_OPTIONS 0x2062
4278 #define PMERR_INV_DRAW_CONTROL 0x2063
4279 #define PMERR_INV_DRAW_VALUE 0x2064
4280 #define PMERR_INV_DRAWING_MODE 0x2065
4281 #define PMERR_INV_DRIVER_DATA 0x2066
4282 #define PMERR_INV_DRIVER_NAME 0x2067
4283 #define PMERR_INV_DRAW_BORDER_OPTION 0x2068
4284 #define PMERR_INV_EDIT_MODE 0x2069
4285 #define PMERR_INV_ELEMENT_OFFSET 0x206a
4286 #define PMERR_INV_ELEMENT_POINTER 0x206b
4287 #define PMERR_INV_END_PATH_OPTIONS 0x206c
4288 #define PMERR_INV_ESC_CODE 0x206d
4289 #define PMERR_INV_ESCAPE_DATA 0x206e
4290 #define PMERR_INV_EXTENDED_LCID 0x206f
4291 #define PMERR_INV_FILL_PATH_OPTIONS 0x2070
4292 #define PMERR_INV_FIRST_CHAR 0x2071
4293 #define PMERR_INV_FONT_ATTRS 0x2072
4294 #define PMERR_INV_FONT_FILE_DATA 0x2073
4295 #define PMERR_INV_FOR_THIS_DC_TYPE 0x2074
4296 #define PMERR_INV_FORMAT_CONTROL 0x2075
4297 #define PMERR_INV_FORMS_CODE 0x2076
4298 #define PMERR_INV_FONTDEF 0x2077
4299 #define PMERR_INV_GEOM_LINE_WIDTH_ATTR 0x2078
4300 #define PMERR_INV_GETDATA_CONTROL 0x2079
4301 #define PMERR_INV_GRAPHICS_FIELD 0x207a
4302 #define PMERR_INV_HBITMAP 0x207b
4303 #define PMERR_INV_HDC 0x207c
4304 #define PMERR_INV_HJOURNAL 0x207d
4305 #define PMERR_INV_HMF 0x207e
4306 #define PMERR_INV_HPS 0x207f
4307 #define PMERR_INV_HRGN 0x2080
4308 #define PMERR_INV_ID 0x2081
4309 #define PMERR_INV_IMAGE_DATA_LENGTH 0x2082
4310 #define PMERR_INV_IMAGE_DIMENSION 0x2083
4311 #define PMERR_INV_IMAGE_FORMAT 0x2084
4312 #define PMERR_INV_IN_AREA 0x2085
4313 #define PMERR_INV_IN_CALLED_SEG 0x2086
4314 #define PMERR_INV_IN_CURRENT_EDIT_MODE 0x2087
4315 #define PMERR_INV_IN_DRAW_MODE 0x2088
4316 #define PMERR_INV_IN_ELEMENT 0x2089
4317 #define PMERR_INV_IN_IMAGE 0x208a
4318 #define PMERR_INV_IN_PATH 0x208b
4319 #define PMERR_INV_IN_RETAIN_MODE 0x208c
4320 #define PMERR_INV_IN_SEG 0x208d
4321 #define PMERR_INV_IN_VECTOR_SYMBOL 0x208e
4322 #define PMERR_INV_INFO_TABLE 0x208f
4323 #define PMERR_INV_JOURNAL_OPTION 0x2090
4324 #define PMERR_INV_KERNING_FLAGS 0x2091
4325 #define PMERR_INV_LENGTH_OR_COUNT 0x2092
4326 #define PMERR_INV_LINE_END_ATTR 0x2093
4327 #define PMERR_INV_LINE_JOIN_ATTR 0x2094
4328 #define PMERR_INV_LINE_TYPE_ATTR 0x2095
4329 #define PMERR_INV_LINE_WIDTH_ATTR 0x2096
4330 #define PMERR_INV_LOGICAL_ADDRESS 0x2097
4331 #define PMERR_INV_MARKER_BOX_ATTR 0x2098
4332 #define PMERR_INV_MARKER_SET_ATTR 0x2099
4333 #define PMERR_INV_MARKER_SYMBOL_ATTR 0x209a
4334 #define PMERR_INV_MATRIX_ELEMENT 0x209b
4335 #define PMERR_INV_MAX_HITS 0x209c
4336 #define PMERR_INV_METAFILE 0x209d
4337 #define PMERR_INV_METAFILE_LENGTH 0x209e
4338 #define PMERR_INV_METAFILE_OFFSET 0x209f
4339 #define PMERR_INV_MICROPS_DRAW_CONTROL 0x20a0
4340 #define PMERR_INV_MICROPS_FUNCTION 0x20a1
4341 #define PMERR_INV_MICROPS_ORDER 0x20a2
4342 #define PMERR_INV_MIX_ATTR 0x20a3
4343 #define PMERR_INV_MODE_FOR_OPEN_DYN 0x20a4
4344 #define PMERR_INV_MODE_FOR_REOPEN_SEG 0x20a5
4345 #define PMERR_INV_MODIFY_PATH_MODE 0x20a6
4346 #define PMERR_INV_MULTIPLIER 0x20a7
4347 #define PMERR_INV_NESTED_FIGURES 0x20a8
4348 #define PMERR_INV_OR_INCOMPAT_OPTIONS 0x20a9
4349 #define PMERR_INV_ORDER_LENGTH 0x20aa
4350 #define PMERR_INV_ORDERING_PARM 0x20ab
4351 #define PMERR_INV_OUTSIDE_DRAW_MODE 0x20ac
4352 #define PMERR_INV_PAGE_VIEWPORT 0x20ad
4353 #define PMERR_INV_PATH_ID 0x20ae
4354 #define PMERR_INV_PATH_MODE 0x20af
4355 #define PMERR_INV_PATTERN_ATTR 0x20b0
4356 #define PMERR_INV_PATTERN_REF_PT_ATTR 0x20b1
4357 #define PMERR_INV_PATTERN_SET_ATTR 0x20b2
4358 #define PMERR_INV_PATTERN_SET_FONT 0x20b3
4359 #define PMERR_INV_PICK_APERTURE_OPTION 0x20b4
4360 #define PMERR_INV_PICK_APERTURE_POSN 0x20b5
4361 #define PMERR_INV_PICK_APERTURE_SIZE 0x20b6
4362 #define PMERR_INV_PICK_NUMBER 0x20b7
4363 #define PMERR_INV_PLAY_METAFILE_OPTION 0x20b8
4364 #define PMERR_INV_PRIMITIVE_TYPE 0x20b9
4365 #define PMERR_INV_PS_SIZE 0x20ba
4366 #define PMERR_INV_PUTDATA_FORMAT 0x20bb
4367 #define PMERR_INV_QUERY_ELEMENT_NO 0x20bc
4368 #define PMERR_INV_RECT 0x20bd
4369 #define PMERR_INV_REGION_CONTROL 0x20be
4370 #define PMERR_INV_REGION_MIX_MODE 0x20bf
4371 #define PMERR_INV_REPLACE_MODE_FUNC 0x20c0
4372 #define PMERR_INV_RESERVED_FIELD 0x20c1
4373 #define PMERR_INV_RESET_OPTIONS 0x20c2
4374 #define PMERR_INV_RGBCOLOR 0x20c3
4375 #define PMERR_INV_SCAN_START 0x20c4
4376 #define PMERR_INV_SEG_ATTR 0x20c5
4377 #define PMERR_INV_SEG_ATTR_VALUE 0x20c6
4378 #define PMERR_INV_SEG_CH_LENGTH 0x20c7
4379 #define PMERR_INV_SEG_NAME 0x20c8
4380 #define PMERR_INV_SEG_OFFSET 0x20c9
4381 #define PMERR_INV_SETID 0x20ca
4382 #define PMERR_INV_SETID_TYPE 0x20cb
4383 #define PMERR_INV_SET_VIEWPORT_OPTION 0x20cc
4384 #define PMERR_INV_SHARPNESS_PARM 0x20cd
4385 #define PMERR_INV_SOURCE_OFFSET 0x20ce
4386 #define PMERR_INV_STOP_DRAW_VALUE 0x20cf
4387 #define PMERR_INV_TRANSFORM_TYPE 0x20d0
4388 #define PMERR_INV_USAGE_PARM 0x20d1
4389 #define PMERR_INV_VIEWING_LIMITS 0x20d2
4390 #define PMERR_JFILE_BUSY 0x20d3
4391 #define PMERR_JNL_FUNC_DATA_TOO_LONG 0x20d4
4392 #define PMERR_KERNING_NOT_SUPPORTED 0x20d5
4393 #define PMERR_LABEL_NOT_FOUND 0x20d6
4394 #define PMERR_MATRIX_OVERFLOW 0x20d7
4395 #define PMERR_METAFILE_INTERNAL_ERROR 0x20d8
4396 #define PMERR_METAFILE_IN_USE 0x20d9
4397 #define PMERR_METAFILE_LIMIT_EXCEEDED 0x20da
4398 #define PMERR_NAME_STACK_FULL 0x20db
4399 #define PMERR_NOT_CREATED_BY_DEVOPENDC 0x20dc
4400 #define PMERR_NOT_IN_AREA 0x20dd
4401 #define PMERR_NOT_IN_DRAW_MODE 0x20de
4402 #define PMERR_NOT_IN_ELEMENT 0x20df
4403 #define PMERR_NOT_IN_IMAGE 0x20e0
4404 #define PMERR_NOT_IN_PATH 0x20e1
4405 #define PMERR_NOT_IN_RETAIN_MODE 0x20e2
4406 #define PMERR_NOT_IN_SEG 0x20e3
4407 #define PMERR_NO_BITMAP_SELECTED 0x20e4
4408 #define PMERR_NO_CURRENT_ELEMENT 0x20e5
4409 #define PMERR_NO_CURRENT_SEG 0x20e6
4410 #define PMERR_NO_METAFILE_RECORD_HANDLE 0x20e7
4411 #define PMERR_ORDER_TOO_BIG 0x20e8
4412 #define PMERR_OTHER_SET_ID_REFS 0x20e9
4413 #define PMERR_OVERRAN_SEG 0x20ea
4414 #define PMERR_OWN_SET_ID_REFS 0x20eb
4415 #define PMERR_PATH_INCOMPLETE 0x20ec
4416 #define PMERR_PATH_LIMIT_EXCEEDED 0x20ed
4417 #define PMERR_PATH_UNKNOWN 0x20ee
4418 #define PMERR_PEL_IS_CLIPPED 0x20ef
4419 #define PMERR_PEL_NOT_AVAILABLE 0x20f0
4420 #define PMERR_PRIMITIVE_STACK_EMPTY 0x20f1
4421 #define PMERR_PROLOG_ERROR 0x20f2
4422 #define PMERR_PROLOG_SEG_ATTR_NOT_SET 0x20f3
4423 #define PMERR_PS_BUSY 0x20f4
4424 #define PMERR_PS_IS_ASSOCIATED 0x20f5
4425 #define PMERR_RAM_JNL_FILE_TOO_SMALL 0x20f6
4426 #define PMERR_REALIZE_NOT_SUPPORTED 0x20f7
4427 #define PMERR_REGION_IS_CLIP_REGION 0x20f8
4428 #define PMERR_RESOURCE_DEPLETION 0x20f9
4429 #define PMERR_SEG_AND_REFSEG_ARE_SAME 0x20fa
4430 #define PMERR_SEG_CALL_RECURSIVE 0x20fb
4431 #define PMERR_SEG_CALL_STACK_EMPTY 0x20fc
4432 #define PMERR_SEG_CALL_STACK_FULL 0x20fd
4433 #define PMERR_SEG_IS_CURRENT 0x20fe
4434 #define PMERR_SEG_NOT_CHAINED 0x20ff
4435 #define PMERR_SEG_NOT_FOUND 0x2100
4436 #define PMERR_SEG_STORE_LIMIT_EXCEEDED 0x2101
4437 #define PMERR_SETID_IN_USE 0x2102
4438 #define PMERR_SETID_NOT_FOUND 0x2103
4439 #define PMERR_STARTDOC_NOT_ISSUED 0x2104
4440 #define PMERR_STOP_DRAW_OCCURRED 0x2105
4441 #define PMERR_TOO_MANY_METAFILES_IN_USE 0x2106
4442 #define PMERR_TRUNCATED_ORDER 0x2107
4443 #define PMERR_UNCHAINED_SEG_ZERO_INV 0x2108
4444 #define PMERR_UNSUPPORTED_ATTR 0x2109
4445 #define PMERR_UNSUPPORTED_ATTR_VALUE 0x210a
4446 #define PMERR_ENDDOC_NOT_ISSUED 0x210b
4447 #define PMERR_PS_NOT_ASSOCIATED 0x210c
4448 #define PMERR_INV_FLOOD_FILL_OPTIONS 0x210d
4449 #define PMERR_INV_FACENAME 0x210e
4450 #define PMERR_PALETTE_SELECTED 0x210f
4451 #define PMERR_NO_PALETTE_SELECTED 0x2110
4452 #define PMERR_INV_HPAL 0x2111
4453 #define PMERR_PALETTE_BUSY 0x2112
4454 #define PMERR_START_POINT_CLIPPED 0x2113
4455 #define PMERR_NO_FILL 0x2114
4456 #define PMERR_INV_FACENAMEDESC 0x2115
4457 #define PMERR_INV_BITMAP_DATA 0x2116
4458 #define PMERR_INV_CHAR_ALIGN_ATTR 0x2117
4459 #define PMERR_INV_HFONT 0x2118
4460 #define PMERR_HFONT_IS_SELECTED 0x2119
4461 #define PMERR_DRVR_NOT_SUPPORTED 0x2120
4462 #define PMERR_INV_INKPS_FUNCTION 0x2121
4463
4464 #endif /* INCL_GPIERRORS */
4465
4466 #if defined (INCL_WPERRORS)
4467
4468 #define WPERR_PROTECTED_CLASS 0x1700
4469 #define WPERR_INVALID_CLASS 0x1701
4470 #define WPERR_INVALID_SUPERCLASS 0x1702
4471 #define WPERR_NO_MEMORY 0x1703
4472 #define WPERR_SEMAPHORE_ERROR 0x1704
4473 #define WPERR_BUFFER_TOO_SMALL 0x1705
4474 #define WPERR_CLSLOADMOD_FAILED 0x1706
4475 #define WPERR_CLSPROCADDR_FAILED 0x1707
4476 #define WPERR_OBJWORD_LOCATION 0x1708
4477 #define WPERR_INVALID_OBJECT 0x1709
4478 #define WPERR_MEMORY_CLEANUP 0x170a
4479 #define WPERR_INVALID_MODULE 0x170b
4480 #define WPERR_INVALID_OLDCLASS 0x170c
4481 #define WPERR_INVALID_NEWCLASS 0x170d
4482 #define WPERR_NOT_IMMEDIATE_CHILD 0x170e
4483 #define WPERR_NOT_WORKPLACE_CLASS 0x170f
4484 #define WPERR_CANT_REPLACE_METACLS 0x1710
4485 #define WPERR_INI_FILE_WRITE 0x1711
4486 #define WPERR_INVALID_FOLDER 0x1712
4487 #define WPERR_BUFFER_OVERFLOW 0x1713
4488 #define WPERR_OBJECT_NOT_FOUND 0x1714
4489 #define WPERR_INVALID_HFIND 0x1715
4490 #define WPERR_INVALID_COUNT 0x1716
4491 #define WPERR_INVALID_BUFFER 0x1717
4492 #define WPERR_ALREADY_EXISTS 0x1718
4493 #define WPERR_INVALID_FLAGS 0x1719
4494 #define WPERR_INVALID_OBJECTID 0x1720
4495 #define WPERR_INVALID_TARGET_OBJECT 0x1721
4496
4497 #endif /* INCL_WPERRORS */
4498
4499 #if defined (INCL_SPLERRORS)
4500
4501 #define PMERR_SPL_DRIVER_ERROR 0x4001
4502 #define PMERR_SPL_DEVICE_ERROR 0x4002
4503 #define PMERR_SPL_DEVICE_NOT_INSTALLED 0x4003
4504 #define PMERR_SPL_QUEUE_ERROR 0x4004
4505 #define PMERR_SPL_INV_HSPL 0x4005
4506 #define PMERR_SPL_NO_DISK_SPACE 0x4006
4507 #define PMERR_SPL_NO_MEMORY 0x4007
4508 #define PMERR_SPL_PRINT_ABORT 0x4008
4509 #define PMERR_SPL_SPOOLER_NOT_INSTALLED 0x4009
4510 #define PMERR_SPL_INV_FORMS_CODE 0x400a
4511 #define PMERR_SPL_INV_PRIORITY 0x400b
4512 #define PMERR_SPL_NO_FREE_JOB_ID 0x400c
4513 #define PMERR_SPL_NO_DATA 0x400d
4514 #define PMERR_SPL_INV_TOKEN 0x400e
4515 #define PMERR_SPL_INV_DATATYPE 0x400f
4516 #define PMERR_SPL_PROCESSOR_ERROR 0x4010
4517 #define PMERR_SPL_INV_JOB_ID 0x4011
4518 #define PMERR_SPL_JOB_NOT_PRINTING 0x4012
4519 #define PMERR_SPL_JOB_PRINTING 0x4013
4520 #define PMERR_SPL_QUEUE_ALREADY_EXISTS 0x4014
4521 #define PMERR_SPL_INV_QUEUE_NAME 0x4015
4522 #define PMERR_SPL_QUEUE_NOT_EMPTY 0x4016
4523 #define PMERR_SPL_DEVICE_ALREADY_EXISTS 0x4017
4524 #define PMERR_SPL_DEVICE_LIMIT_REACHED 0x4018
4525 #define PMERR_SPL_STATUS_STRING_TRUNC 0x4019
4526 #define PMERR_SPL_INV_LENGTH_OR_COUNT 0x401a
4527 #define PMERR_SPL_FILE_NOT_FOUND 0x401b
4528 #define PMERR_SPL_CANNOT_OPEN_FILE 0x401c
4529 #define PMERR_SPL_DRIVER_NOT_INSTALLED 0x401d
4530 #define PMERR_SPL_INV_PROCESSOR_DATTYPE 0x401e
4531 #define PMERR_SPL_INV_DRIVER_DATATYPE 0x401f
4532 #define PMERR_SPL_PROCESSOR_NOT_INST 0x4020
4533 #define PMERR_SPL_NO_SUCH_LOG_ADDRESS 0x4021
4534 #define PMERR_SPL_PRINTER_NOT_FOUND 0x4022
4535 #define PMERR_SPL_DD_NOT_FOUND 0x4023
4536 #define PMERR_SPL_QUEUE_NOT_FOUND 0x4024
4537 #define PMERR_SPL_MANY_QUEUES_ASSOC 0x4025
4538 #define PMERR_SPL_NO_QUEUES_ASSOCIATED 0x4026
4539 #define PMERR_SPL_INI_FILE_ERROR 0x4027
4540 #define PMERR_SPL_NO_DEFAULT_QUEUE 0x4028
4541 #define PMERR_SPL_NO_CURRENT_FORMS_CODE 0x4029
4542 #define PMERR_SPL_NOT_AUTHORISED 0x402a
4543 #define PMERR_SPL_TEMP_NETWORK_ERROR 0x402b
4544 #define PMERR_SPL_HARD_NETWORK_ERROR 0x402c
4545 #define PMERR_DEL_NOT_ALLOWED 0x402d
4546 #define PMERR_CANNOT_DEL_QP_REF 0x402e
4547 #define PMERR_CANNOT_DEL_QNAME_REF 0x402f
4548 #define PMERR_CANNOT_DEL_PRINTER_DD_REF 0x4030
4549 #define PMERR_CANNOT_DEL_PRN_NAME_REF 0x4031
4550 #define PMERR_CANNOT_DEL_PRN_ADDR_REF 0x4032
4551 #define PMERR_SPOOLER_QP_NOT_DEFINED 0x4033
4552 #define PMERR_PRN_NAME_NOT_DEFINED 0x4034
4553 #define PMERR_PRN_ADDR_NOT_DEFINED 0x4035
4554 #define PMERR_PRINTER_DD_NOT_DEFINED 0x4036
4555 #define PMERR_PRINTER_QUEUE_NOT_DEFINED 0x4037
4556 #define PMERR_PRN_ADDR_IN_USE 0x4038
4557 #define PMERR_SPL_TOO_MANY_OPEN_FILES 0x4039
4558 #define PMERR_SPL_CP_NOT_REQD 0x403a
4559 #define PMERR_SPL_PORT_SHUTDOWN 0x403b
4560 #define PMERR_SPL_NOT_HANDLED 0x403c
4561 #define PMERR_SPL_CNV_NOT_INIT 0x403d
4562 #define PMERR_SPL_INIT_IN_PROGRESS 0x403e
4563 #define PMERR_SPL_TYPE_NOT_AVAIL 0x403f
4564 #define PMERR_UNABLE_TO_CLOSE_DEVICE 0x4040
4565 #define PMERR_SPL_SESSION_TERM 0x4041
4566 #define PMERR_SPL_NOT_REGISTERED 0x4042
4567
4568 #endif /* INCL_SPLERRORS */
4569
4570 #if defined (INCL_PICERRORS)
4571
4572 #define PMERR_INV_TYPE 0x5001
4573 #define PMERR_INV_CONV 0x5002
4574 #define PMERR_INV_SEGLEN 0x5003
4575 #define PMERR_DUP_SEGNAME 0x5004
4576 #define PMERR_INV_XFORM 0x5005
4577 #define PMERR_INV_VIEWLIM 0x5006
4578 #define PMERR_INV_3DCOORD 0x5007
4579 #define PMERR_SMB_OVFLOW 0x5008
4580 #define PMERR_SEG_OVFLOW 0x5009
4581 #define PMERR_PIC_DUP_FILENAME 0x5010
4582
4583 #endif /* INCL_PICERRORS */
4584
4585 #if defined (INCL_WINERRORS)
4586
4587 #define WINDBG_HWND_NOT_DESTROYED 0x1022
4588 #define WINDBG_HPTR_NOT_DESTROYED 0x1023
4589 #define WINDBG_HACCEL_NOT_DESTROYED 0x1024
4590 #define WINDBG_HENUM_NOT_DESTROYED 0x1025
4591 #define WINDBG_VISRGN_SEM_BUSY 0x1026
4592 #define WINDBG_USER_SEM_BUSY 0x1027
4593 #define WINDBG_DC_CACHE_BUSY 0x1028
4594 #define WINDBG_HOOK_STILL_INSTALLED 0x1029
4595 #define WINDBG_WINDOW_STILL_LOCKED 0x102a
4596 #define WINDBG_UPDATEPS_ASSERTION_FAIL 0x102b
4597 #define WINDBG_SENDMSG_WITHIN_USER_SEM 0x102c
4598 #define WINDBG_USER_SEM_NOT_ENTERED 0x102d
4599 #define WINDBG_PROC_NOT_EXPORTED 0x102e
4600 #define WINDBG_BAD_SENDMSG_HWND 0x102f
4601 #define WINDBG_ABNORMAL_EXIT 0x1030
4602 #define WINDBG_INTERNAL_REVISION 0x1031
4603 #define WINDBG_INITSYSTEM_FAILED 0x1032
4604 #define WINDBG_HATOMTBL_NOT_DESTROYED 0x1033
4605 #define WINDBG_WINDOW_UNLOCK_WAIT 0x1035
4606
4607 #endif /* INCL_WINERRORS */
4608
4609
4610 #define WRECT RECTL
4611 #define PWRECT PRECTL
4612
4613 #define WPOINT POINTL
4614 #define PWPOINT PPOINTL
4615
4616
4617 typedef LHANDLE HACCEL;
4618
4619 typedef LHANDLE HRGN;
4620 typedef HRGN *PHRGN;
4621
4622 typedef VOID *MRESULT;
4623 typedef MRESULT *PMRESULT;
4624
4625 typedef VOID *MPARAM;
4626 typedef MPARAM *PMPARAM;
4627
4628 typedef LHANDLE HPOINTER;
4629
4630 typedef HMODULE HLIB;
4631 typedef HLIB *PHLIB;
4632
4633 typedef LONG COLOR;
4634 typedef COLOR *PCOLOR;
4635
4636 typedef LHANDLE HAB;
4637 typedef HAB *PHAB;
4638
4639 typedef LHANDLE HPS;
4640 typedef HPS *PHPS;
4641
4642 typedef LHANDLE HDC;
4643 typedef HDC *PHDC;
4644
4645 typedef LHANDLE HWND;
4646 typedef HWND *PHWND;
4647
4648 typedef LHANDLE HMQ;
4649
4650 typedef LHANDLE HPAL;
4651 typedef HPAL *PHPAL;
4652
4653 typedef LHANDLE HBITMAP;
4654 typedef HBITMAP *PHBITMAP;
4655
4656 typedef ULONG ERRORID;
4657 typedef ERRORID *PERRORID;
4658
4659 typedef MRESULT FNWP (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
4660 typedef FNWP *PFNWP;
4661
4662 #define ERRORIDERROR(errid) (LOUSHORT (errid))
4663 #define ERRORIDSEV(errid) (HIUSHORT (errid))
4664 #define MAKEERRORID(sev,error) (ERRORID)(MAKEULONG ((error), (sev)))
4665
4666 typedef struct _POINTL
4667 {
4668 LONG x;
4669 LONG y;
4670 } POINTL;
4671 typedef POINTL *PPOINTL;
4672
4673 typedef struct _POINTS
4674 {
4675 SHORT x;
4676 SHORT y;
4677 } POINTS;
4678 typedef POINTS *PPOINTS;
4679
4680 typedef struct _RECTL
4681 {
4682 LONG xLeft;
4683 LONG yBottom;
4684 LONG xRight;
4685 LONG yTop;
4686 } RECTL;
4687 typedef RECTL *PRECTL;
4688
4689 #if defined (INCL_WINMESSAGEMGR) || !defined (INCL_NOCOMMON)
4690
4691 #define WM_NULL 0x0000
4692 #define WM_CREATE 0x0001
4693 #define WM_DESTROY 0x0002
4694 #define WM_ENABLE 0x0004
4695 #define WM_SHOW 0x0005
4696 #define WM_MOVE 0x0006
4697 #define WM_SIZE 0x0007
4698 #define WM_ADJUSTWINDOWPOS 0x0008
4699 #define WM_CALCVALIDRECTS 0x0009
4700 #define WM_SETWINDOWPARAMS 0x000a
4701 #define WM_QUERYWINDOWPARAMS 0x000b
4702 #define WM_HITTEST 0x000c
4703 #define WM_ACTIVATE 0x000d
4704 #define WM_SETFOCUS 0x000f
4705 #define WM_SETSELECTION 0x0010
4706 #define WM_PPAINT 0x0011
4707 #define WM_PSETFOCUS 0x0012
4708 #define WM_PSYSCOLORCHANGE 0x0013
4709 #define WM_PSIZE 0x0014
4710 #define WM_PACTIVATE 0x0015
4711 #define WM_PCONTROL 0x0016
4712 #define WM_COMMAND 0x0020
4713 #define WM_SYSCOMMAND 0x0021
4714 #define WM_HELP 0x0022
4715 #define WM_PAINT 0x0023
4716 #define WM_TIMER 0x0024
4717 #define WM_SEM1 0x0025
4718 #define WM_SEM2 0x0026
4719 #define WM_SEM3 0x0027
4720 #define WM_SEM4 0x0028
4721 #define WM_CLOSE 0x0029
4722 #define WM_QUIT 0x002a
4723 #define WM_SYSCOLORCHANGE 0x002b
4724 #define WM_SYSVALUECHANGED 0x002d
4725 #define WM_APPTERMINATENOTIFY 0x002e
4726 #define WM_PRESPARAMCHANGED 0x002f
4727 #define WM_CONTROL 0x0030
4728 #define WM_VSCROLL 0x0031
4729 #define WM_HSCROLL 0x0032
4730 #define WM_INITMENU 0x0033
4731 #define WM_MENUSELECT 0x0034
4732 #define WM_MENUEND 0x0035
4733 #define WM_DRAWITEM 0x0036
4734 #define WM_MEASUREITEM 0x0037
4735 #define WM_CONTROLPOINTER 0x0038
4736 #define WM_QUERYDLGCODE 0x003a
4737 #define WM_INITDLG 0x003b
4738 #define WM_SUBSTITUTESTRING 0x003c
4739 #define WM_MATCHMNEMONIC 0x003d
4740 #define WM_SAVEAPPLICATION 0x003e
4741
4742 #define WM_HELPBASE 0x0f00
4743 #define WM_HELPTOP 0x0fff
4744
4745 #define WM_USER 0x1000
4746
4747 #define CMDSRC_OTHER 0
4748 #define CMDSRC_PUSHBUTTON 1
4749 #define CMDSRC_MENU 2
4750 #define CMDSRC_ACCELERATOR 3
4751 #define CMDSRC_FONTDLG 4
4752 #define CMDSRC_FILEDLG 5
4753 #define CMDSRC_PRINTDLG 6
4754 #define CMDSRC_COLORDLG 7
4755
4756 #define PM_NOREMOVE 0x0000
4757 #define PM_REMOVE 0x0001
4758
4759 #define RUM_IN 1
4760 #define RUM_OUT 2
4761 #define RUM_INOUT 3
4762
4763 #define SMD_DELAYED 0x0001
4764 #define SMD_IMMEDIATE 0x0002
4765
4766 #define SSM_SYNCHRONOUS 0x0001
4767 #define SSM_ASYNCHRONOUS 0x0002
4768 #define SSM_MIXED 0x0003
4769
4770 #define WLI_NOBUTTONUP 0x0002
4771
4772 #if defined (INCL_WINTYPES)
4773
4774 #define DTYP_USER 16384
4775
4776 #define DTYP_CTL_ARRAY 1
4777 #define DTYP_CTL_PARRAY (-1)
4778 #define DTYP_CTL_OFFSET 2
4779 #define DTYP_CTL_LENGTH 3
4780
4781 #define DTYP_ACCEL 28
4782 #define DTYP_ACCELTABLE 29
4783 #define DTYP_ARCPARAMS 38
4784 #define DTYP_AREABUNDLE 139
4785 #define DTYP_ATOM 90
4786 #define DTYP_BITMAPINFO 60
4787 #define DTYP_BITMAPINFOHEADER 61
4788 #define DTYP_BITMAPINFO2 170
4789 #define DTYP_BITMAPINFOHEADER2 171
4790 #define DTYP_BIT16 20
4791 #define DTYP_BIT32 21
4792 #define DTYP_BIT8 19
4793 #define DTYP_BOOL 18
4794 #define DTYP_BTNCDATA 35
4795 #define DTYP_BYTE 13
4796 #define DTYP_CATCHBUF 141
4797 #define DTYP_CHAR 15
4798 #define DTYP_CHARBUNDLE 135
4799 #define DTYP_CLASSINFO 95
4800 #define DTYP_COUNT2 93
4801 #define DTYP_COUNT2B 70
4802 #define DTYP_COUNT2CH 82
4803 #define DTYP_COUNT4 152
4804 #define DTYP_COUNT4B 42
4805 #define DTYP_CPID 57
4806 #define DTYP_CREATESTRUCT 98
4807 #define DTYP_CURSORINFO 34
4808 #define DTYP_DEVOPENSTRUC 124
4809 #define DTYP_DLGTEMPLATE 96
4810 #define DTYP_DLGTITEM 97
4811 #define DTYP_ENTRYFDATA 127
4812 #define DTYP_ERRORID 45
4813 #define DTYP_FATTRS 75
4814 #define DTYP_FFDESCS 142
4815 #define DTYP_FIXED 99
4816 #define DTYP_FONTMETRICS 74
4817 #define DTYP_FRAMECDATA 144
4818 #define DTYP_GRADIENTL 48
4819 #define DTYP_HAB 10
4820 #define DTYP_HACCEL 30
4821 #define DTYP_HAPP 146
4822 #define DTYP_HATOMTBL 91
4823 #define DTYP_HBITMAP 62
4824 #define DTYP_HCINFO 46
4825 #define DTYP_HDC 132
4826 #define DTYP_HENUM 117
4827 #define DTYP_HHEAP 109
4828 #define DTYP_HINI 53
4829 #define DTYP_HLIB 147
4830 #define DTYP_HMF 85
4831 #define DTYP_HMQ 86
4832 #define DTYP_HPOINTER 106
4833 #define DTYP_HPROGRAM 131
4834 #define DTYP_HPS 12
4835 #define DTYP_HRGN 116
4836 #define DTYP_HSEM 140
4837 #define DTYP_HSPL 32
4838 #define DTYP_HSWITCH 66
4839 #define DTYP_HVPS 58
4840 #define DTYP_HWND 11
4841 #define DTYP_IDENTITY 133
4842 #define DTYP_IDENTITY4 169
4843 #define DTYP_IMAGEBUNDLE 136
4844 #define DTYP_INDEX2 81
4845 #define DTYP_IPT 155
4846 #define DTYP_KERNINGPAIRS 118
4847 #define DTYP_LENGTH2 68
4848 #define DTYP_LENGTH4 69
4849 #define DTYP_LINEBUNDLE 137
4850 #define DTYP_LONG 25
4851 #define DTYP_MARKERBUNDLE 138
4852 #define DTYP_MATRIXLF 113
4853 #define DTYP_MLECTLDATA 161
4854 #define DTYP_MLEMARGSTRUCT 157
4855 #define DTYP_MLEOVERFLOW 158
4856 #define DTYP_OFFSET2B 112
4857 #define DTYP_OWNERITEM 154
4858 #define DTYP_PID 92
4859 #define DTYP_PIX 156
4860 #define DTYP_POINTERINFO 105
4861 #define DTYP_POINTL 77
4862 #define DTYP_PROGCATEGORY 129
4863 #define DTYP_PROGRAMENTRY 128
4864 #define DTYP_PROGTYPE 130
4865 #define DTYP_PROPERTY2 88
4866 #define DTYP_PROPERTY4 89
4867 #define DTYP_QMSG 87
4868 #define DTYP_RECTL 121
4869 #define DTYP_RESID 125
4870 #define DTYP_RGB 111
4871 #define DTYP_RGNRECT 115
4872 #define DTYP_SBCDATA 159
4873 #define DTYP_SEGOFF 126
4874 #define DTYP_SHORT 23
4875 #define DTYP_SIZEF 101
4876 #define DTYP_SIZEL 102
4877 #define DTYP_STRL 17
4878 #define DTYP_STR16 40
4879 #define DTYP_STR32 37
4880 #define DTYP_STR64 47
4881 #define DTYP_STR8 33
4882 #define DTYP_SWBLOCK 63
4883 #define DTYP_SWCNTRL 64
4884 #define DTYP_SWENTRY 65
4885 #define DTYP_SWP 31
4886 #define DTYP_TID 104
4887 #define DTYP_TIME 107
4888 #define DTYP_TRACKINFO 73
4889 #define DTYP_UCHAR 22
4890 #define DTYP_ULONG 26
4891 #define DTYP_USERBUTTON 36
4892 #define DTYP_USHORT 24
4893 #define DTYP_WIDTH4 108
4894 #define DTYP_WNDPARAMS 83
4895 #define DTYP_WNDPROC 84
4896 #define DTYP_WPOINT 59
4897 #define DTYP_WRECT 55
4898 #define DTYP_XYWINSIZE 52
4899
4900 #define DTYP_PACCEL (-28)
4901 #define DTYP_PACCELTABLE (-29)
4902 #define DTYP_PARCPARAMS (-38)
4903 #define DTYP_PAREABUNDLE (-139)
4904 #define DTYP_PATOM (-90)
4905 #define DTYP_PBITMAPINFO (-60)
4906 #define DTYP_PBITMAPINFOHEADER (-61)
4907 #define DTYP_PBITMAPINFO2 (-170)
4908 #define DTYP_PBITMAPINFOHEADER2 (-171)
4909 #define DTYP_PBIT16 (-20)
4910 #define DTYP_PBIT32 (-21)
4911 #define DTYP_PBIT8 (-19)
4912 #define DTYP_PBOOL (-18)
4913 #define DTYP_PBTNCDATA (-35)
4914 #define DTYP_PBYTE (-13)
4915 #define DTYP_PCATCHBUF (-141)
4916 #define DTYP_PCHAR (-15)
4917 #define DTYP_PCHARBUNDLE (-135)
4918 #define DTYP_PCLASSINFO (-95)
4919 #define DTYP_PCOUNT2 (-93)
4920 #define DTYP_PCOUNT2B (-70)
4921 #define DTYP_PCOUNT2CH (-82)
4922 #define DTYP_PCOUNT4 (-152)
4923 #define DTYP_PCOUNT4B (-42)
4924 #define DTYP_PCPID (-57)
4925 #define DTYP_PCREATESTRUCT (-98)
4926 #define DTYP_PCURSORINFO (-34)
4927 #define DTYP_PDEVOPENSTRUC (-124)
4928 #define DTYP_PDLGTEMPLATE (-96)
4929 #define DTYP_PDLGTITEM (-97)
4930 #define DTYP_PENTRYFDATA (-127)
4931 #define DTYP_PERRORID (-45)
4932 #define DTYP_PFATTRS (-75)
4933 #define DTYP_PFFDESCS (-142)
4934 #define DTYP_PFIXED (-99)
4935 #define DTYP_PFONTMETRICS (-74)
4936 #define DTYP_PFRAMECDATA (-144)
4937 #define DTYP_PGRADIENTL (-48)
4938 #define DTYP_PHAB (-10)
4939 #define DTYP_PHACCEL (-30)
4940 #define DTYP_PHAPP (-146)
4941 #define DTYP_PHATOMTBL (-91)
4942 #define DTYP_PHBITMAP (-62)
4943 #define DTYP_PHCINFO (-46)
4944 #define DTYP_PHDC (-132)
4945 #define DTYP_PHENUM (-117)
4946 #define DTYP_PHHEAP (-109)
4947 #define DTYP_PHINI (-53)
4948 #define DTYP_PHLIB (-147)
4949 #define DTYP_PHMF (-85)
4950 #define DTYP_PHMQ (-86)
4951 #define DTYP_PHPOINTER (-106)
4952 #define DTYP_PHPROGRAM (-131)
4953 #define DTYP_PHPS (-12)
4954 #define DTYP_PHRGN (-116)
4955 #define DTYP_PHSEM (-140)
4956 #define DTYP_PHSPL (-32)
4957 #define DTYP_PHSWITCH (-66)
4958 #define DTYP_PHVPS (-58)
4959 #define DTYP_PHWND (-11)
4960 #define DTYP_PIDENTITY (-133)
4961 #define DTYP_PIDENTITY4 (-169)
4962 #define DTYP_PIMAGEBUNDLE (-136)
4963 #define DTYP_PINDEX2 (-81)
4964 #define DTYP_PIPT (-155)
4965 #define DTYP_PKERNINGPAIRS (-118)
4966 #define DTYP_PLENGTH2 (-68)
4967 #define DTYP_PLENGTH4 (-69)
4968 #define DTYP_PLINEBUNDLE (-137)
4969 #define DTYP_PLONG (-25)
4970 #define DTYP_PMARKERBUNDLE (-138)
4971 #define DTYP_PMATRIXLF (-113)
4972 #define DTYP_PMLECTLDATA (-161)
4973 #define DTYP_PMLEMARGSTRUCT (-157)
4974 #define DTYP_PMLEOVERFLOW (-158)
4975 #define DTYP_POFFSET2B (-112)
4976 #define DTYP_POWNERITEM (-154)
4977 #define DTYP_PPID (-92)
4978 #define DTYP_PPIX (-156)
4979 #define DTYP_PPOINTERINFO (-105)
4980 #define DTYP_PPOINTL (-77)
4981 #define DTYP_PPROGCATEGORY (-129)
4982 #define DTYP_PPROGRAMENTRY (-128)
4983 #define DTYP_PPROGTYPE (-130)
4984 #define DTYP_PPROPERTY2 (-88)
4985 #define DTYP_PPROPERTY4 (-89)
4986 #define DTYP_PQMSG (-87)
4987 #define DTYP_PRECTL (-121)
4988 #define DTYP_PRESID (-125)
4989 #define DTYP_PRGB (-111)
4990 #define DTYP_PRGNRECT (-115)
4991 #define DTYP_PSBCDATA (-159)
4992 #define DTYP_PSEGOFF (-126)
4993 #define DTYP_PSHORT (-23)
4994 #define DTYP_PSIZEF (-101)
4995 #define DTYP_PSIZEL (-102)
4996 #define DTYP_PSTRL (-17)
4997 #define DTYP_PSTR16 (-40)
4998 #define DTYP_PSTR32 (-37)
4999 #define DTYP_PSTR64 (-47)
5000 #define DTYP_PSTR8 (-33)
5001 #define DTYP_PSWBLOCK (-63)
5002 #define DTYP_PSWCNTRL (-64)
5003 #define DTYP_PSWENTRY (-65)
5004 #define DTYP_PSWP (-31)
5005 #define DTYP_PTID (-104)
5006 #define DTYP_PTIME (-107)
5007 #define DTYP_PTRACKINFO (-73)
5008 #define DTYP_PUCHAR (-22)
5009 #define DTYP_PULONG (-26)
5010 #define DTYP_PUSERBUTTON (-36)
5011 #define DTYP_PUSHORT (-24)
5012 #define DTYP_PWIDTH4 (-108)
5013 #define DTYP_PWNDPARAMS (-83)
5014 #define DTYP_PWNDPROC (-84)
5015 #define DTYP_PWPOINT (-59)
5016 #define DTYP_PWRECT (-55)
5017 #define DTYP_PXYWINSIZE (-52)
5018
5019 #endif /* INCL_WINTYPES */
5020
5021 typedef struct _QMSG
5022 {
5023 HWND hwnd;
5024 ULONG msg;
5025 MPARAM mp1;
5026 MPARAM mp2;
5027 ULONG time;
5028 POINTL ptl;
5029 ULONG reserved;
5030 } QMSG;
5031 typedef QMSG *PQMSG;
5032
5033 typedef struct _COMMANDMSG
5034 {
5035 USHORT cmd;
5036 USHORT unused;
5037 USHORT source;
5038 USHORT fMouse;
5039 } CMDMSG;
5040 typedef CMDMSG *PCMDMSG;
5041
5042 typedef struct _MQINFO
5043 {
5044 ULONG cb;
5045 PID pid;
5046 TID tid;
5047 ULONG cmsgs;
5048 PVOID pReserved;
5049 } MQINFO;
5050 typedef MQINFO *PMQINFO;
5051
5052 #define COMMANDMSG(pmsg) ((PCMDMSG)((PBYTE)pmsg + sizeof (ULONG)))
5053
5054
5055 BOOL WinCancelShutdown (HMQ hmq, BOOL fCancelAlways);
5056 HMQ WinCreateMsgQueue (HAB hab, LONG cmsg);
5057 BOOL WinDestroyMsgQueue (HMQ hmq);
5058 MRESULT WinDispatchMsg (HAB hab, PQMSG pqmsg);
5059 BOOL WinGetMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
5060 ULONG msgFilterLast);
5061 BOOL WinLockInput (HMQ hmq, ULONG fLock);
5062 BOOL WinPeekMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
5063 ULONG msgFilterLast, ULONG fl);
5064 BOOL WinPostMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
5065 HMQ WinQueueFromID (HAB hab, PID pid, TID tid);
5066 BOOL WinQueryQueueInfo (HMQ hmq, PMQINFO pmqi, ULONG cbCopy);
5067 HMQ WinQuerySendMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, PQMSG pqmsg);
5068 BOOL WinRegisterUserDatatype (HAB hab, LONG datatype, LONG count, PLONG types);
5069 BOOL WinRegisterUserMsg (HAB hab, ULONG msgid, LONG datatype1, LONG dir1,
5070 LONG datatype2, LONG dir2, LONG datatyper);
5071 BOOL WinReplyMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, MRESULT mresult);
5072 MRESULT WinSendMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
5073 BOOL WinSetMsgMode (HAB hab, PCSZ classname, LONG control);
5074 BOOL WinSetSynchroMode (HAB hab, LONG mode);
5075 BOOL WinThreadAssocQueue (HAB hab, HMQ hmq);
5076 BOOL WinWakeThread (HMQ hmq);
5077
5078 #endif /* INCL_WINMESSAGEMGR || !INCL_NOCOMMON */
5079
5080 typedef struct _SWP
5081 {
5082 ULONG fl;
5083 LONG cy;
5084 LONG cx;
5085 LONG y;
5086 LONG x;
5087 HWND hwndInsertBehind;
5088 HWND hwnd;
5089 ULONG ulReserved1;
5090 ULONG ulReserved2;
5091 } SWP;
5092 typedef SWP *PSWP;
5093
5094 typedef struct _ICONINFO
5095 {
5096 ULONG cb;
5097 ULONG fFormat;
5098 PSZ pszFileName;
5099 HMODULE hmod;
5100 ULONG resid;
5101 ULONG cbIconData;
5102 PVOID pIconData;
5103 } ICONINFO;
5104 typedef ICONINFO *PICONINFO;
5105
5106
5107 #define MPVOID ((MPARAM)0)
5108
5109 #define MPFROMP(x) ((MPARAM)((ULONG)(x)))
5110 #define MPFROMHWND(x) ((MPARAM)(HWND)(x))
5111 #define MPFROMCHAR(x) ((MPARAM)(ULONG)(USHORT)(x))
5112 #define MPFROMSHORT(x) ((MPARAM)(ULONG)(USHORT)(x))
5113 #define MPFROM2SHORT(x1,x2) ((MPARAM)MAKELONG (x1, x2))
5114 #define MPFROMSH2CH(s,c1,c2) ((MPARAM)MAKELONG (s, MAKESHORT (c1, c2)))
5115 #define MPFROMLONG(x) ((MPARAM)(ULONG)(x))
5116
5117 #define PVOIDFROMMP(mp) ((PVOID)(mp))
5118 #define HWNDFROMMP(mp) ((HWND)(mp))
5119 #define CHAR1FROMMP(mp) ((UCHAR)(ULONG)(mp))
5120 #define CHAR2FROMMP(mp) ((UCHAR)((ULONG)mp >> 8))
5121 #define CHAR3FROMMP(mp) ((UCHAR)((ULONG)mp >> 16))
5122 #define CHAR4FROMMP(mp) ((UCHAR)((ULONG)mp >> 24))
5123 #define SHORT1FROMMP(mp) ((USHORT)(ULONG)(mp))
5124 #define SHORT2FROMMP(mp) ((USHORT)((ULONG)mp >> 16))
5125 #define LONGFROMMP(mp) ((ULONG)(mp))
5126
5127 #define MRFROMP(x) ((MRESULT)(PVOID)(x))
5128 #define MRFROMSHORT(x) ((MRESULT)(ULONG)(USHORT)(x))
5129 #define MRFROM2SHORT(x1,x2) ((MRESULT)MAKELONG (x1, x2))
5130 #define MRFROMLONG(x) ((MRESULT)(ULONG)(x))
5131
5132 #define PVOIDFROMMR(mr) ((VOID *)(mr))
5133 #define SHORT1FROMMR(mr) ((USHORT)((ULONG)mr))
5134 #define SHORT2FROMMR(mr) ((USHORT)((ULONG)mr >> 16))
5135 #define LONGFROMMR(mr) ((ULONG)(mr))
5136
5137
5138 HWND WinCreateWindow (HWND hwndParent, PCSZ pszClass, PCSZ pszName,
5139 ULONG flStyle, LONG x, LONG y, LONG cx, LONG cy, HWND hwndOwner,
5140 HWND hwndInsertBehind, ULONG id, PVOID pCtlData, PVOID pPresParams);
5141 BOOL WinDrawBitmap (HPS hpsDst, HBITMAP hbm, __const__ RECTL *pwrcSrc,
5142 __const__ POINTL *pptlDst, LONG clrFore, LONG clrBack, ULONG fl);
5143 BOOL WinDrawBorder (HPS hps, __const__ RECTL *prcl, LONG cx, LONG cy,
5144 LONG clrFore, LONG clrBack, ULONG flCmd);
5145 LONG WinDrawText (HPS hps, LONG cchText, PCCH lpchText, PRECTL prcl,
5146 LONG clrFore, LONG clrBack, ULONG flCmd);
5147 BOOL WinEnableWindow (HWND hwnd, BOOL fEnable);
5148 BOOL WinEnableWindowUpdate (HWND hwnd, BOOL fEnable);
5149 BOOL WinInvalidateRect (HWND hwnd, __const__ RECTL *prcl,
5150 BOOL fIncludeChildren);
5151 BOOL WinInvalidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
5152 BOOL WinInvertRect (HPS hps, __const__ RECTL *prcl);
5153 BOOL WinIsChild (HWND hwnd, HWND hwndParent);
5154 BOOL WinIsWindow (HAB hab, HWND hwnd);
5155 BOOL WinIsWindowEnabled (HWND hwnd);
5156 BOOL WinIsWindowVisible (HWND hwnd);
5157 LONG WinLoadMessage (HAB hab, HMODULE hmod, ULONG id, LONG cchMax,
5158 PSZ pchBuffer);
5159 LONG WinLoadString (HAB hab, HMODULE hmod, ULONG id, LONG cchMax,
5160 PSZ pchBuffer);
5161 LONG WinMultWindowFromIDs (HWND hwndParent, PHWND prghwnd, ULONG idFirst,
5162 ULONG idLast);
5163 HWND WinQueryDesktopWindow (HAB hab, HDC hdc);
5164 HWND WinQueryObjectWindow (HWND hwndDesktop);
5165 HPOINTER WinQueryPointer (HWND hwndDesktop);
5166 HWND WinQueryWindow (HWND hwnd, LONG cmd);
5167 BOOL WinQueryWindowPos (HWND hwnd, PSWP pswp);
5168 BOOL WinQueryWindowProcess (HWND hwnd, PPID ppid, PTID ptid);
5169 LONG WinQueryWindowText (HWND hwnd, LONG cchBufferMax, PCH pchBuffer);
5170 LONG WinQueryWindowTextLength (HWND hwnd);
5171 BOOL WinSetMultWindowPos (HAB hab, __const__ SWP *pswp, ULONG cswp);
5172 BOOL WinSetOwner (HWND hwnd, HWND hwndNewOwner);
5173 BOOL WinSetParent (HWND hwnd, HWND hwndNewParent, BOOL fRedraw);
5174 BOOL WinSetWindowPos (HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y,
5175 LONG cx, LONG cy, ULONG fl);
5176 BOOL WinSetWindowText (HWND hwnd, PCSZ pszText);
5177 BOOL WinUpdateWindow (HWND hwnd);
5178 HWND WinWindowFromID (HWND hwndParent, ULONG id);
5179
5180
5181 #if defined (INCL_WINFRAMEMGR) || !defined (INCL_NOCOMMON)
5182
5183 #define FCF_TITLEBAR 0x00000001
5184 #define FCF_SYSMENU 0x00000002
5185 #define FCF_MENU 0x00000004
5186 #define FCF_SIZEBORDER 0x00000008
5187 #define FCF_MINBUTTON 0x00000010
5188 #define FCF_MAXBUTTON 0x00000020
5189 #define FCF_MINMAX (FCF_MINBUTTON|FCF_MAXBUTTON)
5190 #define FCF_VERTSCROLL 0x00000040
5191 #define FCF_HORZSCROLL 0x00000080
5192 #define FCF_DLGBORDER 0x00000100
5193 #define FCF_BORDER 0x00000200
5194 #define FCF_SHELLPOSITION 0x00000400
5195 #define FCF_TASKLIST 0x00000800
5196 #define FCF_NOBYTEALIGN 0x00001000
5197 #define FCF_NOMOVEWITHOWNER 0x00002000
5198 #define FCF_ICON 0x00004000
5199 #define FCF_ACCELTABLE 0x00008000
5200 #define FCF_SYSMODAL 0x00010000
5201 #define FCF_SCREENALIGN 0x00020000
5202 #define FCF_MOUSEALIGN 0x00040000
5203 #define FCF_PALETTE_NORMAL 0x00080000
5204 #define FCF_PALETTE_HELP 0x00100000
5205 #define FCF_PALETTE_POPUPODD 0x00200000
5206 #define FCF_PALETTE_POPUPEVEN 0x00400000
5207 #define FCF_HIDEBUTTON 0x01000000
5208 #define FCF_HIDEMAX 0x01000020
5209 #define FCF_AUTOICON 0x40000000
5210 #if defined (INCL_NLS)
5211 #define FCF_DBE_APPSTAT 0x80000000
5212 #endif /* INCL_NLS */
5213
5214 #define FCF_STANDARD 0x0000cc3f
5215
5216 #define FF_FLASHWINDOW 0x0001
5217 #define FF_ACTIVE 0x0002
5218 #define FF_FLASHHILITE 0x0004
5219 #define FF_OWNERHIDDEN 0x0008
5220 #define FF_DLGDISMISSED 0x0010
5221 #define FF_OWNERDISABLED 0x0020
5222 #define FF_SELECTED 0x0040
5223 #define FF_NOACTIVATESWP 0x0080
5224 #define FF_DIALOGBOX 0x0100
5225
5226 #define FS_ICON 0x00000001
5227 #define FS_ACCELTABLE 0x00000002
5228 #define FS_SHELLPOSITION 0x00000004
5229 #define FS_TASKLIST 0x00000008
5230 #define FS_NOBYTEALIGN 0x00000010
5231 #define FS_NOMOVEWITHOWNER 0x00000020
5232 #define FS_SYSMODAL 0x00000040
5233 #define FS_DLGBORDER 0x00000080
5234 #define FS_BORDER 0x00000100
5235 #define FS_SCREENALIGN 0x00000200
5236 #define FS_MOUSEALIGN 0x00000400
5237 #define FS_SIZEBORDER 0x00000800
5238 #define FS_AUTOICON 0x00001000
5239 #if defined (INCL_NLS)
5240 #define FS_DBE_APPSTAT 0x00008000
5241 #endif /* INCL_NLS */
5242
5243 #define FS_STANDARD 0x0000000f
5244
5245 typedef struct _FRAMECDATA
5246 {
5247 USHORT cb;
5248 ULONG flCreateFlags;
5249 USHORT hmodResources;
5250 USHORT idResources;
5251 } FRAMECDATA;
5252 typedef FRAMECDATA *PFRAMECDATA;
5253
5254 HWND WinCreateStdWindow (HWND hwndParent, ULONG flStyle,
5255 PULONG pflCreateFlags, PCSZ pszClientClass, PCSZ pszTitle,
5256 ULONG styleClient, HMODULE hmod, ULONG idResources, PHWND phwndClient);
5257
5258 #endif /* INCL_WINFRAMEMGR || !INCL_NOCOMMON */
5259
5260 #if defined (INCL_WINFRAMEMGR)
5261
5262 #define WM_FLASHWINDOW 0x0040
5263 #define WM_FORMATFRAME 0x0041
5264 #define WM_UPDATEFRAME 0x0042
5265 #define WM_FOCUSCHANGE 0x0043
5266 #define WM_SETBORDERSIZE 0x0044
5267 #define WM_TRACKFRAME 0x0045
5268 #define WM_MINMAXFRAME 0x0046
5269 #define WM_SETICON 0x0047
5270 #define WM_QUERYICON 0x0048
5271 #define WM_SETACCELTABLE 0x0049
5272 #define WM_QUERYACCELTABLE 0x004a
5273 #define WM_TRANSLATEACCEL 0x004b
5274 #define WM_QUERYTRACKINFO 0x004c
5275 #define WM_QUERYBORDERSIZE 0x004d
5276 #define WM_NEXTMENU 0x004e
5277 #define WM_ERASEBACKGROUND 0x004f
5278 #define WM_QUERYFRAMEINFO 0x0050
5279 #define WM_QUERYFOCUSCHAIN 0x0051
5280 #define WM_OWNERPOSCHANGE 0x0052
5281 #define WM_CALCFRAMERECT 0x0053
5282 #define WM_WINDOWPOSCHANGED 0x0055
5283 #define WM_ADJUSTFRAMEPOS 0x0056
5284 #define WM_QUERYFRAMECTLCOUNT 0x0059
5285 #define WM_QUERYHELPINFO 0x005b
5286 #define WM_SETHELPINFO 0x005c
5287 #define WM_ERROR 0x005d
5288 #define WM_REALIZEPALETTE 0x005e
5289
5290 #define FI_FRAME 0x00000001
5291 #define FI_OWNERHIDE 0x00000002
5292 #define FI_ACTIVATEOK 0x00000004
5293 #define FI_NOMOVEWITHOWNER 0x00000008
5294
5295 #define FID_SYSMENU 0x8002
5296 #define FID_TITLEBAR 0x8003
5297 #define FID_MINMAX 0x8004
5298 #define FID_MENU 0x8005
5299 #define FID_VERTSCROLL 0x8006
5300 #define FID_HORZSCROLL 0x8007
5301 #define FID_CLIENT 0x8008
5302 #define FID_DBE_APPSTAT 0x8010
5303 #define FID_DBE_KBDSTAT 0x8011
5304 #define FID_DBE_PECIC 0x8012
5305 #define FID_DBE_KKPOPUP 0x8013
5306
5307 #define SC_SIZE 0x8000
5308 #define SC_MOVE 0x8001
5309 #define SC_MINIMIZE 0x8002
5310 #define SC_MAXIMIZE 0x8003
5311 #define SC_CLOSE 0x8004
5312 #define SC_NEXT 0x8005
5313 #define SC_APPMENU 0x8006
5314 #define SC_SYSMENU 0x8007
5315 #define SC_RESTORE 0x8008
5316 #define SC_NEXTFRAME 0x8009
5317 #define SC_NEXTWINDOW 0x8010
5318 #define SC_TASKMANAGER 0x8011
5319 #define SC_HELPKEYS 0x8012
5320 #define SC_HELPINDEX 0x8013
5321 #define SC_HELPEXTENDED 0x8014
5322 #define SC_SWITCHPANELIDS 0x8015
5323 #define SC_DBE_FIRST 0x8018
5324 #define SC_DBE_LAST 0x801f
5325 #define SC_BEGINDRAG 0x8020
5326 #define SC_ENDDRAG 0x8021
5327 #define SC_SELECT 0x8022
5328 #define SC_OPEN 0x8023
5329 #define SC_CONTEXTMENU 0x8024
5330 #define SC_CONTEXTHELP 0x8025
5331 #define SC_TEXTEDIT 0x8026
5332 #define SC_BEGINSELECT 0x8027
5333 #define SC_ENDSELECT 0x8028
5334 #define SC_WINDOW 0x8029
5335 #define SC_HIDE 0x802a
5336
5337 typedef LHANDLE HSAVEWP;
5338
5339 BOOL WinCalcFrameRect (HWND hwndFrame, PRECTL prcl, BOOL fClient);
5340 BOOL WinCreateFrameControls (HWND hwndFrame, PFRAMECDATA pfcdata,
5341 PCSZ pszTitle);
5342 BOOL WinFlashWindow (HWND hwndFrame, BOOL fFlash);
5343 BOOL WinGetMaxPosition (HWND hwnd, PSWP pswp);
5344 BOOL WinGetMinPosition (HWND hwnd, PSWP pswp, __const__ POINTL *pptl);
5345 BOOL WinSaveWindowPos (HSAVEWP hsvwp, PSWP pswp, ULONG cswp);
5346
5347 #endif /* INCL_WINFRAMEMGR */
5348
5349
5350 #if defined (INCL_WINWINDOWMGR) || !defined (INCL_NOCOMMON)
5351
5352 #define PSF_LOCKWINDOWUPDATE 0x0001
5353 #define PSF_CLIPUPWARDS 0x0002
5354 #define PSF_CLIPDOWNWARDS 0x0004
5355 #define PSF_CLIPSIBLINGS 0x0008
5356 #define PSF_CLIPCHILDREN 0x0010
5357 #define PSF_PARENTCLIP 0x0020
5358
5359 #define QV_OS2 0x0000
5360 #define QV_CMS 0x0001
5361 #define QV_TSO 0x0002
5362 #define QV_TSOBATCH 0x0003
5363 #define QV_OS400 0x0004
5364
5365 #define SW_SCROLLCHILDREN 0x0001
5366 #define SW_INVALIDATERGN 0x0002
5367
5368
5369 typedef struct _QVERSDATA
5370 {
5371 USHORT environment;
5372 USHORT version;
5373 } QVERSDATA;
5374 typedef QVERSDATA *PQVERSDATA;
5375
5376
5377 HPS WinBeginPaint (HWND hwnd, HPS hps, PRECTL prclPaint);
5378 MRESULT WinDefWindowProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
5379 BOOL WinDestroyWindow (HWND hwnd);
5380 BOOL WinEndPaint (HPS hps);
5381 BOOL WinFillRect (HPS hps, __const__ RECTL *prcl, LONG lColor);
5382 HPS WinGetClipPS (HWND hwnd, HWND hwndClip, ULONG fl);
5383 HPS WinGetPS (HWND hwnd);
5384 HAB WinInitialize (ULONG fsOptions);
5385 BOOL WinIsWindowShowing (HWND hwnd);
5386 HDC WinOpenWindowDC (HWND hwnd);
5387 HAB WinQueryAnchorBlock (HWND hwnd);
5388 ULONG WinQueryVersion (HAB hab);
5389 BOOL WinQueryWindowRect (HWND hwnd, PRECTL prclDest);
5390 BOOL WinRegisterClass (HAB hab, PCSZ pszClassName, PFNWP pfnWndProc,
5391 ULONG flStyle, ULONG cbWindowData);
5392 BOOL WinReleasePS (HPS hps);
5393 LONG WinScrollWindow (HWND hwnd, LONG dx, LONG dy, __const__ RECTL *prclScroll,
5394 __const__ RECTL *prclClip, HRGN hrgnUpdate, PRECTL prclUpdate,
5395 ULONG rgfsw);
5396 BOOL WinSetActiveWindow (HWND hwndDesktop, HWND hwnd);
5397 BOOL WinShowWindow (HWND hwnd, BOOL fShow);
5398 BOOL WinTerminate (HAB hab);
5399
5400 #endif /* INCL_WINWINDOWMGR || !INCL_NOCOMMON */
5401
5402 #if defined (INCL_WINWINDOWMGR)
5403
5404 #define WM_QUERYCONVERTPOS 0x00b0
5405
5406 #define QCP_CONVERT 0x0001
5407 #define QCP_NOCONVERT 0x0000
5408
5409 #define QWS_USER 0
5410 #define QWS_ID (-1)
5411 #define QWS_MIN (-1)
5412
5413 #define QWL_USER 0
5414 #define QWL_STYLE (-2)
5415 #define QWP_PFNWP (-3)
5416 #define QWL_HMQ (-4)
5417 #define QWL_RESERVED (-5)
5418 #define QWL_PENDATA (-7)
5419 #define QWL_BD_ATTR (-9)
5420 #define QWL_BD_STAT (-10)
5421 #define QWL_KBDLAYER (-11)
5422 #define QWL_MIN (-11)
5423
5424 #define QWL_HHEAP 0x0004
5425 #define QWL_HWNDFOCUSSAVE 0x0018
5426 #define QWL_DEFBUTTON 0x0040
5427 #define QWL_PSSCBLK 0x0048
5428 #define QWL_PFEPBLK 0x004c
5429 #define QWL_PSTATBLK 0x0050
5430
5431 #define QWS_FLAGS 0x0008
5432 #define QWS_RESULT 0x000a
5433 #define QWS_XRESTORE 0x000c
5434 #define QWS_YRESTORE 0x000e
5435 #define QWS_CXRESTORE 0x0010
5436 #define QWS_CYRESTORE 0x0012
5437 #define QWS_XMINIMIZE 0x0014
5438 #define QWS_YMINIMIZE 0x0016
5439
5440
5441 typedef struct _CLASSINFO
5442 {
5443 ULONG flClassStyle;
5444 PFNWP pfnWindowProc;
5445 ULONG cbWindowData;
5446 } CLASSINFO;
5447 typedef CLASSINFO *PCLASSINFO;
5448
5449 typedef struct _CREATESTRUCT
5450 {
5451 PVOID pPresParams;
5452 PVOID pCtlData;
5453 ULONG id;
5454 HWND hwndInsertBehind;
5455 HWND hwndOwner;
5456 LONG cy;
5457 LONG cx;
5458 LONG y;
5459 LONG x;
5460 ULONG flStyle;
5461 PSZ pszText;
5462 PSZ pszClass;
5463 HWND hwndParent;
5464 } CREATESTRUCT;
5465 typedef CREATESTRUCT *PCREATESTRUCT;
5466
5467 typedef LHANDLE HENUM;
5468
5469
5470 HENUM WinBeginEnumWindows (HWND hwnd);
5471 BOOL WinEndEnumWindows (HENUM henum);
5472 LONG WinExcludeUpdateRegion (HPS hps, HWND hwnd);
5473 HWND WinGetNextWindow (HENUM henum);
5474 HPS WinGetScreenPS (HWND hwndDesktop);
5475 BOOL WinIsThreadActive (HAB hab);
5476 BOOL WinLockVisRegions (HWND hwndDesktop, BOOL fLock);
5477 BOOL WinLockWindowUpdate (HWND hwndDesktop, HWND hwndLockUpdate);
5478 BOOL WinMapWindowPoints (HWND hwndFrom, HWND hwndTo, PPOINTL prgptl,
5479 LONG cwpt);
5480 HWND WinQueryActiveWindow (HWND hwndDesktop);
5481 BOOL WinQueryClassInfo (HAB hab, PCSZ pszClassName, PCLASSINFO pClassInfo);
5482 LONG WinQueryClassName (HWND hwnd, LONG cchMax, PCH pch);
5483 BOOL WinQueryUpdateRect (HWND hwnd, PRECTL prcl);
5484 LONG WinQueryUpdateRegion (HWND hwnd, HRGN hrgn);
5485 HWND WinQuerySysModalWindow (HWND hwndDesktop);
5486 HDC WinQueryWindowDC (HWND hwnd);
5487 PVOID WinQueryWindowPtr (HWND hwnd, LONG index);
5488 ULONG WinQueryWindowULong (HWND hwnd, LONG index);
5489 USHORT WinQueryWindowUShort (HWND hwnd, LONG index);
5490 BOOL WinSetSysModalWindow (HWND hwndDesktop, HWND hwnd);
5491 BOOL WinSetWindowBits (HWND hwnd, LONG index, ULONG flData, ULONG flMask);
5492 BOOL WinSetWindowPtr (HWND hwnd, LONG index, PVOID p);
5493 BOOL WinSetWindowULong (HWND hwnd, LONG index, ULONG ul);
5494 BOOL WinSetWindowUShort (HWND hwnd, LONG index, USHORT us);
5495 PFNWP WinSubclassWindow (HWND hwnd, PFNWP pfnwp);
5496 BOOL WinValidateRect (HWND hwnd, __const__ RECTL *prcl, BOOL fIncludeChildren);
5497 BOOL WinValidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
5498 HWND WinWindowFromDC (HDC hdc);
5499 HWND WinWindowFromPoint (HWND hwnd, __const__ POINTL *pptl, BOOL fChildren);
5500
5501 #endif /* INCL_WINWINDOWMGR */
5502
5503
5504 #if defined (INCL_WINACCELERATORS)
5505
5506 #define AF_CHAR 0x0001
5507 #define AF_VIRTUALKEY 0x0002
5508 #define AF_SCANCODE 0x0004
5509 #define AF_SHIFT 0x0008
5510 #define AF_CONTROL 0x0010
5511 #define AF_ALT 0x0020
5512 #define AF_LONEKEY 0x0040
5513 #define AF_SYSCOMMAND 0x0100
5514 #define AF_HELP 0x0200
5515
5516 typedef struct _ACCEL
5517 {
5518 USHORT fs;
5519 USHORT key;
5520 USHORT cmd;
5521 } ACCEL;
5522 typedef ACCEL *PACCEL;
5523
5524 typedef struct _ACCELTABLE
5525 {
5526 USHORT cAccel;
5527 USHORT codepage;
5528 ACCEL aaccel[1];
5529 } ACCELTABLE;
5530 typedef ACCELTABLE *PACCELTABLE;
5531
5532 ULONG WinCopyAccelTable (HACCEL haccel, PACCELTABLE pAccelTable,
5533 ULONG cbCopyMax);
5534 HACCEL WinCreateAccelTable (HAB hab, PACCELTABLE pAccelTable);
5535 BOOL WinDestroyAccelTable (HACCEL haccel);
5536 HACCEL WinLoadAccelTable (HAB hab, HMODULE hmod, ULONG idAccelTable);
5537 HACCEL WinQueryAccelTable (HAB hab, HWND hwndFrame);
5538 BOOL WinSetAccelTable (HAB hab, HACCEL haccel, HWND hwndFrame);
5539 BOOL WinTranslateAccel (HAB hab, HWND hwnd, HACCEL haccel, PQMSG pqmsg);
5540
5541 #endif /* INCL_WINACCELERATORS */
5542
5543
5544 #if defined (INCL_WINATOM)
5545
5546 typedef LHANDLE HATOMTBL;
5547 typedef ULONG ATOM;
5548
5549 #define MAKEINTATOM(x) ((PCH)MAKEULONG (x, 0xffff))
5550
5551 ATOM WinAddAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName);
5552 HATOMTBL WinCreateAtomTable (ULONG cbInitial, ULONG cBuckets);
5553 ATOM WinDeleteAtom (HATOMTBL hAtomTbl, ATOM atom);
5554 HATOMTBL WinDestroyAtomTable (HATOMTBL hAtomTbl);
5555 ATOM WinFindAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName);
5556 ULONG WinQueryAtomLength (HATOMTBL hAtomTbl, ATOM atom);
5557 ULONG WinQueryAtomName (HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer,
5558 ULONG cchBufferMax);
5559 ULONG WinQueryAtomUsage (HATOMTBL hAtomTbl, ATOM atom);
5560 HATOMTBL WinQuerySystemAtomTable (VOID);
5561
5562 #endif /* INCL_WINATOM */
5563
5564
5565 #if defined (INCL_WINBUTTONS)
5566
5567 #define BDS_HILITED 0x0100
5568 #define BDS_DISABLED 0x0200
5569 #define BDS_DEFAULT 0x0400
5570
5571 #define BM_CLICK 0x0120
5572 #define BM_QUERYCHECKINDEX 0x0121
5573 #define BM_QUERYHILITE 0x0122
5574 #define BM_SETHILITE 0x0123
5575 #define BM_QUERYCHECK 0x0124
5576 #define BM_SETCHECK 0x0125
5577 #define BM_SETDEFAULT 0x0126
5578
5579 #define BN_CLICKED 1
5580 #define BN_DBLCLICKED 2
5581 #define BN_PAINT 3
5582
5583 #define BS_PUSHBUTTON 0
5584 #define BS_CHECKBOX 1
5585 #define BS_AUTOCHECKBOX 2
5586 #define BS_RADIOBUTTON 3
5587 #define BS_AUTORADIOBUTTON 4
5588 #define BS_3STATE 5
5589 #define BS_AUTO3STATE 6
5590 #define BS_USERBUTTON 7
5591
5592 #define BS_PRIMARYSTYLES 0x000f
5593 #define BS_TEXT 0x0010
5594 #define BS_MINIICON 0x0020
5595 #define BS_BITMAP 0x0040
5596 #define BS_ICON 0x0080
5597 #define BS_HELP 0x0100
5598 #define BS_SYSCOMMAND 0x0200
5599 #define BS_DEFAULT 0x0400
5600 #define BS_NOPOINTERFOCUS 0x0800
5601 #define BS_NOBORDER 0x1000
5602 #define BS_NOCURSORSELECT 0x2000
5603 #define BS_AUTOSIZE 0x4000
5604
5605 typedef struct _BTNCDATA
5606 {
5607 USHORT cb;
5608 USHORT fsCheckState;
5609 USHORT fsHiliteState;
5610 LHANDLE hImage;
5611 } BTNCDATA;
5612 typedef BTNCDATA *PBTNCDATA;
5613
5614 typedef struct _USERBUTTON
5615 {
5616 HWND hwnd;
5617 HPS hps;
5618 ULONG fsState;
5619 ULONG fsStateOld;
5620 } USERBUTTON;
5621 typedef USERBUTTON *PUSERBUTTON;
5622
5623
5624 #endif /* INCL_WINBUTTONS */
5625
5626
5627 #if defined (INCL_WINCLIPBOARD) || defined (INCL_WINDDE)
5628
5629 #define WM_RENDERFMT 0x0060
5630 #define WM_RENDERALLFMTS 0x0061
5631 #define WM_DESTROYCLIPBOARD 0x0062
5632 #define WM_PAINTCLIPBOARD 0x0063
5633 #define WM_SIZECLIPBOARD 0x0064
5634 #define WM_HSCROLLCLIPBOARD 0x0065
5635 #define WM_VSCROLLCLIPBOARD 0x0066
5636 #define WM_DRAWCLIPBOARD 0x0067
5637
5638 #define CF_TEXT 1
5639 #define CF_BITMAP 2
5640 #define CF_DSPTEXT 3
5641 #define CF_DSPBITMAP 4
5642 #define CF_METAFILE 5
5643 #define CF_DSPMETAFILE 6
5644 #define CF_PALETTE 9
5645 #define CF_MMPMFIRST 10
5646 #define CF_MMPMLAST 19
5647
5648 #define SZFMT_TEXT "#1"
5649 #define SZFMT_BITMAP "#2"
5650 #define SZFMT_DSPTEXT "#3"
5651 #define SZFMT_DSPBITMAP "#4"
5652 #define SZFMT_METAFILE "#5"
5653 #define SZFMT_DSPMETAFILE "#6"
5654 #define SZFMT_PALETTE "#9"
5655 #define SZFMT_SYLK "Sylk"
5656 #define SZFMT_DIF "Dif"
5657 #define SZFMT_TIFF "Tiff"
5658 #define SZFMT_OEMTEXT "OemText"
5659 #define SZFMT_DIB "Dib"
5660 #define SZFMT_OWNERDISPLAY "OwnerDisplay"
5661 #define SZFMT_LINK "Link"
5662 #define SZFMT_METAFILEPICT "MetaFilePict"
5663 #define SZFMT_DSPMETAFILEPICT "DspMetaFilePict"
5664 #define SZFMT_CPTEXT "Codepage Text"
5665
5666 typedef struct _CPTEXT
5667 {
5668 USHORT idCountry;
5669 USHORT usCodepage;
5670 USHORT usLangID;
5671 USHORT usSubLangID;
5672 BYTE abText[1];
5673 } CPTEXT;
5674 typedef CPTEXT *PCPTEXT;
5675
5676 typedef struct _MFP
5677 {
5678 POINTL sizeBounds;
5679 POINTL sizeMM;
5680 ULONG cbLength;
5681 USHORT mapMode;
5682 USHORT reserved;
5683 BYTE abData[1];
5684 } MFP;
5685 typedef MFP *PMFP;
5686
5687 #endif /* INCL_WINCLIPBOARD || INCL_WINDDE */
5688
5689 #if defined (INCL_WINCLIPBOARD)
5690
5691 #define CFI_OWNERFREE 0x0001
5692 #define CFI_OWNERDISPLAY 0x0002
5693 #define CFI_HANDLE 0x0200
5694 #define CFI_POINTER 0x0400
5695
5696 BOOL WinCloseClipbrd (HAB hab);
5697 BOOL WinEmptyClipbrd (HAB hab);
5698 ULONG WinEnumClipbrdFmts (HAB hab, ULONG fmt);
5699 BOOL WinOpenClipbrd (HAB hab);
5700 ULONG WinQueryClipbrdData (HAB hab, ULONG fmt);
5701 BOOL WinQueryClipbrdFmtInfo (HAB hab, ULONG fmt, PULONG prgfFmtInfo);
5702 HWND WinQueryClipbrdOwner (HAB hab);
5703 HWND WinQueryClipbrdViewer (HAB hab);
5704 BOOL WinSetClipbrdData (HAB hab, ULONG ulData, ULONG fmt, ULONG rgfFmtInfo);
5705 BOOL WinSetClipbrdOwner (HAB hab, HWND hwnd);
5706 BOOL WinSetClipbrdViewer (HAB hab, HWND hwndNewClipViewer);
5707
5708 #endif /* INCL_WINCLIPBOARD */
5709
5710
5711 #if defined (INCL_WINDDE)
5712
5713 #define WM_DDE_FIRST 0x00a0
5714 #define WM_DDE_INITIATE 0x00a0
5715 #define WM_DDE_REQUEST 0x00a1
5716 #define WM_DDE_ACK 0x00a2
5717 #define WM_DDE_DATA 0x00a3
5718 #define WM_DDE_ADVISE 0x00a4
5719 #define WM_DDE_UNADVISE 0x00a5
5720 #define WM_DDE_POKE 0x00a6
5721 #define WM_DDE_EXECUTE 0x00a7
5722 #define WM_DDE_TERMINATE 0x00a8
5723 #define WM_DDE_INITIATEACK 0x00a9
5724 #define WM_DDE_LAST 0x00af
5725
5726 #define DDE_FACK 0x0001
5727 #define DDE_FBUSY 0x0002
5728 #define DDE_FNODATA 0x0004
5729 #define DDE_FACKREQ 0x0008
5730 #define DDE_FRESPONSE 0x0010
5731 #define DDE_NOTPROCESSED 0x0020
5732 #define DDE_FRESERVED 0x00c0
5733 #define DDE_FAPPSTATUS 0xff00
5734
5735 #define DDECTXT_CASESENSITIVE 0x0001
5736
5737 #define DDEFMT_TEXT 0x0001
5738
5739 #define DDEPM_RETRY 0x0001
5740 #define DDEPM_NOFREE 0x0002
5741
5742 #define SZDDESYS_TOPIC "System"
5743 #define SZDDESYS_ITEM_TOPICS "Topics"
5744 #define SZDDESYS_ITEM_SYSITEMS "SysItems"
5745 #define SZDDESYS_ITEM_RTNMSG "ReturnMessage"
5746 #define SZDDESYS_ITEM_STATUS "Status"
5747 #define SZDDESYS_ITEM_FORMATS "Formats"
5748 #define SZDDESYS_ITEM_SECURITY "Security"
5749 #define SZDDESYS_ITEM_ITEMFORMATS "ItemFormats"
5750 #define SZDDESYS_ITEM_HELP "Help"
5751 #define SZDDESYS_ITEM_PROTOCOLS "Protocols"
5752 #define SZDDESYS_ITEM_RESTART "Restart"
5753
5754 typedef struct _CONVCONTEXT
5755 {
5756 ULONG cb;
5757 ULONG fsContext;
5758 ULONG idCountry;
5759 ULONG usCodepage;
5760 ULONG usLangID;
5761 ULONG usSubLangID;
5762 } CONVCONTEXT;
5763 typedef CONVCONTEXT *PCONVCONTEXT;
5764
5765 typedef struct _DDEINIT
5766 {
5767 ULONG cb;
5768 PSZ pszAppName;
5769 PSZ pszTopic;
5770 ULONG offConvContext;
5771 } DDEINIT;
5772 typedef DDEINIT *PDDEINIT;
5773
5774 typedef struct _DDESTRUCT
5775 {
5776 ULONG cbData;
5777 USHORT fsStatus;
5778 USHORT usFormat;
5779 USHORT offszItemName;
5780 USHORT offabData;
5781 } DDESTRUCT;
5782 typedef DDESTRUCT *PDDESTRUCT;
5783
5784 #define DDES_PSZITEMNAME(pddes) \
5785 (((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName)
5786
5787 #define DDES_PABDATA(pddes) \
5788 (((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData)
5789
5790 #define DDEI_PCONVCONTEXT(pddei) \
5791 ((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext))
5792
5793 BOOL WinDdeInitiate (HWND hwndClient, PCSZ pszAppName, PCSZ pszTopicName,
5794 __const__ CONVCONTEXT *pcctxt);
5795 BOOL WinDdePostMsg (HWND hwndTo, HWND hwndFrom, ULONG wm,
5796 __const__ DDESTRUCT *pddest, ULONG flOptions);
5797 MRESULT WinDdeRespond (HWND hwndClient, HWND hwndServer, PCSZ pszAppName,
5798 PCSZ pszTopicName, __const__ CONVCONTEXT *pcctxt);
5799
5800 #endif /* INCL_WINDDE */
5801
5802
5803 #if defined (INCL_WINCOUNTRY)
5804
5805 #define WCS_ERROR 0
5806 #define WCS_EQ 1
5807 #define WCS_LT 2
5808 #define WCS_GT 3
5809
5810 ULONG WinCompareStrings (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz1,
5811 PCSZ psz2, ULONG reserved);
5812 UCHAR WinCpTranslateChar (HAB hab, ULONG cpSrc, UCHAR chSrc, ULONG cpDst);
5813 BOOL WinCpTranslateString (HAB hab, ULONG cpSrc, PCSZ pszSrc, ULONG cpDst,
5814 ULONG cchDestMax, PSZ pchDest);
5815 PSZ WinNextChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz);
5816 PSZ WinPrevChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ pszStart,
5817 PCSZ psz);
5818 ULONG WinQueryCp (HMQ hmq);
5819 ULONG WinQueryCpList (HAB hab, ULONG ccpMax, PULONG prgcp);
5820 BOOL WinSetCp (HMQ hmq, ULONG idCodePage);
5821 ULONG WinUpper (HAB hab, ULONG idcp, ULONG idcc, PSZ psz);
5822 ULONG WinUpperChar (HAB hab, ULONG idcp, ULONG idcc, ULONG c);
5823
5824 #endif /* INCL_WINCOUNTRY */
5825
5826
5827 #if defined (INCL_WINCURSORS) || !defined (INCL_NOCOMMON)
5828
5829 #define CURSOR_SOLID 0x0000
5830 #define CURSOR_HALFTONE 0x0001
5831 #define CURSOR_FRAME 0x0002
5832 #define CURSOR_FLASH 0x0004
5833 #define CURSOR_BIDI_FIRST 0x0100
5834 #define CURSOR_BIDI_LAST 0x0200
5835 #define CURSOR_SETPOS 0x8000
5836
5837 BOOL WinCreateCursor (HWND hwnd, LONG x, LONG y, LONG cx, LONG cy,
5838 ULONG fs, PRECTL prclClip);
5839 BOOL WinDestroyCursor (HWND hwnd);
5840 BOOL WinShowCursor (HWND hwnd, BOOL fShow);
5841
5842 #endif /* INCL_WINCURSORS || !INCL_NOCOMMON */
5843
5844 #if defined (INCL_WINCURSORS)
5845
5846 typedef struct _CURSORINFO
5847 {
5848 HWND hwnd;
5849 LONG x;
5850 LONG y;
5851 LONG cx;
5852 LONG cy;
5853 ULONG fs;
5854 RECTL rclClip;
5855 } CURSORINFO;
5856 typedef CURSORINFO *PCURSORINFO;
5857
5858 BOOL WinQueryCursorInfo (HWND hwndDesktop, PCURSORINFO pCursorInfo);
5859
5860 #endif /* INCL_WINCURSORS */
5861
5862
5863 #if defined (INCL_WINDESKTOP)
5864
5865 #define SDT_DESTROY 0x0001
5866 #define SDT_NOBKGND 0x0002
5867 #define SDT_TILE 0x0004
5868 #define SDT_SCALE 0x0008
5869 #define SDT_PATTERN 0x0010
5870 #define SDT_CENTER 0x0020
5871 #define SDT_RETAIN 0x0040
5872 #define SDT_LOADFILE 0x0080
5873
5874 typedef struct _DESKTOP
5875 {
5876 ULONG cbSize;
5877 HBITMAP hbm;
5878 LONG x;
5879 LONG y;
5880 ULONG fl;
5881 LONG lTileCount;
5882 CHAR szFile[260];
5883 } DESKTOP;
5884 typedef DESKTOP *PDESKTOP;
5885
5886 BOOL WinQueryDesktopBkgnd (HWND hwndDesktop, PDESKTOP pdsk);
5887 HBITMAP WinSetDesktopBkgnd (HWND hwndDesktop, __const__ DESKTOP *pdskNew);
5888
5889 #endif /* INCL_WINDESKTOP */
5890
5891
5892 #if defined (INCL_WINDIALOGS) || !defined (INCL_NOCOMMON)
5893
5894 #define DID_OK 1
5895 #define DID_CANCEL 2
5896 #define DID_ERROR 0xffff
5897
5898 #define MB_OK 0x0000
5899 #define MB_OKCANCEL 0x0001
5900 #define MB_RETRYCANCEL 0x0002
5901 #define MB_ABORTRETRYIGNORE 0x0003
5902 #define MB_YESNO 0x0004
5903 #define MB_YESNOCANCEL 0x0005
5904 #define MB_CANCEL 0x0006
5905 #define MB_ENTER 0x0007
5906 #define MB_ENTERCANCEL 0x0008
5907
5908 #define MB_NOICON 0x0000
5909 #define MB_CUANOTIFICATION 0x0000
5910 #define MB_ICONQUESTION 0x0010
5911 #define MB_ICONEXCLAMATION 0x0020
5912 #define MB_CUAWARNING 0x0020
5913 #define MB_ICONASTERISK 0x0030
5914 #define MB_ICONHAND 0x0040
5915 #define MB_CUACRITICAL 0x0040
5916 #define MB_QUERY MB_ICONQUESTION
5917 #define MB_WARNING MB_CUAWARNING
5918 #define MB_INFORMATION MB_ICONASTERISK
5919 #define MB_CRITICAL MB_CUACRITICAL
5920 #define MB_ERROR MB_CRITICAL
5921 #define MB_CUSTOMICON 0x0080
5922
5923 #define MB_DEFBUTTON1 0x0000
5924 #define MB_DEFBUTTON2 0x0100
5925 #define MB_DEFBUTTON3 0x0200
5926
5927 #define MB_APPLMODAL 0x0000
5928 #define MB_SYSTEMMODAL 0x1000
5929 #define MB_HELP 0x2000
5930 #define MB_MOVEABLE 0x4000
5931 #define MB_NONMODAL 0x8000
5932
5933 #define MBID_OK 1
5934 #define MBID_CANCEL 2
5935 #define MBID_ABORT 3
5936 #define MBID_RETRY 4
5937 #define MBID_IGNORE 5
5938 #define MBID_YES 6
5939 #define MBID_NO 7
5940 #define MBID_HELP 8
5941 #define MBID_ENTER 9
5942 #define MBID_ERROR 0xffff
5943
5944 #define WA_WARNING 0
5945 #define WA_NOTE 1
5946 #define WA_ERROR 2
5947 #define WA_CDEFALARMS 3
5948
5949 #if 0 /* Multimedia */
5950 #define WA_WINDOWOPEN 3
5951 #define WA_WINDOWCLOSE 4
5952 #define WA_BEGINDRAG 5
5953 #define WA_ENDDRAG 6
5954 #define WA_STARTUP 7
5955 #define WA_SHUTDOWN 8
5956 #define WA_SHRED 9
5957 #define WA_CWINALARMS 13
5958 #endif /* 0 */
5959
5960 #define MAX_MBDTEXT 70
5961
5962 typedef struct _MB2D
5963 {
5964 CHAR achText[MAX_MBDTEXT+1];
5965 CHAR _pad[1];
5966 ULONG idButton;
5967 LONG flStyle;
5968 } MB2D;
5969 typedef MB2D *PMB2D;
5970
5971 typedef struct _MB2INFO
5972 {
5973 ULONG cb;
5974 HPOINTER hIcon;
5975 ULONG cButtons;
5976 ULONG flStyle;
5977 HWND hwndNotify;
5978 MB2D mb2d[1];
5979 } MB2INFO;
5980
5981 typedef MB2INFO *PMB2INFO;
5982
5983
5984 #define WinCheckButton(hwndDlg,id,usCheckState) \
5985 ((ULONG)WinSendDlgItemMsg (hwndDlg, id, BM_SETCHECK, \
5986 MPFROMSHORT (usCheckState), (MPARAM)NULL))
5987
5988 #define WinEnableControl(hwndDlg,id,fEnable) \
5989 WinEnableWindow (WinWindowFromID (hwndDlg, id), fEnable)
5990
5991 #define WinIsControlEnabled(hwndDlg,id) \
5992 ((BOOL)WinIsWindowEnabled (WinWindowFromID (hwndDlg, id)))
5993
5994 #define WinQueryButtonCheckstate(hwndDlg,id) \
5995 ((ULONG)WinSendDlgItemMsg (hwndDlg, id, BM_QUERYCHECK, \
5996 (MPARAM)NULL, (MPARAM)NULL))
5997
5998
5999 BOOL WinAlarm (HWND hwndDesktop, ULONG rgfType);
6000 MRESULT WinDefDlgProc (HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2);
6001 BOOL WinDismissDlg (HWND hwndDlg, ULONG usResult);
6002 ULONG WinDlgBox (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
6003 HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
6004 BOOL WinGetDlgMsg (HWND hwndDlg, PQMSG pqmsg);
6005 HWND WinLoadDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
6006 HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
6007 ULONG WinMessageBox (HWND hwndParent, HWND hwndOwner, PCSZ pszText,
6008 PCSZ pszCaption, ULONG idWindow, ULONG flStyle);
6009 ULONG WinMessageBox2 (HWND hwndParent, HWND hwndOwner, PCSZ pszText,
6010 PCSZ pszCaption, ULONG idWindow, PMB2INFO pmb2info);
6011 BOOL WinQueryDlgItemShort (HWND hwndDlg, ULONG idItem, PSHORT pResult,
6012 BOOL fSigned);
6013 ULONG WinQueryDlgItemText (HWND hwndDlg, ULONG idItem, LONG cchBufferMax,
6014 PSZ pchBuffer);
6015 LONG WinQueryDlgItemTextLength (HWND hwndDlg, ULONG idItem);
6016 BOOL WinSetDlgItemShort (HWND hwndDlg, ULONG idItem, USHORT usValue,
6017 BOOL fSigned);
6018 BOOL WinSetDlgItemText (HWND hwndDlg, ULONG idItem, PCSZ pszText);
6019
6020 #endif /* INCL_WINDIALOGS || !defined (INCL_NOCOMMON) */
6021
6022
6023 #if defined (INCL_WINDIALOGS)
6024
6025 #define DLGC_ENTRYFIELD 0x0001
6026 #define DLGC_BUTTON 0x0002
6027 #define DLGC_RADIOBUTTON 0x0004
6028 #define DLGC_STATIC 0x0008
6029 #define DLGC_DEFAULT 0x0010
6030 #define DLGC_PUSHBUTTON 0x0020
6031 #define DLGC_CHECKBOX 0x0040
6032 #define DLGC_SCROLLBAR 0x0080
6033 #define DLGC_MENU 0x0100
6034 #define DLGC_TABONCLICK 0x0200
6035 #define DLGC_MLE 0x0400
6036
6037 #define EDI_FIRSTTABITEM 0
6038 #define EDI_LASTTABITEM 1
6039 #define EDI_NEXTTABITEM 2
6040 #define EDI_PREVTABITEM 3
6041 #define EDI_FIRSTGROUPITEM 4
6042 #define EDI_LASTGROUPITEM 5
6043 #define EDI_NEXTGROUPITEM 6
6044 #define EDI_PREVGROUPITEM 7
6045
6046 typedef struct _DLGTITEM
6047 {
6048 USHORT fsItemStatus;
6049 USHORT cChildren;
6050 USHORT cchClassName;
6051 USHORT offClassName;
6052 USHORT cchText;
6053 USHORT offText;
6054 ULONG flStyle;
6055 SHORT x;
6056 SHORT y;
6057 SHORT cx;
6058 SHORT cy;
6059 USHORT id;
6060 USHORT offPresParams;
6061 USHORT offCtlData;
6062 } DLGTITEM;
6063 typedef DLGTITEM *PDLGTITEM;
6064
6065 typedef struct _DLGTEMPLATE
6066 {
6067 USHORT cbTemplate;
6068 USHORT type;
6069 USHORT codepage;
6070 USHORT offadlgti;
6071 USHORT fsTemplateStatus;
6072 USHORT iItemFocus;
6073 USHORT coffPresParams;
6074 DLGTITEM adlgti[1];
6075 } DLGTEMPLATE;
6076 typedef DLGTEMPLATE *PDLGTEMPLATE;
6077
6078
6079 HWND WinCreateDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
6080 PDLGTEMPLATE pdlgt, PVOID pCreateParams);
6081 HWND WinEnumDlgItem (HWND hwndDlg, HWND hwnd, ULONG code);
6082 BOOL WinMapDlgPoints (HWND hwndDlg, PPOINTL prgwptl, ULONG cwpt,
6083 BOOL fCalcWindowCoords);
6084 ULONG WinProcessDlg (HWND hwndDlg);
6085 MRESULT WinSendDlgItemMsg (HWND hwndDlg, ULONG idItem, ULONG msg,
6086 MPARAM mp1, MPARAM mp2);
6087 LONG WinSubstituteStrings (HWND hwnd, PCSZ pszSrc, LONG cchDstMax,
6088 PSZ pszDst);
6089
6090 #endif /* INCL_WINDIALOGS */
6091
6092
6093 #if defined (INCL_WINENTRYFIELDS)
6094
6095 #define CBID_LIST 0x029a
6096 #define CBID_EDIT 0x029b
6097
6098 #define CBM_SHOWLIST 0x0170
6099 #define CBM_HILITE 0x0171
6100 #define CBM_ISLISTSHOWING 0x0172
6101
6102 #define CBN_EFCHANGE 1
6103 #define CBN_EFSCROLL 2
6104 #define CBN_MEMERROR 3
6105 #define CBN_LBSELECT 4
6106 #define CBN_LBSCROLL 5
6107 #define CBN_SHOWLIST 6
6108 #define CBN_ENTER 7
6109
6110 #define CBS_SIMPLE 0x0001
6111 #define CBS_DROPDOWN 0x0002
6112 #define CBS_DROPDOWNLIST 0x0004
6113 #define CBS_COMPATIBLE 0x0008
6114
6115 #define EM_QUERYCHANGED 0x0140
6116 #define EM_QUERYSEL 0x0141
6117 #define EM_SETSEL 0x0142
6118 #define EM_SETTEXTLIMIT 0x0143
6119 #define EM_CUT 0x0144
6120 #define EM_COPY 0x0145
6121 #define EM_CLEAR 0x0146
6122 #define EM_PASTE 0x0147
6123 #define EM_QUERYFIRSTCHAR 0x0148
6124 #define EM_SETFIRSTCHAR 0x0149
6125 #define EM_QUERYREADONLY 0x014a
6126 #define EM_SETREADONLY 0x014b
6127 #define EM_SETINSERTMODE 0x014c
6128
6129 #define EN_SETFOCUS 0x0001
6130 #define EN_KILLFOCUS 0x0002
6131 #define EN_CHANGE 0x0004
6132 #define EN_SCROLL 0x0008
6133 #define EN_MEMERROR 0x0010
6134 #define EN_OVERFLOW 0x0020
6135 #define EN_INSERTMODETOGGLE 0x0040
6136
6137 #define ES_LEFT 0x0000
6138 #define ES_CENTER 0x0001
6139 #define ES_RIGHT 0x0002
6140 #define ES_AUTOSCROLL 0x0004
6141 #define ES_MARGIN 0x0008
6142 #define ES_AUTOTAB 0x0010
6143 #define ES_READONLY 0x0020
6144 #define ES_COMMAND 0x0040
6145 #define ES_UNREADABLE 0x0080
6146 #define ES_AUTOSIZE 0x0200
6147
6148 #if defined (INCL_NLS)
6149 #define ES_ANY 0x0000
6150 #define ES_SBCS 0x1000
6151 #define ES_DBCS 0x2000
6152 #define ES_MIXED 0x3000
6153 #endif /* INCL_NLS */
6154
6155 typedef struct _COMBOCDATA
6156 {
6157 ULONG cbSize;
6158 ULONG reserved;
6159 PVOID pHWXCtlData;
6160 } COMBOCDATA;
6161 typedef COMBOCDATA *PCOMBOCDATA;
6162
6163 typedef struct _ENTRYFDATA
6164 {
6165 USHORT cb;
6166 USHORT cchEditLimit;
6167 USHORT ichMinSel;
6168 USHORT ichMaxSel;
6169 PVOID pHWXCtlData;
6170 } ENTRYFDATA;
6171 typedef ENTRYFDATA *PENTRYFDATA;
6172
6173 #endif /* INCL_WINENTRYFIELDS */
6174
6175
6176 #if defined (INCL_WINERRORS)
6177
6178 typedef struct _ERRINFO
6179 {
6180 ULONG cbFixedErrInfo;
6181 ERRORID idError;
6182 ULONG cDetailLevel;
6183 ULONG offaoffszMsg;
6184 ULONG offBinaryData;
6185 } ERRINFO;
6186 typedef ERRINFO *PERRINFO;
6187
6188 ERRORID WinGetLastError (HAB hab);
6189 BOOL WinFreeErrorInfo (PERRINFO perrinfo);
6190 PERRINFO WinGetErrorInfo (HAB hab);
6191
6192 #endif /* INCL_WINERRORS */
6193
6194
6195 #if defined (INCL_WINFRAMECTLS)
6196
6197 #define TBM_SETHILITE 0x01e3
6198 #define TBM_QUERYHILITE 0x01e4
6199
6200 #endif /* INCL_WINFRAMECTLS */
6201
6202
6203 #if defined (INCL_WINHOOKS)
6204
6205 #define HK_SENDMSG 0
6206 #define HK_INPUT 1
6207 #define HK_MSGFILTER 2
6208 #define HK_JOURNALRECORD 3
6209 #define HK_JOURNALPLAYBACK 4
6210 #define HK_HELP 5
6211 #define HK_LOADER 6
6212 #define HK_REGISTERUSERMSG 7
6213 #define HK_MSGCONTROL 8
6214 #define HK_PLIST_ENTRY 9
6215 #define HK_PLIST_EXIT 10
6216 #define HK_FINDWORD 11
6217 #define HK_CODEPAGECHANGED 12
6218 #define HK_WINDOWDC 15
6219 #define HK_DESTROYWINDOW 16
6220 #define HK_CHECKMSGFILTER 20
6221 #define HK_MSGINPUT 21
6222 #define HK_ALARM 22
6223 #define HK_LOCKUP 23
6224 #define HK_FLUSHBUF 24
6225
6226 #define HLPM_FRAME (-1)
6227 #define HLPM_WINDOW (-2)
6228 #define HLPM_MENU (-3)
6229
6230 #define HMQ_CURRENT ((HMQ)1)
6231
6232 #define LHK_DELETEPROC 1
6233 #define LHK_DELETELIB 2
6234 #define LHK_LOADPROC 3
6235 #define LHK_LOADLIB 4
6236
6237 #define MCHK_MSGINTEREST 1
6238 #define MCHK_CLASSMSGINTEREST 2
6239 #define MCHK_SYNCHRONISATION 3
6240 #define MCHK_MSGMODE 4
6241
6242 #define MSGF_DIALOGBOX 1
6243 #define MSGF_MESSAGEBOX 2
6244 #define MSGF_DDEPOSTMSG 3
6245 #define MSGF_TRACK 8
6246
6247 #define PM_MODEL_1X 0
6248 #define PM_MODEL_2X 1
6249
6250 #define RUMHK_DATATYPE 1
6251 #define RUMHK_MSG 2
6252
6253
6254 typedef struct _SMHSTRUCT
6255 {
6256 MPARAM mp2;
6257 MPARAM mp1;
6258 ULONG msg;
6259 HWND hwnd;
6260 ULONG model;
6261 } SMHSTRUCT;
6262 typedef SMHSTRUCT *PSMHSTRUCT;
6263
6264
6265 BOOL WinCallMsgFilter (HAB hab, PQMSG pqmsg, ULONG msgf);
6266 BOOL WinReleaseHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
6267 BOOL WinSetHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
6268
6269 #endif /* INCL_WINHOOKS */
6270
6271
6272 #if defined (INCL_WININPUT) || !defined (INCL_NOCOMMON)
6273
6274 #define FC_NOSETFOCUS 0x0001
6275 #define FC_NOBRINGTOTOP 0x0001 /*!*/
6276 #define FC_NOLOSEFOCUS 0x0002
6277 #define FC_NOBRINGTOPFIRSTWINDOW 0x0002 /*!*/
6278 #define FC_NOSETACTIVE 0x0004
6279 #define FC_NOLOSEACTIVE 0x0008
6280 #define FC_NOSETSELECTION 0x0010
6281 #define FC_NOLOSESELECTION 0x0020
6282
6283 #define QFC_NEXTINCHAIN 0x0001
6284 #define QFC_ACTIVE 0x0002
6285 #define QFC_FRAME 0x0003
6286 #define QFC_SELECTACTIVE 0x0004
6287 #define QFC_PARTOFCHAIN 0x0005
6288
6289 BOOL WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange);
6290 BOOL WinLockupSystem (HAB hab);
6291 BOOL WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus);
6292 BOOL WinUnlockSystem (HAB hab, PCSZ pszPassword);
6293
6294 #endif /* INCL_WININPUT || !INCL_NOCOMMON */
6295
6296
6297 #if defined (INCL_WININPUT)
6298
6299 #define WM_MOUSEFIRST 0x0070
6300 #define WM_MOUSEMOVE 0x0070
6301 #define WM_BUTTONCLICKFIRST 0x0071
6302 #define WM_BUTTON1DOWN 0x0071
6303 #define WM_BUTTON1UP 0x0072
6304 #define WM_BUTTON1DBLCLK 0x0073
6305 #define WM_BUTTON2DOWN 0x0074
6306 #define WM_BUTTON2UP 0x0075
6307 #define WM_BUTTON2DBLCLK 0x0076
6308 #define WM_BUTTON3DOWN 0x0077
6309 #define WM_BUTTON3UP 0x0078
6310 #define WM_BUTTON3DBLCLK 0x0079
6311 #define WM_BUTTONCLICKLAST 0x0079
6312 #define WM_MOUSELAST 0x0079
6313 #define WM_CHAR 0x007a
6314 #define WM_VIOCHAR 0x007b
6315 #define WM_JOURNALNOTIFY 0x007c
6316 #define WM_MOUSEMAP 0x007d
6317 #define WM_VRNDISABLED 0x007e
6318 #define WM_VRNENABLED 0x007f
6319
6320 #define WM_EXTMOUSEFIRST 0x0410
6321 #define WM_CHORD 0x0410
6322 #define WM_BUTTON1MOTIONSTART 0x0411
6323 #define WM_BUTTON1MOTIONEND 0x0412
6324 #define WM_BUTTON1CLICK 0x0413
6325 #define WM_BUTTON2MOTIONSTART 0x0414
6326 #define WM_BUTTON2MOTIONEND 0x0415
6327 #define WM_BUTTON2CLICK 0x0416
6328 #define WM_BUTTON3MOTIONSTART 0x0417
6329 #define WM_BUTTON3MOTIONEND 0x0418
6330 #define WM_BUTTON3CLICK 0x0419
6331 #define WM_EXTMOUSELAST 0x0419
6332
6333 #define WM_MOUSETRANSLATEFIRST 0x0420
6334 #define WM_BEGINDRAG 0x0420
6335 #define WM_ENDDRAG 0x0421
6336 #define WM_SINGLESELECT 0x0422
6337 #define WM_OPEN 0x0423
6338 #define WM_CONTEXTMENU 0x0424
6339 #define WM_CONTEXTHELP 0x0425
6340 #define WM_TEXTEDIT 0x0426
6341 #define WM_BEGINSELECT 0x0427
6342 #define WM_ENDSELECT 0x0428
6343 #define WM_MOUSETRANSLATELAST 0x0428
6344 #define WM_PICKUP 0x0429
6345
6346 #define WM_PENFIRST 0x0481
6347 #define WM_PENLAST 0x049f
6348
6349 #define WM_MMPMFIRST 0x0500
6350 #define WM_MMPMLAST 0x05ff
6351
6352 #define WM_BIDI_FIRST 0x0bd0
6353 #define WM_BIDI_LAST 0x0bff
6354
6355 #define INP_NONE 0x0000
6356 #define INP_KBD 0x0001
6357 #define INP_MULT 0x0002
6358 #define INP_RES2 0x0004
6359 #define INP_SHIFT 0x0008
6360 #define INP_CTRL 0x0010
6361 #define INP_ALT 0x0020
6362 #define INP_RES3 0x0040
6363 #define INP_RES4 0x0080
6364 #define INP_IGNORE 0xffff
6365
6366 #define JRN_QUEUESTATUS 0x0001
6367 #define JRN_PHYSKEYSTATE 0x0002
6368
6369 #define KC_NONE 0x0000
6370 #define KC_CHAR 0x0001
6371 #define KC_VIRTUALKEY 0x0002
6372 #define KC_SCANCODE 0x0004
6373 #define KC_SHIFT 0x0008
6374 #define KC_CTRL 0x0010
6375 #define KC_ALT 0x0020
6376 #define KC_KEYUP 0x0040
6377 #define KC_PREVDOWN 0x0080
6378 #define KC_LONEKEY 0x0100
6379 #define KC_DEADKEY 0x0200
6380 #define KC_COMPOSITE 0x0400
6381 #define KC_INVALIDCOMP 0x0800
6382 #define KC_TOGGLE 0x1000
6383 #define KC_INVALIDCHAR 0x2000
6384 #define KC_DBCSRSRVD1 0x4000
6385 #define KC_DBCSRSRVD2 0x8000
6386
6387 #define VK_BUTTON1 0x0001
6388 #define VK_BUTTON2 0x0002
6389 #define VK_BUTTON3 0x0003
6390 #define VK_BREAK 0x0004
6391 #define VK_BACKSPACE 0x0005
6392 #define VK_TAB 0x0006
6393 #define VK_BACKTAB 0x0007
6394 #define VK_NEWLINE 0x0008
6395 #define VK_SHIFT 0x0009
6396 #define VK_CTRL 0x000a
6397 #define VK_ALT 0x000b
6398 #define VK_ALTGRAF 0x000c
6399 #define VK_PAUSE 0x000d
6400 #define VK_CAPSLOCK 0x000e
6401 #define VK_ESC 0x000f
6402 #define VK_SPACE 0x0010
6403 #define VK_PAGEUP 0x0011
6404 #define VK_PAGEDOWN 0x0012
6405 #define VK_END 0x0013
6406 #define VK_HOME 0x0014
6407 #define VK_LEFT 0x0015
6408 #define VK_UP 0x0016
6409 #define VK_RIGHT 0x0017
6410 #define VK_DOWN 0x0018
6411 #define VK_PRINTSCRN 0x0019
6412 #define VK_INSERT 0x001a
6413 #define VK_DELETE 0x001b
6414 #define VK_SCRLLOCK 0x001c
6415 #define VK_NUMLOCK 0x001d
6416 #define VK_ENTER 0x001e
6417 #define VK_SYSRQ 0x001f
6418 #define VK_F1 0x0020
6419 #define VK_F2 0x0021
6420 #define VK_F3 0x0022
6421 #define VK_F4 0x0023
6422 #define VK_F5 0x0024
6423 #define VK_F6 0x0025
6424 #define VK_F7 0x0026
6425 #define VK_F8 0x0027
6426 #define VK_F9 0x0028
6427 #define VK_F10 0x0029
6428 #define VK_F11 0x002a
6429 #define VK_F12 0x002b
6430 #define VK_F13 0x002c
6431 #define VK_F14 0x002d
6432 #define VK_F15 0x002e
6433 #define VK_F16 0x002f
6434 #define VK_F17 0x0030
6435 #define VK_F18 0x0031
6436 #define VK_F19 0x0032
6437 #define VK_F20 0x0033
6438 #define VK_F21 0x0034
6439 #define VK_F22 0x0035
6440 #define VK_F23 0x0036
6441 #define VK_F24 0x0037
6442 #define VK_ENDDRAG 0x0038
6443 #define VK_CLEAR 0x0039
6444 #define VK_EREOF 0x003a
6445 #define VK_PA1 0x003b
6446 #define VK_ATTN 0x003c
6447 #define VK_CRSEL 0x003d
6448 #define VK_EXSEL 0x003e
6449 #define VK_COPY 0x003f
6450 #define VK_BLK1 0x0040
6451 #define VK_BLK2 0x0041
6452
6453 #define VK_MENU VK_F10
6454
6455 #if defined (INCL_NLS)
6456 #define VK_DBCSFIRST 0x0080
6457 #define VK_DBCSLAST 0x00ff
6458 #define VK_BIDI_FIRST 0x00e0
6459 #define VK_BIDI_LAST 0x00ff
6460 #endif /* INCL_NLS */
6461
6462 #define VK_USERFIRST 0x0100
6463 #define VK_USERLAST 0x01ff
6464
6465 typedef struct _CHARMSG
6466 {
6467 USHORT fs;
6468 UCHAR cRepeat;
6469 UCHAR scancode;
6470 USHORT chr;
6471 USHORT vkey;
6472 } CHRMSG;
6473 typedef CHRMSG *PCHRMSG;
6474
6475 typedef struct _MOUSEMSG
6476 {
6477 SHORT x;
6478 SHORT y;
6479 USHORT codeHitTest;
6480 USHORT fsInp;
6481 } MSEMSG;
6482 typedef MSEMSG *PMSEMSG;
6483
6484 #define CHARMSG(pmsg) ((PCHRMSG)((PBYTE)pmsg + sizeof (ULONG)))
6485 #define MOUSEMSG(pmsg) ((PMSEMSG)((PBYTE)pmsg + sizeof (ULONG)))
6486
6487 BOOL WinCheckInput (HAB hab);
6488 BOOL WinEnablePhysInput (HWND hwndDesktop, BOOL fEnable);
6489 LONG WinGetKeyState (HWND hwndDesktop, LONG vkey);
6490 LONG WinGetPhysKeyState (HWND hwndDesktop, LONG sc);
6491 BOOL WinIsPhysInputEnabled (HWND hwndDesktop);
6492 HWND WinQueryCapture (HWND hwndDesktop);
6493 HWND WinQueryFocus (HWND hwndDesktop);
6494 ULONG WinQueryVisibleRegion (HWND hwnd, HRGN hrgn);
6495 BOOL WinSetCapture (HWND hwndDesktop, HWND hwnd);
6496 BOOL WinSetKeyboardStateTable (HWND hwndDesktop, PBYTE pKeyStateTable,
6497 BOOL fSet);
6498 BOOL WinSetVisibleRegionNotify (HWND hwnd, BOOL fEnable);
6499
6500 #endif /* INCL_WININPUT */
6501
6502
6503 #if defined (INCL_WINLISTBOXES)
6504
6505 #define LS_MULTIPLESEL 0x0001
6506 #define LS_OWNERDRAW 0x0002
6507 #define LS_NOADJUSTPOS 0x0004
6508 #define LS_HORZSCROLL 0x0008
6509 #define LS_EXTENDEDSEL 0x0010
6510
6511 #define LN_SELECT 1
6512 #define LN_SETFOCUS 2
6513 #define LN_KILLFOCUS 3
6514 #define LN_SCROLL 4
6515 #define LN_ENTER 5
6516
6517 #define LM_QUERYITEMCOUNT 0x0160
6518 #define LM_INSERTITEM 0x0161
6519 #define LM_SETTOPINDEX 0x0162
6520 #define LM_DELETEITEM 0x0163
6521 #define LM_SELECTITEM 0x0164
6522 #define LM_QUERYSELECTION 0x0165
6523 #define LM_SETITEMTEXT 0x0166
6524 #define LM_QUERYITEMTEXTLENGTH 0x0167
6525 #define LM_QUERYITEMTEXT 0x0168
6526 #define LM_SETITEMHANDLE 0x0169
6527 #define LM_QUERYITEMHANDLE 0x016a
6528 #define LM_SEARCHSTRING 0x016b
6529 #define LM_SETITEMHEIGHT 0x016c
6530 #define LM_QUERYTOPINDEX 0x016d
6531 #define LM_DELETEALL 0x016e
6532 #define LM_INSERTMULTITEMS 0x016f
6533 #define LM_SETITEMWIDTH 0x0660 /* ? */
6534
6535 #define LIT_CURSOR (-4)
6536 #define LIT_ERROR (-3)
6537 #define LIT_MEMERROR (-2)
6538 #define LIT_NONE (-1)
6539 #define LIT_FIRST (-1)
6540
6541 #define LIT_END (-1)
6542 #define LIT_SORTASCENDING (-2)
6543 #define LIT_SORTDESCENDING (-3)
6544
6545 #define LSS_SUBSTRING 0x0001
6546 #define LSS_PREFIX 0x0002
6547 #define LSS_CASESENSITIVE 0x0004
6548
6549
6550 typedef struct _LBOXINFO
6551 {
6552 LONG lItemIndex;
6553 ULONG ulItemCount;
6554 ULONG reserved;
6555 ULONG reserved2;
6556 } LBOXINFO;
6557 typedef LBOXINFO *PLBOXINFO;
6558
6559
6560 #define WinDeleteLboxItem(hwndLbox,index) \
6561 ((LONG)WinSendMsg (hwndLbox, LM_DELETEITEM, MPFROMLONG (index), \
6562 (MPARAM)NULL))
6563
6564 #define WinInsertLboxItem(hwndLbox,index,psz) \
6565 ((LONG)WinSendMsg (hwndLbox, LM_INSERTITEM, MPFROMLONG(index), \
6566 MPFROMP (psz)))
6567
6568 #define WinQueryLboxCount(hwndLbox) \
6569 ((LONG)WinSendMsg (hwndLbox, LM_QUERYITEMCOUNT, (MPARAM)NULL, \
6570 (MPARAM)NULL))
6571
6572 #define WinQueryLboxItemText(hwndLbox,index,psz,cchMax) \
6573 ((LONG)WinSendMsg (hwndLbox, LM_QUERYITEMTEXT, \
6574 MPFROM2SHORT((index), (cchMax)), MPFROMP (psz)))
6575
6576 #define WinQueryLboxItemTextLength(hwndLbox,index) \
6577 ((SHORT)WinSendMsg (hwndLbox, LM_QUERYITEMTEXTLENGTH, \
6578 MPFROMSHORT (index), (MPARAM)NULL))
6579
6580 #define WinQueryLboxSelectedItem(hwndLbox) \
6581 ((LONG)WinSendMsg (hwndLbox, LM_QUERYSELECTION, MPFROMLONG (LIT_FIRST), \
6582 (MPARAM)NULL))
6583
6584 #define WinSetLboxItemText(hwndLbox,index,psz) \
6585 ((BOOL)WinSendMsg (hwndLbox, LM_SETITEMTEXT, \
6586 MPFROMLONG (index), MPFROMP (psz)))
6587
6588 #endif /* INCL_WINLISTBOXES */
6589
6590
6591 #if defined (INCL_WINLOAD)
6592
6593 BOOL WinDeleteLibrary (HAB hab, HLIB libhandle);
6594 BOOL WinDeleteProcedure (HAB hab, PFNWP wndproc);
6595 HLIB WinLoadLibrary (HAB hab, PCSZ libname);
6596 PFNWP WinLoadProcedure (HAB hab, HLIB libhandle, PSZ procname);
6597
6598 #endif /* INCL_WINLOAD */
6599
6600
6601 #if defined (INCL_WINMENUS)
6602
6603 #define MIA_NODISMISS 0x0020
6604 #define MIA_FRAMED 0x1000
6605 #define MIA_CHECKED 0x2000
6606 #define MIA_DISABLED 0x4000
6607 #define MIA_HILITED 0x8000
6608
6609 #define MIS_TEXT 0x0001
6610 #define MIS_BITMAP 0x0002
6611 #define MIS_SEPARATOR 0x0004
6612 #define MIS_OWNERDRAW 0x0008
6613 #define MIS_SUBMENU 0x0010
6614 #define MIS_MULTMENU 0x0020
6615 #define MIS_SYSCOMMAND 0x0040
6616 #define MIS_HELP 0x0080
6617 #define MIS_STATIC 0x0100
6618 #define MIS_BUTTONSEPARATOR 0x0200
6619 #define MIS_BREAK 0x0400
6620 #define MIS_BREAKSEPARATOR 0x0800
6621 #define MIS_GROUP 0x1000
6622 #define MIS_SINGLE 0x2000
6623
6624 #define MIT_END (-1)
6625 #define MIT_NONE (-1)
6626 #define MIT_MEMERROR (-1)
6627 #define MIT_ERROR (-1)
6628 #define MIT_FIRST (-2)
6629 #define MIT_LAST (-3)
6630
6631 #define MM_INSERTITEM 0x0180
6632 #define MM_DELETEITEM 0x0181
6633 #define MM_QUERYITEM 0x0182
6634 #define MM_SETITEM 0x0183
6635 #define MM_QUERYITEMCOUNT 0x0184
6636 #define MM_STARTMENUMODE 0x0185
6637 #define MM_ENDMENUMODE 0x0186
6638 #define MM_REMOVEITEM 0x0188
6639 #define MM_SELECTITEM 0x0189
6640 #define MM_QUERYSELITEMID 0x018a
6641 #define MM_QUERYITEMTEXT 0x018b
6642 #define MM_QUERYITEMTEXTLENGTH 0x018c
6643 #define MM_SETITEMHANDLE 0x018d
6644 #define MM_SETITEMTEXT 0x018e
6645 #define MM_ITEMPOSITIONFROMID 0x018f
6646 #define MM_ITEMIDFROMPOSITION 0x0190
6647 #define MM_QUERYITEMATTR 0x0191
6648 #define MM_SETITEMATTR 0x0192
6649 #define MM_ISITEMVALID 0x0193
6650 #define MM_QUERYITEMRECT 0x0194
6651
6652 #define MM_QUERYDEFAULTITEMID 0x0431
6653 #define MM_SETDEFAULTITEMID 0x0432
6654
6655 #define MS_ACTIONBAR 0x0001
6656 #define MS_TITLEBUTTON 0x0002
6657 #define MS_VERTICALFLIP 0x0004
6658 #define MS_CONDITIONALCASCADE 0x0040
6659
6660 #define PU_POSITIONONITEM 0x0001
6661 #define PU_HCONSTRAIN 0x0002
6662 #define PU_VCONSTRAIN 0x0004
6663 #define PU_NONE 0x0000
6664 #define PU_MOUSEBUTTON1DOWN 0x0008
6665 #define PU_MOUSEBUTTON2DOWN 0x0010
6666 #define PU_MOUSEBUTTON3DOWN 0x0018
6667 #define PU_SELECTITEM 0x0020
6668 #define PU_MOUSEBUTTON1 0x0040
6669 #define PU_MOUSEBUTTON2 0x0080
6670 #define PU_MOUSEBUTTON3 0x0100
6671 #define PU_KEYBOARD 0x0200
6672
6673 typedef struct _MENUITEM
6674 {
6675 SHORT iPosition;
6676 USHORT afStyle;
6677 USHORT afAttribute;
6678 USHORT id;
6679 HWND hwndSubMenu;
6680 ULONG hItem;
6681 } MENUITEM;
6682 typedef MENUITEM *PMENUITEM;
6683
6684 typedef struct _mti /* Note 1 */
6685 {
6686 USHORT afStyle;
6687 USHORT pad;
6688 USHORT idItem;
6689 CHAR c[2];
6690 } MTI;
6691
6692 typedef struct _mt /* Note 1 */
6693 {
6694 ULONG len;
6695 USHORT codepage;
6696 USHORT reserved;
6697 USHORT cMti;
6698 MTI rgMti[1];
6699 } MT;
6700 typedef MT *LPMT;
6701
6702 typedef struct _OWNERITEM
6703 {
6704 HWND hwnd;
6705 HPS hps;
6706 ULONG fsState;
6707 ULONG fsAttribute;
6708 ULONG fsStateOld;
6709 ULONG fsAttributeOld;
6710 RECTL rclItem;
6711 LONG idItem;
6712 ULONG hItem;
6713 } OWNERITEM;
6714 typedef OWNERITEM *POWNERITEM;
6715
6716
6717 #define WinCheckMenuItem(hwndMenu,id,fcheck) \
6718 ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMATTR, \
6719 MPFROM2SHORT (id, TRUE), \
6720 MPFROM2SHORT (MIA_CHECKED, \
6721 ((USHORT)(fcheck) ? MIA_CHECKED : 0))))
6722
6723 #define WinEnableMenuItem(hwndMenu,id,fEnable) \
6724 ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMATTR, MPFROM2SHORT (id, TRUE), \
6725 MPFROM2SHORT (MIA_DISABLED, \
6726 ((USHORT)(fEnable) ? 0 : MIA_DISABLED))))
6727
6728 #define WinIsMenuItemChecked(hwndMenu,id) \
6729 ((BOOL)WinSendMsg (hwndMenu, MM_QUERYITEMATTR, \
6730 MPFROM2SHORT (id, TRUE), \
6731 MPFROMLONG (MIA_CHECKED)))
6732
6733 #define WinIsMenuItemEnabled(hwndMenu,id) \
6734 (!(BOOL)WinSendMsg (hwndMenu, MM_QUERYITEMATTR, \
6735 MPFROM2SHORT (id, TRUE), \
6736 MPFROMLONG (MIA_DISABLED)))
6737
6738 #define WinIsMenuItemValid(hwndMenu,id) \
6739 ((BOOL)WinSendMsg (hwndMenu, MM_ISITEMVALID, \
6740 MPFROM2SHORT (id, TRUE), MPFROMLONG (FALSE)))
6741
6742 #define WinSetMenuItemText(hwndMenu,id,psz) \
6743 ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMTEXT, \
6744 MPFROMLONG (id), MPFROMP (psz)))
6745
6746
6747 HWND WinCreateMenu (HWND hwndParent, CPVOID lpmt);
6748 HWND WinLoadMenu (HWND hwndFrame, HMODULE hmod, ULONG idMenu);
6749 BOOL WinPopupMenu (HWND hwndParent, HWND hwndOwner, HWND hwndMenu,
6750 LONG x, LONG y, LONG idItem, ULONG fs);
6751
6752 #endif /* INCL_WINMENUS */
6753
6754
6755 #if defined (INCL_WINMESSAGEMGR)
6756
6757 #define BMSG_POST 0x0000
6758 #define BMSG_SEND 0x0001
6759 #define BMSG_POSTQUEUE 0x0002
6760 #define BMSG_DESCENDANTS 0x0004
6761 #define BMSG_FRAMEONLY 0x0008
6762
6763 #define CVR_ALIGNLEFT 0x0001
6764 #define CVR_ALIGNBOTTOM 0x0002
6765 #define CVR_ALIGNRIGHT 0x0004
6766 #define CVR_ALIGNTOP 0x0008
6767 #define CVR_REDRAW 0x0010
6768
6769 #define HT_NORMAL 0
6770 #define HT_TRANSPARENT (-1)
6771 #define HT_DISCARD (-2)
6772 #define HT_ERROR (-3)
6773
6774 #define QS_KEY 0x0001
6775 #define QS_MOUSEBUTTON 0x0002
6776 #define QS_MOUSEMOVE 0x0004
6777 #define QS_MOUSE 0x0006
6778 #define QS_TIMER 0x0008
6779 #define QS_PAINT 0x0010
6780 #define QS_POSTMSG 0x0020
6781 #define QS_SEM1 0x0040
6782 #define QS_SEM2 0x0080
6783 #define QS_SEM3 0x0100
6784 #define QS_SEM4 0x0200
6785 #define QS_SENDMSG 0x0400
6786 #define QS_MSGINPUT 0x0800
6787
6788 #define SMIM_ALL 0x0eff
6789 #define SMI_NOINTEREST 0x0001
6790 #define SMI_INTEREST 0x0002
6791 #define SMI_RESET 0x0004
6792 #define SMI_AUTODISPATCH 0x0008
6793
6794 #define WPM_TEXT 0x0001
6795 #define WPM_CTLDATA 0x0002
6796 #define WPM_PRESPARAMS 0x0004
6797 #define WPM_CCHTEXT 0x0008
6798 #define WPM_CBCTLDATA 0x0010
6799 #define WPM_CBPRESPARAMS 0x0020
6800
6801
6802 typedef struct _WNDPARAMS
6803 {
6804 ULONG fsStatus;
6805 ULONG cchText;
6806 PSZ pszText;
6807 ULONG cbPresParams;
6808 PVOID pPresParams;
6809 ULONG cbCtlData;
6810 PVOID pCtlData;
6811 } WNDPARAMS;
6812 typedef WNDPARAMS *PWNDPARAMS;
6813
6814 BOOL WinBroadcastMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, ULONG rgf);
6815 BOOL WinInSendMsg (HAB hab);
6816 BOOL WinPostQueueMsg (HMQ hmq, ULONG msg, MPARAM mp1, MPARAM mp2);
6817 BOOL WinQueryMsgPos (HAB hab, PPOINTL pptl);
6818 ULONG WinQueryMsgTime (HAB hab);
6819 ULONG WinQueryQueueStatus (HWND hwndDesktop);
6820 ULONG WinRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
6821 BOOL WinSetClassMsgInterest (HAB hab, PCSZ pszClassName, ULONG msg_class,
6822 LONG control);
6823 BOOL WinSetMsgInterest (HWND hwnd, ULONG msg_class, LONG control);
6824 ULONG WinWaitEventSem (HEV hev, ULONG ulTimeout);
6825 BOOL WinWaitMsg (HAB hab, ULONG msgFirst, ULONG msgLast);
6826 ULONG WinWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
6827
6828 #endif /* INCL_WINMESSAGEMGR */
6829
6830
6831 #if defined (INCL_WINPALETTE)
6832
6833 LONG WinRealizePalette (HWND hwnd, HPS hps, PULONG pcclr);
6834
6835 #endif /* INCL_WINPALETTE */
6836
6837
6838 #if defined (INCL_WINPOINTERS)
6839
6840 #define DP_NORMAL 0x0000
6841 #define DP_HALFTONED 0x0001
6842 #define DP_INVERTED 0x0002
6843 #define DP_MINI 0x0004
6844
6845 #define SBMP_OLD_SYSMENU 1
6846 #define SBMP_OLD_SBUPARROW 2
6847 #define SBMP_OLD_SBDNARROW 3
6848 #define SBMP_OLD_SBRGARROW 4
6849 #define SBMP_OLD_SBLFARROW 5
6850 #define SBMP_MENUCHECK 6
6851 #define SBMP_OLD_CHECKBOXES 7
6852 #define SBMP_BTNCORNERS 8
6853 #define SBMP_OLD_MINBUTTON 9
6854 #define SBMP_OLD_MAXBUTTON 10
6855 #define SBMP_OLD_RESTOREBUTTON 11
6856 #define SBMP_OLD_CHILDSYSMENU 12
6857 #define SBMP_DRIVE 15
6858 #define SBMP_FILE 16
6859 #define SBMP_FOLDER 17
6860 #define SBMP_TREEPLUS 18
6861 #define SBMP_TREEMINUS 19
6862 #define SBMP_PROGRAM 22
6863 #define SBMP_MENUATTACHED 23
6864 #define SBMP_SIZEBOX 24
6865 #define SBMP_SYSMENU 25
6866 #define SBMP_MINBUTTON 26
6867 #define SBMP_MAXBUTTON 27
6868 #define SBMP_RESTOREBUTTON 28
6869 #define SBMP_CHILDSYSMENU 29
6870 #define SBMP_SYSMENUDEP 30
6871 #define SBMP_MINBUTTONDEP 31
6872 #define SBMP_MAXBUTTONDEP 32
6873 #define SBMP_RESTOREBUTTONDEP 33
6874 #define SBMP_CHILDSYSMENUDEP 34
6875 #define SBMP_SBUPARROW 35
6876 #define SBMP_SBDNARROW 36
6877 #define SBMP_SBLFARROW 37
6878 #define SBMP_SBRGARROW 38
6879 #define SBMP_SBUPARROWDEP 39
6880 #define SBMP_SBDNARROWDEP 40
6881 #define SBMP_SBLFARROWDEP 41
6882 #define SBMP_SBRGARROWDEP 42
6883 #define SBMP_SBUPARROWDIS 43
6884 #define SBMP_SBDNARROWDIS 44
6885 #define SBMP_SBLFARROWDIS 45
6886 #define SBMP_SBRGARROWDIS 46
6887 #define SBMP_COMBODOWN 47
6888 #define SBMP_CHECKBOXES 48
6889 #define SBMP_HIDE 50
6890 #define SBMP_HIDEDEP 51
6891 #define SBMP_CLOSE 52
6892 #define SBMP_CLOSEDEP 53
6893
6894 #define SPTR_ARROW 1
6895 #define SPTR_TEXT 2
6896 #define SPTR_WAIT 3
6897 #define SPTR_SIZE 4
6898 #define SPTR_MOVE 5
6899 #define SPTR_SIZENWSE 6
6900 #define SPTR_SIZENESW 7
6901 #define SPTR_SIZEWE 8
6902 #define SPTR_SIZENS 9
6903 #define SPTR_APPICON 10
6904 #define SPTR_ICONINFORMATION 11
6905 #define SPTR_ICONQUESTION 12
6906 #define SPTR_ICONERROR 13
6907 #define SPTR_ICONWARNING 14
6908 #define SPTR_ILLEGAL 18
6909 #define SPTR_FILE 19
6910 #define SPTR_FOLDER 20
6911 #define SPTR_MULTFILE 21
6912 #define SPTR_PROGRAM 22
6913 #define SPTR_DISPLAY_PTRS 22
6914
6915 #define SPTR_PENFIRST 23
6916 #define SPTR_PENLAST 39
6917 #define SPTR_CPTR 39
6918
6919 #define SPTR_HANDICON SPTR_ICONERROR
6920 #define SPTR_QUESICON SPTR_ICONQUESTION
6921 #define SPTR_BANGICON SPTR_ICONWARNING
6922 #define SPTR_NOTEICON SPTR_ICONINFORMATION
6923
6924 typedef struct _POINTERINFO
6925 {
6926 ULONG fPointer;
6927 LONG xHotspot;
6928 LONG yHotspot;
6929 HBITMAP hbmPointer;
6930 HBITMAP hbmColor;
6931 HBITMAP hbmMiniPointer;
6932 HBITMAP hbmMiniColor;
6933 } POINTERINFO;
6934 typedef POINTERINFO *PPOINTERINFO;
6935
6936
6937 HPOINTER WinCreatePointer (HWND hwndDesktop, HBITMAP hbmPointer, BOOL fPointer,
6938 LONG xHotspot, LONG yHotspot);
6939 HPOINTER WinCreatePointerIndirect (HWND hwndDesktop,
6940 __const__ POINTERINFO *pptri);
6941 BOOL WinDestroyPointer (HPOINTER hptr);
6942 BOOL WinDrawPointer (HPS hps, LONG x, LONG y, HPOINTER hptr, ULONG fs);
6943 HBITMAP WinGetSysBitmap (HWND hwndDesktop, ULONG ibm);
6944 HPOINTER WinLoadPointer (HWND hwndDesktop, HMODULE hmod, ULONG idres);
6945 BOOL WinLockPointerUpdate (HWND hwndDesktop, HPOINTER hptrNew,
6946 ULONG ulTimeInterval);
6947 BOOL WinQueryPointerPos (HWND hwndDesktop, PPOINTL pptl);
6948 BOOL WinQueryPointerInfo (HPOINTER hptr, PPOINTERINFO pPointerInfo);
6949 HPOINTER WinQuerySysPointer (HWND hwndDesktop, LONG lId, BOOL fCopy);
6950 BOOL WinQuerySysPointerData (HWND hwndDesktop, ULONG ulId,
6951 PICONINFO pIconInfo);
6952 BOOL WinSetPointer (HWND hwndDesktop, HPOINTER hptrNew);
6953 BOOL WinSetPointerOwner (HPOINTER hptr, PID pid, BOOL fDestroy);
6954 BOOL WinSetPointerPos (HWND hwndDesktop, LONG x, LONG y);
6955 BOOL WinSetSysPointerData (HWND hwndDesktop, ULONG ulId,
6956 __const__ ICONINFO *pIconInfo);
6957 BOOL WinShowPointer (HWND hwndDesktop, BOOL fShow);
6958
6959 #endif /* INCL_WINPOINTERS */
6960
6961
6962 #if defined (INCL_WINRECTANGLES)
6963
6964 BOOL WinCopyRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc);
6965 BOOL WinEqualRect (HAB hab, __const__ RECTL *prcl1, __const__ RECTL *prcl2);
6966 BOOL WinInflateRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
6967 BOOL WinIntersectRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
6968 __const__ RECTL *prclSrc2);
6969 BOOL WinIsRectEmpty (HAB hab, __const__ RECTL *prcl);
6970 BOOL WinMakePoints (HAB hab, PPOINTL pwpt, ULONG cwpt);
6971 BOOL WinMakeRect (HAB hab, PRECTL pwrc);
6972 BOOL WinOffsetRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
6973 BOOL WinPtInRect (HAB hab, __const__ RECTL *prcl, __const__ POINTL *pptl);
6974 BOOL WinSetRect (HAB hab, PRECTL prcl, LONG xLeft, LONG yBottom, LONG xRight,
6975 LONG yTop);
6976 BOOL WinSetRectEmpty (HAB hab, PRECTL prcl);
6977 BOOL WinSubtractRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
6978 __const__ RECTL *prclSrc2);
6979 BOOL WinUnionRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
6980 __const__ RECTL *prclSrc2);
6981
6982 #endif /* INCL_WINRECTANGLES */
6983
6984
6985 #if defined (INCL_WINSCROLLBARS)
6986
6987 #define SB_LINEUP 1
6988 #define SB_LINEDOWN 2
6989 #define SB_LINELEFT 1
6990 #define SB_LINERIGHT 2
6991 #define SB_PAGEUP 3
6992 #define SB_PAGEDOWN 4
6993 #define SB_PAGELEFT 3
6994 #define SB_PAGERIGHT 4
6995 #define SB_SLIDERTRACK 5
6996 #define SB_SLIDERPOSITION 6
6997 #define SB_ENDSCROLL 7
6998
6999 #define SBM_SETSCROLLBAR 0x01a0
7000 #define SBM_SETPOS 0x01a1
7001 #define SBM_QUERYPOS 0x01a2
7002 #define SBM_QUERYRANGE 0x01a3
7003 #define SBM_SETTHUMBSIZE 0x01a6
7004
7005 #define SBS_HORZ 0
7006 #define SBS_VERT 1
7007 #define SBS_THUMBSIZE 2
7008 #define SBS_AUTOTRACK 4
7009 #define SBS_AUTOSIZE 0x2000
7010
7011 typedef struct _SBCDATA
7012 {
7013 USHORT cb;
7014 USHORT sHilite;
7015 SHORT posFirst;
7016 SHORT posLast;
7017 SHORT posThumb;
7018 SHORT cVisible;
7019 SHORT cTotal;
7020 } SBCDATA;
7021 typedef SBCDATA *PSBCDATA;
7022
7023 #endif /* INCL_WINSCROLLBARS */
7024
7025
7026 #if defined (INCL_WINSTATICS)
7027
7028 #define SM_SETHANDLE 0x0100
7029 #define SM_QUERYHANDLE 0x0101
7030
7031 #define SS_TEXT 0x0001
7032 #define SS_GROUPBOX 0x0002
7033 #define SS_ICON 0x0003
7034 #define SS_BITMAP 0x0004
7035 #define SS_FGNDRECT 0x0005
7036 #define SS_HALFTONERECT 0x0006
7037 #define SS_BKGNDRECT 0x0007
7038 #define SS_FGNDFRAME 0x0008
7039 #define SS_HALFTONEFRAME 0x0009
7040 #define SS_BKGNDFRAME 0x000a
7041 #define SS_SYSICON 0x000b
7042 #define SS_AUTOSIZE 0x0040
7043
7044 #define WM_MSGBOXINIT 0x010e
7045 #define WM_MSGBOXDISMISS 0x010f
7046
7047 #endif /* INCL_WINSTATICS */
7048
7049
7050 #if defined (INCL_WINSYS)
7051
7052 #define CCF_GLOBAL 0x0000
7053 #define CCF_APPLICATION 0x0001
7054 #define CCF_COUNTCOLORS 0x0010
7055 #define CCF_ALLCOLORS 0x0020
7056
7057 #define CCI_FOREGROUND 1
7058 #define CCI_FOREGROUNDREADONLY 2
7059 #define CCI_BACKGROUND 3
7060 #define CCI_BACKGROUNDDIALOG 4
7061 #define CCI_DISABLEDFOREGROUND 5
7062 #define CCI_DISABLEDFOREGROUNDREADONLY 6
7063 #define CCI_DISABLEDBACKGROUND 7
7064 #define CCI_DISABLEDBACKGROUNDDIALOG 8
7065 #define CCI_HIGHLIGHTFOREGROUND 9
7066 #define CCI_HIGHLIGHTBACKGROUND 10
7067 #define CCI_HIGHLIGHTBACKGROUNDDIALOG 11
7068 #define CCI_INACTIVEFOREGROUND 12
7069 #define CCI_INACTIVEFOREGROUNDDIALOG 13
7070 #define CCI_INACTIVEBACKGROUND 14
7071 #define CCI_INACTIVEBACKGROUNDTEXT 15
7072 #define CCI_ACTIVEFOREGROUND 16
7073 #define CCI_ACTIVEFOREGROUNDDIALOG 17
7074 #define CCI_ACTIVEBACKGROUND 18
7075 #define CCI_ACTIVEBACKGROUNDTEXT 19
7076 #define CCI_PAGEBACKGROUND 20
7077 #define CCI_PAGEFOREGROUND 21
7078 #define CCI_FIELDBACKGROUND 22
7079 #define CCI_BORDER 23
7080 #define CCI_BORDERLIGHT 24
7081 #define CCI_BORDERDARK 25
7082 #define CCI_BORDER2 26
7083 #define CCI_BORDER2LIGHT 27
7084 #define CCI_BORDER2DARK 28
7085 #define CCI_BORDERDEFAULT 29
7086 #define CCI_BUTTONBACKGROUND 30
7087 #define CCI_BUTTONFOREGROUND 31
7088 #define CCI_BUTTONBORDERLIGHT 32
7089 #define CCI_BUTTONBORDERDARK 33
7090 #define CCI_ARROW 34
7091 #define CCI_DISABLEDARROW 35
7092 #define CCI_ARROWBORDERLIGHT 36
7093 #define CCI_ARROWBORDERDARK 37
7094 #define CCI_CHECKLIGHT 38
7095 #define CCI_CHECKMIDDLE 39
7096 #define CCI_CHECKDARK 40
7097 #define CCI_ICONFOREGROUND 41
7098 #define CCI_ICONBACKGROUND 42
7099 #define CCI_ICONBACKGROUNDDESKTOP 43
7100 #define CCI_ICONHILITEFOREGROUND 44
7101 #define CCI_ICONHILITEBACKGROUND 45
7102 #define CCI_MAJORTABFOREGROUND 46
7103 #define CCI_MAJORTABBACKGROUND 47
7104 #define CCI_MINORTABFOREGROUND 48
7105 #define CCI_MINORTABBACKGROUND 49
7106 #define CCI_MAXINDEX 49
7107
7108 #define CCT_STATIC 1
7109 #define CCT_STATICTEXT 2
7110 #define CCT_GROUPBOX 3
7111 #define CCT_PUSHBUTTON 4
7112 #define CCT_CHECKBOX 5
7113 #define CCT_RADIOBUTTON 6
7114 #define CCT_ENTRYFIELD 7
7115 #define CCT_LISTBOX 8
7116 #define CCT_COMBOBOX 9
7117 #define CCT_SCROLLBAR 10
7118 #define CCT_FRAME 11
7119 #define CCT_MENU 12
7120 #define CCT_TITLEBAR 13
7121 #define CCT_SPINBUTTON 14
7122 #define CCT_SLIDER 15
7123 #define CCT_CIRCULARSLIDER 16
7124 #define CCT_VALUESET 17
7125 #define CCT_MLE 18
7126 #define CCT_CONTAINER 19
7127 #define CCT_NOTEBOOK 20
7128 #define CCT_MAXTYPE 20
7129
7130 #define CCV_NOTFOUND (-1)
7131 #define CCV_IGNORE (-2)
7132 #define CCV_DEFAULT (-3)
7133
7134 #define PP_FOREGROUNDCOLOR 1
7135 #define PP_FOREGROUNDCOLORINDEX 2
7136 #define PP_BACKGROUNDCOLOR 3
7137 #define PP_BACKGROUNDCOLORINDEX 4
7138 #define PP_HILITEFOREGROUNDCOLOR 5
7139 #define PP_HILITEFOREGROUNDCOLORINDEX 6
7140 #define PP_HILITEBACKGROUNDCOLOR 7
7141 #define PP_HILITEBACKGROUNDCOLORINDEX 8
7142 #define PP_DISABLEDFOREGROUNDCOLOR 9
7143 #define PP_DISABLEDFOREGROUNDCOLORINDEX 10
7144 #define PP_DISABLEDBACKGROUNDCOLOR 11
7145 #define PP_DISABLEDBACKGROUNDCOLORINDEX 12
7146 #define PP_BORDERCOLOR 13
7147 #define PP_BORDERCOLORINDEX 14
7148 #define PP_FONTNAMESIZE 15
7149 #define PP_FONTHANDLE 16
7150 #define PP_RESERVED 17
7151 #define PP_ACTIVECOLOR 18
7152 #define PP_ACTIVECOLORINDEX 19
7153 #define PP_INACTIVECOLOR 20
7154 #define PP_INACTIVECOLORINDEX 21
7155 #define PP_ACTIVETEXTFGNDCOLOR 22
7156 #define PP_ACTIVETEXTFGNDCOLORINDEX 23
7157 #define PP_ACTIVETEXTBGNDCOLOR 24
7158 #define PP_ACTIVETEXTBGNDCOLORINDEX 25
7159 #define PP_INACTIVETEXTFGNDCOLOR 26
7160 #define PP_INACTIVETEXTFGNDCOLORINDEX 27
7161 #define PP_INACTIVETEXTBGNDCOLOR 28
7162 #define PP_INACTIVETEXTBGNDCOLORINDEX 29
7163 #define PP_SHADOW 30
7164 #define PP_MENUFOREGROUNDCOLOR 31
7165 #define PP_MENUFOREGROUNDCOLORINDEX 32
7166 #define PP_MENUBACKGROUNDCOLOR 33
7167 #define PP_MENUBACKGROUNDCOLORINDEX 34
7168 #define PP_MENUHILITEFGNDCOLOR 35
7169 #define PP_MENUHILITEFGNDCOLORINDEX 36
7170 #define PP_MENUHILITEBGNDCOLOR 37
7171 #define PP_MENUHILITEBGNDCOLORINDEX 38
7172 #define PP_MENUDISABLEDFGNDCOLOR 39
7173 #define PP_MENUDISABLEDFGNDCOLORINDEX 40
7174 #define PP_MENUDISABLEDBGNDCOLOR 41
7175 #define PP_MENUDISABLEDBGNDCOLORINDEX 42
7176 #define PP_SHADOWTEXTCOLOR 43
7177 #define PP_SHADOWTEXTCOLORINDEX 44
7178 #define PP_SHADOWHILITEFGNDCOLOR 45
7179 #define PP_SHADOWHILITEFGNDCOLORINDEX 46
7180 #define PP_SHADOWHILITEBGNDCOLOR 47
7181 #define PP_SHADOWHILITEBGNDCOLORINDEX 48
7182 #define PP_ICONTEXTBACKGROUNDCOLOR 49
7183 #define PP_ICONTEXTBACKGROUNDCOLORINDEX 50
7184 #define PP_BORDERLIGHTCOLOR 51
7185 #define PP_BORDERDARKCOLOR 52
7186 #define PP_BORDER2COLOR 53
7187 #define PP_BORDER2LIGHTCOLOR 54
7188 #define PP_BORDER2DARKCOLOR 55
7189 #define PP_BORDERDEFAULTCOLOR 56
7190 #define PP_FIELDBACKGROUNDCOLOR 57
7191 #define PP_BUTTONBACKGROUNDCOLOR 58
7192 #define PP_BUTTONBORDERLIGHTCOLOR 59
7193 #define PP_BUTTONBORDERDARKCOLOR 60
7194 #define PP_ARROWCOLOR 61
7195 #define PP_ARROWBORDERLIGHTCOLOR 62
7196 #define PP_ARROWBORDERDARKCOLOR 63
7197 #define PP_ARROWDISABLEDCOLOR 64
7198 #define PP_CHECKLIGHTCOLOR 65
7199 #define PP_CHECKMIDDLECOLOR 66
7200 #define PP_CHECKDARKCOLOR 67
7201 #define PP_PAGEFOREGROUNDCOLOR 68
7202 #define PP_PAGEBACKGROUNDCOLOR 69
7203 #define PP_MAJORTABFOREGROUNDCOLOR 70
7204 #define PP_MAJORTABBACKGROUNDCOLOR 71
7205 #define PP_MINORTABFOREGROUNDCOLOR 72
7206 #define PP_MINORTABBACKGROUNDCOLOR 73
7207
7208 #define PP_BIDI_FIRST 0x0100
7209 #define PP_BIDI_LAST 0x012f
7210 #define PP_USER 0x8000
7211
7212 #define QPF_NOINHERIT 0x0001
7213 #define QPF_ID1COLORINDEX 0x0002
7214 #define QPF_ID2COLORINDEX 0x0004
7215 #define QPF_PURERGBCOLOR 0x0008
7216 #define QPF_VALIDFLAGS 0x000f
7217
7218 #define SV_SWAPBUTTON 0
7219 #define SV_DBLCLKTIME 1
7220 #define SV_CXDBLCLK 2
7221 #define SV_CYDBLCLK 3
7222 #define SV_CXSIZEBORDER 4
7223 #define SV_CYSIZEBORDER 5
7224 #define SV_ALARM 6
7225 #define SV_CURSORRATE 9
7226 #define SV_FIRSTSCROLLRATE 10
7227 #define SV_SCROLLRATE 11
7228 #define SV_NUMBEREDLISTS 12
7229 #define SV_WARNINGFREQ 13
7230 #define SV_NOTEFREQ 14
7231 #define SV_ERRORFREQ 15
7232 #define SV_WARNINGDURATION 16
7233 #define SV_NOTEDURATION 17
7234 #define SV_ERRORDURATION 18
7235 #define SV_CXSCREEN 20
7236 #define SV_CYSCREEN 21
7237 #define SV_CXVSCROLL 22
7238 #define SV_CYHSCROLL 23
7239 #define SV_CYVSCROLLARROW 24
7240 #define SV_CXHSCROLLARROW 25
7241 #define SV_CXBORDER 26
7242 #define SV_CYBORDER 27
7243 #define SV_CXDLGFRAME 28
7244 #define SV_CYDLGFRAME 29
7245 #define SV_CYTITLEBAR 30
7246 #define SV_CYVSLIDER 31
7247 #define SV_CXHSLIDER 32
7248 #define SV_CXMINMAXBUTTON 33
7249 #define SV_CYMINMAXBUTTON 34
7250 #define SV_CYMENU 35
7251 #define SV_CXFULLSCREEN 36
7252 #define SV_CYFULLSCREEN 37
7253 #define SV_CXICON 38
7254 #define SV_CYICON 39
7255 #define SV_CXPOINTER 40
7256 #define SV_CYPOINTER 41
7257 #define SV_DEBUG 42
7258 #define SV_CMOUSEBUTTONS 43
7259 #define SV_CPOINTERBUTTONS 43
7260 #define SV_POINTERLEVEL 44
7261 #define SV_CURSORLEVEL 45
7262 #define SV_TRACKRECTLEVEL 46
7263 #define SV_CTIMERS 47
7264 #define SV_MOUSEPRESENT 48
7265 #define SV_CXBYTEALIGN 49
7266 #define SV_CXALIGN 49
7267 #define SV_CYBYTEALIGN 50
7268 #define SV_CYALIGN 50
7269 #define SV_DESKTOPWORKAREAYTOP 51
7270 #define SV_DESKTOPWORKAREAYBOTTOM 52
7271 #define SV_DESKTOPWORKAREAXRIGHT 53
7272 #define SV_DESKTOPWORKAREAXLEFT 54
7273 #define SV_NOTRESERVED 56
7274 #define SV_EXTRAKEYBEEP 57
7275 #define SV_SETLIGHTS 58
7276 #define SV_INSERTMODE 59
7277 #define SV_MENUROLLDOWNDELAY 64
7278 #define SV_MENUROLLUPDELAY 65
7279 #define SV_ALTMNEMONIC 66
7280 #define SV_TASKLISTMOUSEACCESS 67
7281 #define SV_CXICONTEXTWIDTH 68
7282 #define SV_CICONTEXTLINES 69
7283 #define SV_CHORDTIME 70
7284 #define SV_CXCHORD 71
7285 #define SV_CYCHORD 72
7286 #define SV_CXMOTIONSTART 73
7287 #define SV_CYMOTIONSTART 74
7288 #define SV_BEGINDRAG 75
7289 #define SV_ENDDRAG 76
7290 #define SV_SINGLESELECT 77
7291 #define SV_OPEN 78
7292 #define SV_CONTEXTMENU 79
7293 #define SV_CONTEXTHELP 80
7294 #define SV_TEXTEDIT 81
7295 #define SV_BEGINSELECT 82
7296 #define SV_ENDSELECT 83
7297 #define SV_BEGINDRAGKB 84
7298 #define SV_ENDDRAGKB 85
7299 #define SV_SELECTKB 86
7300 #define SV_OPENKB 87
7301 #define SV_CONTEXTMENUKB 88
7302 #define SV_CONTEXTHELPKB 89
7303 #define SV_TEXTEDITKB 90
7304 #define SV_BEGINSELECTKB 91
7305 #define SV_ENDSELECTKB 92
7306 #define SV_ANIMATION 93
7307 #define SV_ANIMATIONSPEED 94
7308 #define SV_MONOICONS 95
7309 #define SV_KBDALTERED 96
7310 #define SV_PRINTSCREEN 97
7311 #define SV_LOCKSTARTINPUT 98
7312 #define SV_DYNAMICDRAG 99
7313 #define SV_CSYSVALUES 100
7314
7315 #define SYSCLR_SHADOWHILITEBGND (-50)
7316 #define SYSCLR_SHADOWHILITEFGND (-49)
7317 #define SYSCLR_SHADOWTEXT (-48)
7318 #define SYSCLR_ENTRYFIELD (-47)
7319 #define SYSCLR_MENUDISABLEDTEXT (-46)
7320 #define SYSCLR_MENUHILITE (-45)
7321 #define SYSCLR_MENUHILITEBGND (-44)
7322 #define SYSCLR_PAGEBACKGROUND (-43)
7323 #define SYSCLR_FIELDBACKGROUND (-42)
7324 #define SYSCLR_BUTTONLIGHT (-41)
7325 #define SYSCLR_BUTTONMIDDLE (-40)
7326 #define SYSCLR_BUTTONDARK (-39)
7327 #define SYSCLR_BUTTONDEFAULT (-38)
7328 #define SYSCLR_TITLEBOTTOM (-37)
7329 #define SYSCLR_SHADOW (-36)
7330 #define SYSCLR_ICONTEXT (-35)
7331 #define SYSCLR_DIALOGBACKGROUND (-34)
7332 #define SYSCLR_HILITEFOREGROUND (-33)
7333 #define SYSCLR_HILITEBACKGROUND (-32)
7334 #define SYSCLR_INACTIVETITLETEXTBGND (-31)
7335 #define SYSCLR_ACTIVETITLETEXTBGND (-30)
7336 #define SYSCLR_INACTIVETITLETEXT (-29)
7337 #define SYSCLR_ACTIVETITLETEXT (-28)
7338 #define SYSCLR_OUTPUTTEXT (-27)
7339 #define SYSCLR_WINDOWSTATICTEXT (-26)
7340 #define SYSCLR_SCROLLBAR (-25)
7341 #define SYSCLR_BACKGROUND (-24)
7342 #define SYSCLR_ACTIVETITLE (-23)
7343 #define SYSCLR_INACTIVETITLE (-22)
7344 #define SYSCLR_MENU (-21)
7345 #define SYSCLR_WINDOW (-20)
7346 #define SYSCLR_WINDOWFRAME (-19)
7347 #define SYSCLR_MENUTEXT (-18)
7348 #define SYSCLR_WINDOWTEXT (-17)
7349 #define SYSCLR_TITLETEXT (-16)
7350 #define SYSCLR_ACTIVEBORDER (-15)
7351 #define SYSCLR_INACTIVEBORDER (-14)
7352 #define SYSCLR_APPWORKSPACE (-13)
7353 #define SYSCLR_HELPBACKGROUND (-12)
7354 #define SYSCLR_HELPTEXT (-11)
7355 #define SYSCLR_HELPHILITE (-10)
7356
7357 #define SYSCLR_CSYSCOLORS 41
7358
7359 #define WM_CTLCOLORCHANGE 0x0129
7360 #define WM_QUERYCTLTYPE 0x0130 /*0x012a?*/
7361
7362
7363 typedef struct _CTLCOLOR
7364 {
7365 LONG clrIndex;
7366 LONG clrValue;
7367 } CTLCOLOR;
7368 typedef CTLCOLOR *PCTLCOLOR;
7369
7370 typedef struct _PARAM
7371 {
7372 ULONG id;
7373 ULONG cb;
7374 BYTE ab[1];
7375 } PARAM;
7376 typedef PARAM *NPPARAM;
7377 typedef PARAM *PPARAM;
7378
7379 typedef struct _PRESPARAMS
7380 {
7381 ULONG cb;
7382 PARAM aparam[1];
7383 } PRESPARAMS;
7384 typedef PRESPARAMS *NPPRESPARAMS;
7385 typedef PRESPARAMS *PPRESPARAMS;
7386
7387
7388 LONG WinQueryControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor,
7389 ULONG cCtlColor, PCTLCOLOR pCtlColor);
7390 ULONG WinQueryPresParam (HWND hwnd, ULONG id1, ULONG id2, PULONG pulId,
7391 ULONG cbBuf, PVOID pbBuf, ULONG fs);
7392 LONG WinQuerySysColor (HWND hwndDesktop, LONG clr, LONG lReserved);
7393 LONG WinQuerySysValue (HWND hwndDesktop, LONG iSysValue);
7394 BOOL WinRemovePresParam (HWND hwnd, ULONG id);
7395 LONG WinSetControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor,
7396 ULONG cCtlColor, PCTLCOLOR pCtlColor);
7397 BOOL WinSetPresParam (HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam);
7398 BOOL WinSetSysColors (HWND hwndDesktop, ULONG flOptions, ULONG flFormat,
7399 LONG clrFirst, ULONG cclr, __const__ LONG *pclr);
7400 BOOL WinSetSysValue (HWND hwndDesktop, LONG iSysValue, LONG lValue);
7401
7402 #endif /* INCL_WINSYS */
7403
7404
7405 #if defined (INCL_WINTHUNKAPI)
7406
7407 PFN WinQueryClassThunkProc (PCSZ pszClassname);
7408 LONG WinQueryWindowModel (HWND hwnd);
7409 PFN WinQueryWindowThunkProc (HWND hwnd);
7410 BOOL WinSetClassThunkProc (PCSZ pszClassname, PFN pfnThunkProc);
7411 BOOL WinSetWindowThunkProc (HWND hwnd, PFN pfnThunkProc);
7412
7413 #endif /* INCL_WINTHUNKAPI */
7414
7415
7416 #if defined (INCL_WINTIMER)
7417
7418 #define TID_CURSOR 0xffff
7419 #define TID_SCROLL 0xfffe
7420 #define TID_FLASHWINDOW 0xfffd
7421 #define TID_USERMAX 0x7fff
7422
7423 ULONG WinGetCurrentTime (HAB hab);
7424 ULONG WinStartTimer (HAB hab, HWND hwnd, ULONG idTimer, ULONG dtTimeout);
7425 BOOL WinStopTimer (HAB hab, HWND hwnd, ULONG idTimer);
7426
7427 #endif /* INCL_WINTIMER */
7428
7429 #if defined (INCL_WINTRACKRECT)
7430
7431 #define TF_LEFT 0x0001
7432 #define TF_TOP 0x0002
7433 #define TF_RIGHT 0x0004
7434 #define TF_BOTTOM 0x0008
7435 #define TF_SETPOINTERPOS 0x0010
7436 #define TF_GRID 0x0020
7437 #define TF_STANDARD 0x0040
7438 #define TF_ALLINBOUNDARY 0x0080
7439 #define TF_VALIDATETRACKRECT 0x0100
7440 #define TF_PARTINBOUNDARY 0x0200
7441
7442 #define TF_MOVE 0x000f
7443
7444 typedef struct _TRACKINFO
7445 {
7446 LONG cxBorder;
7447 LONG cyBorder;
7448 LONG cxGrid;
7449 LONG cyGrid;
7450 LONG cxKeyboard;
7451 LONG cyKeyboard;
7452 RECTL rclTrack;
7453 RECTL rclBoundary;
7454 POINTL ptlMinTrackSize;
7455 POINTL ptlMaxTrackSize;
7456 ULONG fs;
7457 } TRACKINFO;
7458 typedef TRACKINFO *PTRACKINFO;
7459
7460 BOOL WinShowTrackRect (HWND hwnd, BOOL fShow);
7461 BOOL WinTrackRect (HWND hwnd, HPS hps, PTRACKINFO pti);
7462
7463 #endif /* INCL_WINTRACKRECT */
7464
7465 /* -------------------- MULTIPLE LINE ENTRIES ----------------------------- */
7466
7467 #if defined (INCL_WINMLE)
7468
7469 #define MLS_WORDWRAP 0x0001
7470 #define MLS_BORDER 0x0002
7471 #define MLS_VSCROLL 0x0004
7472 #define MLS_HSCROLL 0x0008
7473 #define MLS_READONLY 0x0010
7474 #define MLS_IGNORETAB 0x0020
7475 #define MLS_DISABLEUNDO 0x0040
7476
7477 #define MLFFMTRECT_FORMATRECT 0x0007
7478 #define MLFFMTRECT_LIMITHORZ 0x0001
7479 #define MLFFMTRECT_LIMITVERT 0x0002
7480 #define MLFFMTRECT_MATCHWINDOW 0x0004
7481
7482 #define MLFIE_CFTEXT 0
7483 #define MLFIE_NOTRANS 1
7484 #define MLFIE_WINFMT 2
7485 #define MLFIE_RTF 3
7486
7487 #define MLFEFR_RESIZE 0x0001
7488 #define MLFEFR_TABSTOP 0x0002
7489 #define MLFEFR_FONT 0x0004
7490 #define MLFEFR_TEXT 0x0008
7491 #define MLFEFR_WORDWRAP 0x0010
7492 #define MLFETL_TEXTBYTES 0x0020
7493
7494 #define MLFMARGIN_LEFT 0x0001
7495 #define MLFMARGIN_BOTTOM 0x0002
7496 #define MLFMARGIN_RIGHT 0x0003
7497 #define MLFMARGIN_TOP 0x0004
7498
7499 #define MLFQS_MINMAXSEL 0
7500 #define MLFQS_MINSEL 1
7501 #define MLFQS_MAXSEL 2
7502 #define MLFQS_ANCHORSEL 3
7503 #define MLFQS_CURSORSEL 4
7504
7505 #define MLFCLPBD_TOOMUCHTEXT 0x0001
7506 #define MLFCLPBD_ERROR 0x0002
7507
7508 #define MLFSEARCH_CASESENSITIVE 0x0001
7509 #define MLFSEARCH_SELECTMATCH 0x0002
7510 #define MLFSEARCH_CHANGEALL 0x0004
7511
7512 #define MLM_SETTEXTLIMIT 0x01b0
7513 #define MLM_QUERYTEXTLIMIT 0x01b1
7514 #define MLM_SETFORMATRECT 0x01b2
7515 #define MLM_QUERYFORMATRECT 0x01b3
7516 #define MLM_SETWRAP 0x01b4
7517 #define MLM_QUERYWRAP 0x01b5
7518 #define MLM_SETTABSTOP 0x01b6
7519 #define MLM_QUERYTABSTOP 0x01b7
7520 #define MLM_SETREADONLY 0x01b8
7521 #define MLM_QUERYREADONLY 0x01b9
7522
7523 #define MLM_QUERYCHANGED 0x01ba
7524 #define MLM_SETCHANGED 0x01bb
7525 #define MLM_QUERYLINECOUNT 0x01bc
7526 #define MLM_CHARFROMLINE 0x01bd
7527 #define MLM_LINEFROMCHAR 0x01be
7528 #define MLM_QUERYLINELENGTH 0x01bf
7529 #define MLM_QUERYTEXTLENGTH 0x01c0
7530
7531 #define MLM_FORMAT 0x01c1
7532 #define MLM_SETIMPORTEXPORT 0x01c2
7533 #define MLM_IMPORT 0x01c3
7534 #define MLM_EXPORT 0x01c4
7535 #define MLM_DELETE 0x01c6
7536 #define MLM_QUERYFORMATLINELENGTH 0x01c7
7537 #define MLM_QUERYFORMATTEXTLENGTH 0x01c8
7538 #define MLM_INSERT 0x01c9
7539
7540 #define MLM_SETSEL 0x01ca
7541 #define MLM_QUERYSEL 0x01cb
7542 #define MLM_QUERYSELTEXT 0x01cc
7543
7544 #define MLM_QUERYUNDO 0x01cd
7545 #define MLM_UNDO 0x01ce
7546 #define MLM_RESETUNDO 0x01cf
7547
7548 #define MLM_QUERYFONT 0x01d0
7549 #define MLM_SETFONT 0x01d1
7550 #define MLM_SETTEXTCOLOR 0x01d2
7551 #define MLM_QUERYTEXTCOLOR 0x01d3
7552 #define MLM_SETBACKCOLOR 0x01d4
7553 #define MLM_QUERYBACKCOLOR 0x01d5
7554
7555 #define MLM_QUERYFIRSTCHAR 0x01d6
7556 #define MLM_SETFIRSTCHAR 0x01d7
7557
7558 #define MLM_CUT 0x01d8
7559 #define MLM_COPY 0x01d9
7560 #define MLM_PASTE 0x01da
7561 #define MLM_CLEAR 0x01db
7562
7563 #define MLM_ENABLEREFRESH 0x01dc
7564 #define MLM_DISABLEREFRESH 0x01dd
7565
7566 #define MLM_SEARCH 0x01de
7567 #define MLM_QUERYIMPORTEXPORT 0x01df
7568
7569 #define MLN_OVERFLOW 0x0001
7570 #define MLN_PIXHORZOVERFLOW 0x0002
7571 #define MLN_PIXVERTOVERFLOW 0x0003
7572 #define MLN_TEXTOVERFLOW 0x0004
7573 #define MLN_VSCROLL 0x0005
7574 #define MLN_HSCROLL 0x0006
7575 #define MLN_CHANGE 0x0007
7576 #define MLN_SETFOCUS 0x0008
7577 #define MLN_KILLFOCUS 0x0009
7578 #define MLN_MARGIN 0x000a
7579 #define MLN_SEARCHPAUSE 0x000b
7580 #define MLN_MEMERROR 0x000c
7581 #define MLN_UNDOOVERFLOW 0x000d
7582 #define MLN_CLPBDFAIL 0x000f
7583
7584
7585 typedef LONG IPT;
7586 typedef IPT *PIPT;
7587 typedef LONG PIX;
7588 typedef ULONG LINE;
7589
7590
7591 typedef struct _FORMATRECT /* Note 1 */
7592 {
7593 LONG cxFormat;
7594 LONG cyFormat;
7595 } MLEFORMATRECT;
7596 typedef MLEFORMATRECT *PFORMATRECT;
7597
7598 typedef struct _MLECTLDATA
7599 {
7600 USHORT cbCtlData;
7601 USHORT afIEFormat;
7602 ULONG cchText;
7603 IPT iptAnchor;
7604 IPT iptCursor;
7605 LONG cxFormat;
7606 LONG cyFormat;
7607 ULONG afFormatFlags;
7608 PVOID pHWXCtlData;
7609 } MLECTLDATA;
7610 typedef MLECTLDATA *PMLECTLDATA;
7611
7612 typedef struct _MLEOVERFLOW
7613 {
7614 ULONG afErrInd;
7615 LONG nBytesOver;
7616 LONG pixHorzOver;
7617 LONG pixVertOver;
7618 } MLEOVERFLOW;
7619 typedef MLEOVERFLOW *POVERFLOW;
7620
7621 typedef struct _MLEMARGSTRUCT
7622 {
7623 USHORT afMargins;
7624 USHORT usMouMsg;
7625 IPT iptNear;
7626 } MLEMARGSTRUCT;
7627 typedef MLEMARGSTRUCT *PMARGSTRUCT;
7628
7629 typedef struct _SEARCH /* Note 1 */
7630 {
7631 USHORT cb;
7632 USHORT _pad;
7633 PCHAR pchFind;
7634 PCHAR pchReplace;
7635 SHORT cchFind;
7636 SHORT cchReplace;
7637 IPT iptStart;
7638 IPT iptStop;
7639 USHORT cchFound;
7640 } MLE_SEARCHDATA;
7641 typedef MLE_SEARCHDATA *PMLE_SEARCHDATA;
7642
7643 #endif /* INCL_WINMLE */
7644
7645 /* --------------- GRAPHICS PROGRAMMING INTERFACE ------------------------- */
7646
7647 #define GPI_ERROR 0
7648 #define GPI_OK 1
7649 #define GPI_ALTERROR (-1)
7650
7651 #define HRGN_ERROR ((HRGN)(-1))
7652
7653 #define CLR_ERROR (-255)
7654 #define CLR_NOINDEX (-254)
7655 #define CLR_FALSE (-5)
7656 #define CLR_TRUE (-4)
7657 #define CLR_DEFAULT (-3)
7658 #define CLR_WHITE (-2)
7659 #define CLR_BLACK (-1)
7660 #define CLR_BACKGROUND 0
7661 #define CLR_BLUE 1
7662 #define CLR_RED 2
7663 #define CLR_PINK 3
7664 #define CLR_GREEN 4
7665 #define CLR_CYAN 5
7666 #define CLR_YELLOW 6
7667 #define CLR_NEUTRAL 7
7668 #define CLR_DARKGRAY 8
7669 #define CLR_DARKBLUE 9
7670 #define CLR_DARKRED 10
7671 #define CLR_DARKPINK 11
7672 #define CLR_DARKGREEN 12
7673 #define CLR_DARKCYAN 13
7674 #define CLR_BROWN 14
7675 #define CLR_PALEGRAY 15
7676
7677 #define RGB_ERROR (-255)
7678 #define RGB_BLACK 0x00000000
7679 #define RGB_BLUE 0x000000ff
7680 #define RGB_GREEN 0x0000ff00
7681 #define RGB_CYAN 0x0000ffff
7682 #define RGB_RED 0x00ff0000
7683 #define RGB_PINK 0x00ff00ff
7684 #define RGB_YELLOW 0x00ffff00
7685 #define RGB_WHITE 0x00ffffff
7686
7687 #define PRIM_LINE 1
7688 #define PRIM_CHAR 2
7689 #define PRIM_MARKER 3
7690 #define PRIM_AREA 4
7691 #define PRIM_IMAGE 5
7692
7693 #define AM_ERROR (-1)
7694 #define AM_PRESERVE 0
7695 #define AM_NOPRESERVE 1
7696
7697 #define FM_ERROR (-1)
7698 #define FM_DEFAULT 0
7699 #define FM_OR 1
7700 #define FM_OVERPAINT 2
7701 #define FM_LEAVEALONE 5
7702
7703 #define FM_XOR 4
7704 #define FM_AND 6
7705 #define FM_SUBTRACT 7
7706 #define FM_MASKSRCNOT 8
7707 #define FM_ZERO 9
7708 #define FM_NOTMERGESRC 10
7709 #define FM_NOTXORSRC 11
7710 #define FM_INVERT 12
7711 #define FM_MERGESRCNOT 13
7712 #define FM_NOTCOPYSRC 14
7713 #define FM_MERGENOTSRC 15
7714 #define FM_NOTMASKSRC 16
7715 #define FM_ONE 17
7716
7717 #define BM_ERROR (-1)
7718 #define BM_DEFAULT 0
7719 #define BM_OR 1
7720 #define BM_OVERPAINT 2
7721 #define BM_LEAVEALONE 5
7722
7723 #define BM_XOR 4
7724 #define BM_AND 6
7725 #define BM_SUBTRACT 7
7726 #define BM_MASKSRCNOT 8
7727 #define BM_ZERO 9
7728 #define BM_NOTMERGESRC 10
7729 #define BM_NOTXORSRC 11
7730 #define BM_INVERT 12
7731 #define BM_MERGESRCNOT 13
7732 #define BM_NOTCOPYSRC 14
7733 #define BM_MERGENOTSRC 15
7734 #define BM_NOTMASKSRC 16
7735 #define BM_ONE 17
7736 #define BM_SRCTRANSPARENT 18
7737 #define BM_DESTTRANSPARENT 19
7738
7739 #define LINETYPE_ERROR (-1)
7740 #define LINETYPE_DEFAULT 0
7741 #define LINETYPE_DOT 1
7742 #define LINETYPE_SHORTDASH 2
7743 #define LINETYPE_DASHDOT 3
7744 #define LINETYPE_DOUBLEDOT 4
7745 #define LINETYPE_LONGDASH 5
7746 #define LINETYPE_DASHDOUBLEDOT 6
7747 #define LINETYPE_SOLID 7
7748 #define LINETYPE_INVISIBLE 8
7749 #define LINETYPE_ALTERNATE 9
7750
7751 #define LINEWIDTH_ERROR (-1)
7752 #define LINEWIDTH_DEFAULT 0L
7753 #define LINEWIDTH_NORMAL 0x00010000
7754 #define LINEWIDTH_THICK 0x00020000
7755
7756 #define LINEWIDTHGEOM_ERROR (-1)
7757
7758 #define LINEEND_ERROR (-1)
7759 #define LINEEND_DEFAULT 0
7760 #define LINEEND_FLAT 1
7761 #define LINEEND_SQUARE 2
7762 #define LINEEND_ROUND 3
7763
7764 #define LINEJOIN_ERROR (-1)
7765 #define LINEJOIN_DEFAULT 0
7766 #define LINEJOIN_BEVEL 1
7767 #define LINEJOIN_ROUND 2
7768 #define LINEJOIN_MITRE 3
7769
7770 #define CHDIRN_ERROR (-1)
7771 #define CHDIRN_DEFAULT 0
7772 #define CHDIRN_LEFTRIGHT 1
7773 #define CHDIRN_TOPBOTTOM 2
7774 #define CHDIRN_RIGHTLEFT 3
7775 #define CHDIRN_BOTTOMTOP 4
7776
7777 #define TA_NORMAL_HORIZ 0x0001
7778 #define TA_LEFT 0x0002
7779 #define TA_CENTER 0x0003
7780 #define TA_RIGHT 0x0004
7781 #define TA_STANDARD_HORIZ 0x0005
7782 #define TA_NORMAL_VERT 0x0100
7783 #define TA_TOP 0x0200
7784 #define TA_HALF 0x0300
7785 #define TA_BASE 0x0400
7786 #define TA_BOTTOM 0x0500
7787 #define TA_STANDARD_VERT 0x0600
7788
7789 #define CM_ERROR (-1)
7790 #define CM_DEFAULT 0
7791 #define CM_MODE1 1
7792 #define CM_MODE2 2
7793 #define CM_MODE3 3
7794
7795 #define MARKSYM_ERROR (-1)
7796 #define MARKSYM_DEFAULT 0
7797 #define MARKSYM_CROSS 1
7798 #define MARKSYM_PLUS 2
7799 #define MARKSYM_DIAMOND 3
7800 #define MARKSYM_SQUARE 4
7801 #define MARKSYM_SIXPOINTSTAR 5
7802 #define MARKSYM_EIGHTPOINTSTAR 6
7803 #define MARKSYM_SOLIDDIAMOND 7
7804 #define MARKSYM_SOLIDSQUARE 8
7805 #define MARKSYM_DOT 9
7806 #define MARKSYM_SMALLCIRCLE 10
7807 #define MARKSYM_BLANK 64
7808
7809 #define TXTBOX_TOPLEFT 0
7810 #define TXTBOX_BOTTOMLEFT 1
7811 #define TXTBOX_TOPRIGHT 2
7812 #define TXTBOX_BOTTOMRIGHT 3
7813 #define TXTBOX_CONCAT 4
7814 #define TXTBOX_COUNT 5
7815
7816 #define PVIS_ERROR 0
7817 #define PVIS_INVISIBLE 1
7818 #define PVIS_VISIBLE 2
7819
7820 #define RVIS_ERROR 0
7821 #define RVIS_INVISIBLE 1
7822 #define RVIS_PARTIAL 2
7823 #define RVIS_VISIBLE 3
7824
7825 #define FONT_DEFAULT 1
7826 #define FONT_MATCH 2
7827
7828 #define LCIDT_FONT 6
7829 #define LCIDT_BITMAP 7
7830
7831 #define LCID_ALL (-1)
7832
7833 #define CHS_OPAQUE 0x0001
7834 #define CHS_VECTOR 0x0002
7835 #define CHS_LEAVEPOS 0x0008
7836 #define CHS_CLIP 0x0010
7837 #define CHS_UNDERSCORE 0x0200
7838 #define CHS_STRIKEOUT 0x0400
7839
7840 #define FWEIGHT_DONT_CARE 0
7841 #define FWEIGHT_ULTRA_LIGHT 1
7842 #define FWEIGHT_EXTRA_LIGHT 2
7843 #define FWEIGHT_LIGHT 3
7844 #define FWEIGHT_SEMI_LIGHT 4
7845 #define FWEIGHT_NORMAL 5
7846 #define FWEIGHT_SEMI_BOLD 6
7847 #define FWEIGHT_BOLD 7
7848 #define FWEIGHT_EXTRA_BOLD 8
7849 #define FWEIGHT_ULTRA_BOLD 9
7850
7851 #define FWIDTH_DONT_CARE 0
7852 #define FWIDTH_ULTRA_CONDENSED 1
7853 #define FWIDTH_EXTRA_CONDENSED 2
7854 #define FWIDTH_CONDENSED 3
7855 #define FWIDTH_SEMI_CONDENSED 4
7856 #define FWIDTH_NORMAL 5
7857 #define FWIDTH_SEMI_EXPANDED 6
7858 #define FWIDTH_EXPANDED 7
7859 #define FWIDTH_EXTRA_EXPANDED 8
7860 #define FWIDTH_ULTRA_EXPANDED 9
7861
7862 #define FTYPE_ITALIC 0x0001
7863 #define FTYPE_ITALIC_DONT_CARE 0x0002
7864 #define FTYPE_OBLIQUE 0x0004
7865 #define FTYPE_OBLIQUE_DONT_CARE 0x0008
7866 #define FTYPE_ROUNDED 0x0010
7867 #define FTYPE_ROUNDED_DONT_CARE 0x0020
7868
7869 #define QFA_PUBLIC 1
7870 #define QFA_PRIVATE 2
7871 #define QFA_ERROR GPI_ALTERROR
7872
7873 #define QF_PUBLIC 0x0001
7874 #define QF_PRIVATE 0x0002
7875 #define QF_NO_GENERIC 0x0004
7876 #define QF_NO_DEVICE 0x0008
7877
7878 #define QCD_LCT_FORMAT 0
7879 #define QCD_LCT_LOINDEX 1
7880 #define QCD_LCT_HIINDEX 2
7881 #define QCD_LCT_OPTIONS 3
7882
7883 #define QLCT_ERROR (-1)
7884 #define QLCT_RGB (-2)
7885
7886 #define QLCT_NOTLOADED (-1)
7887
7888 #define PAL_ERROR (-1)
7889
7890 #define PC_RESERVED 0x01
7891 #define PC_EXPLICIT 0x02
7892 #define PC_NOCOLLAPSE 0x04
7893
7894 #define SCP_ALTERNATE 0
7895 #define SCP_WINDING 2
7896 #define SCP_AND 4
7897 #define SCP_RESET 0
7898 #define SCP_INCL 0
7899 #define SCP_EXCL 8
7900
7901 #define MPATH_STROKE 6
7902
7903 #define FPATH_ALTERNATE 0
7904 #define FPATH_WINDING 2
7905 #define FPATH_INCL 0
7906 #define FPATH_EXCL 8
7907
7908 #define CVTC_WORLD 1
7909 #define CVTC_MODEL 2
7910 #define CVTC_DEFAULTPAGE 3
7911 #define CVTC_PAGE 4
7912 #define CVTC_DEVICE 5
7913
7914 #define TRANSFORM_REPLACE 0
7915 #define TRANSFORM_ADD 1
7916 #define TRANSFORM_PREEMPT 2
7917
7918 #define SEGEM_ERROR 0
7919 #define SEGEM_INSERT 1
7920 #define SEGEM_REPLACE 2
7921
7922 #define POLYGON_NOBOUNDARY 0x0000
7923 #define POLYGON_BOUNDARY 0x0001
7924
7925 #define POLYGON_ALTERNATE 0x0000
7926 #define POLYGON_WINDING 0x0002
7927
7928 #define POLYGON_INCL 0x0000
7929 #define POLYGON_EXCL 0x0008
7930
7931 #define POLYGON_FILL 0x0000
7932 #define POLYGON_NOFILL 0x0010
7933
7934 #define LCOL_RESET 0x0001
7935 #define LCOL_REALIZABLE 0x0002
7936 #define LCOL_PURECOLOR 0x0004
7937 #define LCOL_OVERRIDE_DEFAULT_COLORS 0x0008
7938 #define LCOL_REALIZED 0x0010
7939
7940 #define LCOLF_DEFAULT 0
7941 #define LCOLF_INDRGB 1
7942 #define LCOLF_CONSECRGB 2
7943 #define LCOLF_RGB 3
7944 #define LCOLF_PALETTE 4
7945
7946 #define LCOLOPT_REALIZED 0x0001
7947 #define LCOLOPT_INDEX 0x0002
7948
7949 #define BA_NOBOUNDARY 0
7950 #define BA_BOUNDARY 0x0001
7951
7952 #define BA_ALTERNATE 0
7953 #define BA_WINDING 0x0002
7954
7955 #define BA_INCL 0
7956 #define BA_EXCL 8
7957
7958 #define DRO_FILL 1
7959 #define DRO_OUTLINE 2
7960 #define DRO_OUTLINEFILL 3
7961
7962 #define PATSYM_ERROR (-1)
7963 #define PATSYM_DEFAULT 0
7964 #define PATSYM_DENSE1 1
7965 #define PATSYM_DENSE2 2
7966 #define PATSYM_DENSE3 3
7967 #define PATSYM_DENSE4 4
7968 #define PATSYM_DENSE5 5
7969 #define PATSYM_DENSE6 6
7970 #define PATSYM_DENSE7 7
7971 #define PATSYM_DENSE8 8
7972 #define PATSYM_VERT 9
7973 #define PATSYM_HORIZ 10
7974 #define PATSYM_DIAG1 11
7975 #define PATSYM_DIAG2 12
7976 #define PATSYM_DIAG3 13
7977 #define PATSYM_DIAG4 14
7978 #define PATSYM_NOSHADE 15
7979 #define PATSYM_SOLID 16
7980 #define PATSYM_HALFTONE 17
7981 #define PATSYM_HATCH 18
7982 #define PATSYM_DIAGHATCH 19
7983 #define PATSYM_BLANK 64
7984
7985 #define LCID_ERROR (-1)
7986 #define LCID_DEFAULT 0
7987
7988 #define CRGN_OR 1
7989 #define CRGN_COPY 2
7990 #define CRGN_XOR 4
7991 #define CRGN_AND 6
7992 #define CRGN_DIFF 7
7993
7994 #define RGN_ERROR 0
7995 #define RGN_NULL 1
7996 #define RGN_RECT 2
7997 #define RGN_COMPLEX 3
7998
7999 #define PRGN_ERROR 0
8000 #define PRGN_OUTSIDE 1
8001 #define PRGN_INSIDE 2
8002
8003 #define RRGN_ERROR 0
8004 #define RRGN_OUTSIDE 1
8005 #define RRGN_PARTIAL 2
8006 #define RRGN_INSIDE 3
8007
8008 #define EQRGN_ERROR 0
8009 #define EQRGN_NOTEQUAL 1
8010 #define EQRGN_EQUAL 2
8011
8012 #define RECTDIR_LFRT_TOPBOT 1
8013 #define RECTDIR_RTLF_TOPBOT 2
8014 #define RECTDIR_LFRT_BOTTOP 3
8015 #define RECTDIR_RTLF_BOTTOP 4
8016
8017 #define PMF_SEGBASE 0
8018 #define PMF_LOADTYPE 1
8019 #define PMF_RESOLVE 2
8020 #define PMF_LCIDS 3
8021 #define PMF_RESET 4
8022 #define PMF_SUPPRESS 5
8023 #define PMF_COLORTABLES 6
8024 #define PMF_COLORREALIZABLE 7
8025 #define PMF_DEFAULTS 8
8026 #define PMF_DELETEOBJECTS 9
8027
8028 #define RS_DEFAULT 0
8029 #define RS_NODISCARD 1
8030 #define LC_DEFAULT 0
8031 #define LC_NOLOAD 1
8032 #define LC_LOADDISC 3
8033 #define LT_DEFAULT 0
8034 #define LT_NOMODIFY 1
8035 #define LT_ORIGINALVIEW 4
8036 #define RES_DEFAULT 0
8037 #define RES_NORESET 1
8038 #define RES_RESET 2
8039 #define SUP_DEFAULT 0
8040 #define SUP_NOSUPPRESS 1
8041 #define SUP_SUPPRESS 2
8042 #define CTAB_DEFAULT 0
8043 #define CTAB_NOMODIFY 1
8044 #define CTAB_REPLACE 3
8045 #define CTAB_REPLACEPALETTE 4
8046 #define CREA_DEFAULT 0
8047 #define CREA_REALIZE 1
8048 #define CREA_NOREALIZE 2
8049 #define CREA_DOREALIZE 3
8050
8051 #define DDEF_DEFAULT 0
8052 #define DDEF_IGNORE 1
8053 #define DDEF_LOADDISC 3
8054 #define DOBJ_DEFAULT 0
8055 #define DOBJ_NODELETE 1
8056 #define DOBJ_DELETE 2
8057 #define RSP_DEFAULT 0
8058 #define RSP_NODISCARD 1
8059
8060 #define LBB_COLOR 0x0001
8061 #define LBB_BACK_COLOR 0x0002
8062 #define LBB_MIX_MODE 0x0004
8063 #define LBB_BACK_MIX_MODE 0x0008
8064 #define LBB_WIDTH 0x0010
8065 #define LBB_GEOM_WIDTH 0x0020
8066 #define LBB_TYPE 0x0040
8067 #define LBB_END 0x0080
8068 #define LBB_JOIN 0x0100
8069
8070 #define CBB_COLOR 0x0001
8071 #define CBB_BACK_COLOR 0x0002
8072 #define CBB_MIX_MODE 0x0004
8073 #define CBB_BACK_MIX_MODE 0x0008
8074 #define CBB_SET 0x0010
8075 #define CBB_MODE 0x0020
8076 #define CBB_BOX 0x0040
8077 #define CBB_ANGLE 0x0080
8078 #define CBB_SHEAR 0x0100
8079 #define CBB_DIRECTION 0x0200
8080 #define CBB_TEXT_ALIGN 0x0400
8081 #define CBB_EXTRA 0x0800
8082 #define CBB_BREAK_EXTRA 0x1000
8083
8084 #define MBB_COLOR 0x0001
8085 #define MBB_BACK_COLOR 0x0002
8086 #define MBB_MIX_MODE 0x0004
8087 #define MBB_BACK_MIX_MODE 0x0008
8088 #define MBB_SET 0x0010
8089 #define MBB_SYMBOL 0x0020
8090 #define MBB_BOX 0x0040
8091
8092 #define ABB_COLOR 0x0001
8093 #define ABB_BACK_COLOR 0x0002
8094 #define ABB_MIX_MODE 0x0004
8095 #define ABB_BACK_MIX_MODE 0x0008
8096 #define ABB_SET 0x0010
8097 #define ABB_SYMBOL 0x0020
8098 #define ABB_REF_POINT 0x0040
8099
8100 #define IBB_COLOR 0x0001
8101 #define IBB_BACK_COLOR 0x0002
8102 #define IBB_MIX_MODE 0x0004
8103 #define IBB_BACK_MIX_MODE 0x0008
8104
8105
8106 typedef PVOID PBUNDLE;
8107
8108 typedef LONG FIXED;
8109 typedef FIXED *PFIXED;
8110
8111 typedef LHANDLE HMF;
8112 typedef HMF *PHMF;
8113
8114
8115 typedef struct _SIZEL
8116 {
8117 LONG cx;
8118 LONG cy;
8119 } SIZEL;
8120 typedef SIZEL *PSIZEL;
8121
8122 typedef struct _RGNRECT
8123 {
8124 ULONG ircStart;
8125 ULONG crc;
8126 ULONG crcReturned;
8127 ULONG ulDirection;
8128 } RGNRECT;
8129 typedef RGNRECT *PRGNRECT;
8130
8131 typedef struct _MATRIXLF
8132 {
8133 FIXED fxM11;
8134 FIXED fxM12;
8135 LONG lM13;
8136 FIXED fxM21;
8137 FIXED fxM22;
8138 LONG lM23;
8139 LONG lM31;
8140 LONG lM32;
8141 LONG lM33;
8142 } MATRIXLF;
8143 typedef MATRIXLF *PMATRIXLF;
8144
8145 typedef struct _ARCPARAMS
8146 {
8147 LONG lP;
8148 LONG lQ;
8149 LONG lR;
8150 LONG lS;
8151 } ARCPARAMS;
8152 typedef ARCPARAMS *PARCPARAMS;
8153
8154 typedef struct _SIZEF
8155 {
8156 FIXED cx;
8157 FIXED cy;
8158 } SIZEF;
8159 typedef SIZEF *PSIZEF;
8160
8161 typedef struct _POLYGON
8162 {
8163 ULONG ulPoints;
8164 PPOINTL aPointl;
8165 } POLYGON;
8166 typedef POLYGON *PPOLYGON;
8167
8168 typedef struct _POLYSET
8169 {
8170 ULONG ulPolys;
8171 POLYGON aPolygon[1];
8172 } POLYSET;
8173 typedef POLYSET *PPOLYSET;
8174
8175 typedef struct _GRADIENTL
8176 {
8177 LONG x;
8178 LONG y;
8179 } GRADIENTL;
8180 typedef GRADIENTL *PGRADIENTL;
8181
8182 typedef struct _KERNINGPAIRS
8183 {
8184 SHORT sFirstChar;
8185 SHORT sSecondChar;
8186 LONG lKerningAmount;
8187 } KERNINGPAIRS;
8188 typedef KERNINGPAIRS *PKERNINGPAIRS;
8189
8190 typedef struct _FACENAMEDESC
8191 {
8192 USHORT usSize;
8193 USHORT usWeightClass;
8194 USHORT usWidthClass;
8195 USHORT usReserved;
8196 ULONG flOptions;
8197 } FACENAMEDESC;
8198 typedef FACENAMEDESC *PFACENAMEDESC;
8199
8200 typedef CHAR FFDESCS[2][FACESIZE];
8201 typedef FFDESCS *PFFDESCS;
8202
8203 typedef struct _FFDESCS2
8204 {
8205 ULONG cbLength;
8206 ULONG cbFacenameOffset;
8207 BYTE abFamilyName[1];
8208 } FFDESCS2;
8209 typedef FFDESCS2 *PFFDESCS2;
8210
8211
8212 typedef struct _LINEBUNDLE
8213 {
8214 LONG lColor;
8215 LONG lBackColor;
8216 USHORT usMixMode;
8217 USHORT usBackMixMode;
8218 FIXED fxWidth;
8219 LONG lGeomWidth;
8220 USHORT usType;
8221 USHORT usEnd;
8222 USHORT usJoin;
8223 USHORT usReserved;
8224 } LINEBUNDLE;
8225 typedef LINEBUNDLE *PLINEBUNDLE;
8226
8227 typedef struct _CHARBUNDLE
8228 {
8229 LONG lColor;
8230 LONG lBackColor;
8231 USHORT usMixMode;
8232 USHORT usBackMixMode;
8233 USHORT usSet;
8234 USHORT usPrecision;
8235 SIZEF sizfxCell;
8236 POINTL ptlAngle;
8237 POINTL ptlShear;
8238 USHORT usDirection;
8239 USHORT usTextAlign;
8240 FIXED fxExtra;
8241 FIXED fxBreakExtra;
8242 } CHARBUNDLE;
8243 typedef CHARBUNDLE *PCHARBUNDLE;
8244
8245 typedef struct _MARKERBUNDLE
8246 {
8247 LONG lColor;
8248 LONG lBackColor;
8249 USHORT usMixMode;
8250 USHORT usBackMixMode;
8251 USHORT usSet;
8252 USHORT usSymbol;
8253 SIZEF sizfxCell;
8254 } MARKERBUNDLE;
8255 typedef MARKERBUNDLE *PMARKERBUNDLE;
8256
8257 typedef struct _AREABUNDLE
8258 {
8259 LONG lColor;
8260 LONG lBackColor;
8261 USHORT usMixMode;
8262 USHORT usBackMixMode;
8263 USHORT usSet;
8264 USHORT usSymbol;
8265 POINTL ptlRefPoint;
8266 } AREABUNDLE;
8267 typedef AREABUNDLE *PAREABUNDLE;
8268
8269 typedef struct _IMAGEBUNDLE
8270 {
8271 LONG lColor;
8272 LONG lBackColor;
8273 USHORT usMixMode;
8274 USHORT usBackMixMode;
8275 } IMAGEBUNDLE;
8276 typedef IMAGEBUNDLE *PIMAGEBUNDLE;
8277
8278
8279 #define MAKEFIXED(i,f) MAKELONG(f,i)
8280 #define FIXEDFRAC(fx) (LOUSHORT(fx))
8281 #define FIXEDINT(fx) ((SHORT)HIUSHORT(fx))
8282
8283
8284 LONG GpiAnimatePalette (HPAL hpal, ULONG ulFormat, ULONG ulStart,
8285 ULONG ulCount, __const__ ULONG *aulTable);
8286 BOOL GpiBeginArea (HPS hps, ULONG flOptions);
8287 BOOL GpiBeginElement (HPS hps, LONG lType, PCSZ pszDesc);
8288 BOOL GpiBeginPath (HPS hps, LONG lPath);
8289 LONG GpiBox (HPS hps, LONG lControl, __const__ POINTL *pptlPoint, LONG lHRound,
8290 LONG lVRound);
8291 LONG GpiCallSegmentMatrix (HPS hps, LONG lSegment, LONG lCount,
8292 __const__ MATRIXLF *pmatlfArray, LONG lOptions);
8293 LONG GpiCharString (HPS hps, LONG lCount, PCCH pchString);
8294 LONG GpiCharStringAt (HPS hps, __const__ POINTL *pptlPoint, LONG lCount,
8295 PCCH pchString);
8296 LONG GpiCharStringPos (HPS hps, __const__ RECTL *prclRect, ULONG flOptions,
8297 LONG lCount, PCCH pchString, __const__ LONG *alAdx);
8298 LONG GpiCharStringPosAt (HPS hps, __const__ POINTL *pptlStart,
8299 __const__ RECTL *prclRect, ULONG flOptions, LONG lCount, PCCH pchString,
8300 __const__ LONG *alAdx);
8301 BOOL GpiCloseFigure (HPS hps);
8302 LONG GpiCombineRegion (HPS hps, HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2,
8303 LONG lMode);
8304 BOOL GpiComment (HPS hps, LONG lLength, __const__ BYTE *pbData);
8305 BOOL GpiConvert (HPS hps, LONG lSrc, LONG lTarg, LONG lCount,
8306 PPOINTL aptlPoints);
8307 BOOL GpiConvertWithMatrix (HPS hps, LONG lCountp, PPOINTL aptlPoints,
8308 LONG lCount, __const__ MATRIXLF *pmatlfArray);
8309 HMF GpiCopyMetaFile (HMF hmf);
8310 BOOL GpiCreateLogColorTable (HPS hps, ULONG flOptions, LONG lFormat,
8311 LONG lStart, LONG lCount, __const__ LONG *alTable);
8312 LONG GpiCreateLogFont (HPS hps, __const__ STR8 *pName, LONG lLcid,
8313 __const__ FATTRS *pfatAttrs);
8314 HPAL GpiCreatePalette (HAB hab, ULONG flOptions, ULONG ulFormat,
8315 ULONG ulCount, __const__ ULONG *aulTable);
8316 HRGN GpiCreateRegion (HPS hps, LONG lCount, __const__ RECTL *arclRectangles);
8317 BOOL GpiDeleteElement (HPS hps);
8318 BOOL GpiDeleteElementRange (HPS hps, LONG lFirstElement, LONG lLastElement);
8319 BOOL GpiDeleteElementsBetweenLabels (HPS hps, LONG lFirstLabel,
8320 LONG lLastLabel);
8321 BOOL GpiDeleteMetaFile (HMF hmf);
8322 BOOL GpiDeletePalette (HPAL hpal);
8323 BOOL GpiDeleteSetId (HPS hps, LONG lLcid);
8324 BOOL GpiDestroyRegion (HPS hps, HRGN hrgn);
8325 LONG GpiElement (HPS hps, LONG lType, PCSZ pszDesc, LONG lLength,
8326 __const__ BYTE *pbData);
8327 LONG GpiEndArea (HPS hps);
8328 BOOL GpiEndElement (HPS hps);
8329 BOOL GpiEndPath (HPS hps);
8330 LONG GpiEqualRegion (HPS hps, HRGN hrgnSrc1, HRGN hrgnSrc2);
8331 LONG GpiExcludeClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
8332 LONG GpiFillPath (HPS hps, LONG lPath, LONG lOptions);
8333 LONG GpiFrameRegion (HPS hps, HRGN hrgn, __const__ SIZEL *thickness);
8334 LONG GpiFullArc (HPS hps, LONG lControl, FIXED fxMultiplier);
8335 LONG GpiImage (HPS hps, LONG lFormat, __const__ SIZEL *psizlImageSize,
8336 LONG lLength, __const__ BYTE *pbData);
8337 LONG GpiIntersectClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
8338 BOOL GpiLabel (HPS hps, LONG lLabel);
8339 LONG GpiLine (HPS hps, __const__ POINTL *pptlEndPoint);
8340 BOOL GpiLoadFonts (HAB hab, PCSZ pszFilename);
8341 HMF GpiLoadMetaFile (HAB hab, PCSZ pszFilename);
8342 BOOL GpiLoadPublicFonts (HAB hab, PCSZ pszFileName);
8343 LONG GpiMarker (HPS hps, __const__ POINTL *pptlPoint);
8344 BOOL GpiModifyPath (HPS hps, LONG lPath, LONG lMode);
8345 BOOL GpiMove (HPS hps, __const__ POINTL *pptlPoint);
8346 LONG GpiOffsetClipRegion (HPS hps, __const__ POINTL *pptlPoint);
8347 BOOL GpiOffsetElementPointer (HPS hps, LONG loffset);
8348 BOOL GpiOffsetRegion (HPS hps, HRGN Hrgn, __const__ POINTL *pptlOffset);
8349 LONG GpiOutlinePath (HPS hps, LONG lPath, LONG lOptions);
8350 LONG GpiPaintRegion (HPS hps, HRGN hrgn);
8351 LONG GpiPartialArc (HPS hps, __const__ POINTL *pptlCenter, FIXED fxMultiplier,
8352 FIXED fxStartAngle, FIXED fxSweepAngle);
8353 HRGN GpiPathToRegion (HPS GpiH, LONG lPath, LONG lOptions);
8354 LONG GpiPlayMetaFile (HPS hps, HMF hmf, LONG lCount1,
8355 __const__ LONG *alOptarray, PLONG plSegCount, LONG lCount2, PSZ pszDesc);
8356 LONG GpiPointArc (HPS hps, __const__ POINTL *pptl2);
8357 LONG GpiPolyFillet (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
8358 LONG GpiPolyFilletSharp (HPS hps, LONG lCount, __const__ POINTL *aptlPoints,
8359 __const__ FIXED *afxPoints);
8360 LONG GpiPolygons (HPS hps, ULONG ulCount, __const__ POLYGON *paplgn,
8361 ULONG flOptions, ULONG flModel);
8362 LONG GpiPolyLine (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
8363 LONG GpiPolyLineDisjoint (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
8364 LONG GpiPolyMarker (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
8365 LONG GpiPolySpline (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
8366 BOOL GpiPop (HPS hps, LONG lCount);
8367 LONG GpiPtInRegion (HPS hps, HRGN hrgn, __const__ POINTL *pptlPoint);
8368 LONG GpiPtVisible (HPS hps, __const__ POINTL *pptlPoint);
8369 BOOL GpiQueryArcParams (HPS hps, PARCPARAMS parcpArcParams);
8370 LONG GpiQueryAttrMode (HPS hps);
8371 LONG GpiQueryAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
8372 PBUNDLE ppbunAttrs);
8373 LONG GpiQueryBackColor (HPS hps);
8374 LONG GpiQueryBackMix (HPS hps);
8375 BOOL GpiQueryCharAngle (HPS hps, PGRADIENTL pgradlAngle);
8376 BOOL GpiQueryCharBox (HPS hps, PSIZEF psizfxSize);
8377 BOOL GpiQueryCharBreakExtra (HPS hps, PFIXED BreakExtra);
8378 LONG GpiQueryCharDirection (HPS hps);
8379 BOOL GpiQueryCharExtra (HPS hps, PFIXED Extra);
8380 LONG GpiQueryCharMode (HPS hps);
8381 LONG GpiQueryCharSet (HPS hps);
8382 BOOL GpiQueryCharShear (HPS hps, PPOINTL pptlShear);
8383 BOOL GpiQueryCharStringPos (HPS hps, ULONG flOptions, LONG lCount,
8384 PCCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
8385 BOOL GpiQueryCharStringPosAt (HPS hps, PPOINTL pptlStart, ULONG flOptions,
8386 LONG lCount, PCCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
8387 LONG GpiQueryClipBox (HPS hps, PRECTL prclBound);
8388 HRGN GpiQueryClipRegion (HPS hps);
8389 LONG GpiQueryColor (HPS hps);
8390 BOOL GpiQueryColorData (HPS hps, LONG lCount, PLONG alArray);
8391 LONG GpiQueryColorIndex (HPS hps, ULONG flOptions, LONG lRgbColor);
8392 ULONG GpiQueryCp (HPS hps);
8393 BOOL GpiQueryCurrentPosition (HPS hps, PPOINTL pptlPoint);
8394 BOOL GpiQueryDefArcParams (HPS hps, PARCPARAMS parcpArcParams);
8395 BOOL GpiQueryDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
8396 PBUNDLE ppbunAttrs);
8397 BOOL GpiQueryDefCharBox (HPS hps, PSIZEL psizlSize);
8398 BOOL GpiQueryDefTag (HPS hps, PLONG plTag);
8399 BOOL GpiQueryDefViewingLimits (HPS hps, PRECTL prclLimits);
8400 BOOL GpiQueryDefaultViewMatrix (HPS hps, LONG lCount, PMATRIXLF pmatlfArray);
8401 LONG GpiQueryEditMode (HPS hps);
8402 LONG GpiQueryElement (HPS hps, LONG lOff, LONG lMaxLength, PBYTE pbData);
8403 LONG GpiQueryElementPointer (HPS hps);
8404 LONG GpiQueryElementType (HPS hps, PLONG plType, LONG lLength, PSZ pszData);
8405 ULONG GpiQueryFaceString (HPS PS, PCSZ FamilyName, PFACENAMEDESC attrs,
8406 LONG length, PSZ CompoundFaceName);
8407 ULONG GpiQueryFontAction (HAB anchor, ULONG options);
8408 LONG GpiQueryFontFileDescriptions (HAB hab, PCSZ pszFilename, PLONG plCount,
8409 PFFDESCS affdescsNames);
8410 BOOL GpiQueryFontMetrics (HPS hps, LONG lMetricsLength,
8411 PFONTMETRICS pfmMetrics);
8412 LONG GpiQueryFonts (HPS hps, ULONG flOptions, PCSZ pszFacename,
8413 PLONG plReqFonts, LONG lMetricsLength, PFONTMETRICS afmMetrics);
8414 LONG GpiQueryFullFontFileDescs (HAB hab, PCSZ pszFilename, PLONG plCount,
8415 PVOID pNames, PLONG plNamesBuffLength);
8416 BOOL GpiQueryGraphicsField (HPS hps, PRECTL prclField);
8417 LONG GpiQueryKerningPairs (HPS hps, LONG lCount, PKERNINGPAIRS akrnprData);
8418 LONG GpiQueryLineEnd (HPS hps);
8419 LONG GpiQueryLineJoin (HPS hps);
8420 LONG GpiQueryLineType (HPS hps);
8421 FIXED GpiQueryLineWidth (HPS hps);
8422 LONG GpiQueryLineWidthGeom (HPS hps);
8423 LONG GpiQueryLogColorTable (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
8424 PLONG alArray);
8425 BOOL GpiQueryLogicalFont (HPS PS, LONG lcid, PSTR8 name, PFATTRS attrs,
8426 LONG length);
8427 LONG GpiQueryMarker (HPS hps);
8428 BOOL GpiQueryMarkerBox (HPS hps, PSIZEF psizfxSize);
8429 LONG GpiQueryMarkerSet (HPS hps);
8430 BOOL GpiQueryMetaFileBits (HMF hmf, LONG lOffset, LONG lLength, PBYTE pbData);
8431 LONG GpiQueryMetaFileLength (HMF hmf);
8432 LONG GpiQueryMix (HPS hps);
8433 BOOL GpiQueryModelTransformMatrix (HPS hps, LONG lCount,
8434 PMATRIXLF pmatlfArray);
8435 LONG GpiQueryNearestColor (HPS hps, ULONG flOptions, LONG lRgbIn);
8436 LONG GpiQueryNumberSetIds (HPS hps);
8437 BOOL GpiQueryPageViewport (HPS hps, PRECTL prclViewport);
8438 HPAL GpiQueryPalette (HPS hps);
8439 LONG GpiQueryPaletteInfo (HPAL hpal, HPS hps, ULONG flOptions,
8440 ULONG ulStart, ULONG ulCount, PULONG aulArray);
8441 LONG GpiQueryPattern (HPS hps);
8442 BOOL GpiQueryPatternRefPoint (HPS hps, PPOINTL pptlRefPoint);
8443 LONG GpiQueryPatternSet (HPS hps);
8444 LONG GpiQueryRealColors (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
8445 PLONG alColors);
8446 LONG GpiQueryRegionBox (HPS hps, HRGN hrgn, PRECTL prclBound);
8447 BOOL GpiQueryRegionRects (HPS hps, HRGN hrgn, PRECTL prclBound,
8448 PRGNRECT prgnrcControl, PRECTL prclRect);
8449 LONG GpiQueryRGBColor (HPS hps, ULONG flOptions, LONG lColorIndex);
8450 BOOL GpiQuerySegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
8451 PMATRIXLF pmatlfArray);
8452 BOOL GpiQuerySetIds (HPS hps, LONG lCount, PLONG alTypes, PSTR8 aNames,
8453 PLONG allcids);
8454 BOOL GpiQueryTextAlignment (HPS hps, PLONG plHoriz, PLONG plVert);
8455 BOOL GpiQueryTextBox (HPS hps, LONG lCount1, PCH pchString, LONG lCount2,
8456 PPOINTL aptlPoints);
8457 BOOL GpiQueryViewingLimits (HPS hps, PRECTL prclLimits);
8458 BOOL GpiQueryViewingTransformMatrix (HPS hps, LONG lCount,
8459 PMATRIXLF pmatlfArray);
8460 BOOL GpiQueryWidthTable (HPS hps, LONG lFirstChar, LONG lCount, PLONG alData);
8461 LONG GpiRectInRegion (HPS hps, HRGN hrgn, __const__ RECTL *prclRect);
8462 LONG GpiRectVisible (HPS hps, __const__ RECTL *prclRectangle);
8463 BOOL GpiRotate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions, FIXED fxAngle,
8464 __const__ POINTL *pptlCenter);
8465 BOOL GpiSaveMetaFile (HMF hmf, PCSZ pszFilename);
8466 BOOL GpiScale (HPS hps, PMATRIXLF pmfatlfArray, LONG lOptions,
8467 __const__ FIXED *afxScale, __const__ POINTL *pptlCenter);
8468 HPAL GpiSelectPalette (HPS hps, HPAL hpal);
8469 BOOL GpiSetArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
8470 BOOL GpiSetAttrMode (HPS hps, LONG lMode);
8471 BOOL GpiSetAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, ULONG flDefMask,
8472 __const__ VOID *ppbunAttrs);
8473 BOOL GpiSetBackColor (HPS hps, LONG lColor);
8474 BOOL GpiSetBackMix (HPS hps, LONG lMixMode);
8475 BOOL GpiSetCharAngle (HPS hps, __const__ GRADIENTL *pgradlAngle);
8476 BOOL GpiSetCharBox (HPS hps, __const__ SIZEF *psizfxBox);
8477 BOOL GpiSetCharBreakExtra (HPS hps, FIXED BreakExtra);
8478 BOOL GpiSetCharDirection (HPS hps, LONG lDirection);
8479 BOOL GpiSetCharExtra (HPS hps, FIXED Extra);
8480 BOOL GpiSetCharMode (HPS hps, LONG lMode);
8481 BOOL GpiSetCharSet (HPS hps, LONG llcid);
8482 BOOL GpiSetCharShear (HPS hps, __const__ POINTL *pptlAngle);
8483 BOOL GpiSetClipPath (HPS hps, LONG lPath, LONG lOptions);
8484 LONG GpiSetClipRegion (HPS hps, HRGN hrgn, PHRGN phrgnOld);
8485 BOOL GpiSetColor (HPS hps, LONG lColor);
8486 BOOL GpiSetCp (HPS hps, ULONG ulCodePage);
8487 BOOL GpiSetCurrentPosition (HPS hps, __const__ POINTL *pptlPoint);
8488 BOOL GpiSetDefArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
8489 BOOL GpiSetDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
8490 __const__ VOID *ppbunAttrs);
8491 BOOL GpiSetDefaultViewMatrix (HPS hps, LONG lCount,
8492 __const__ MATRIXLF *pmatlfarray, LONG lOptions);
8493 BOOL GpiSetDefTag (HPS hps, LONG lTag);
8494 BOOL GpiSetDefViewingLimits (HPS hps, __const__ RECTL *prclLimits);
8495 BOOL GpiSetEditMode (HPS hps, LONG lMode);
8496 BOOL GpiSetElementPointer (HPS hps, LONG lElement);
8497 BOOL GpiSetElementPointerAtLabel (HPS hps, LONG lLabel);
8498 BOOL GpiSetGraphicsField (HPS hps, __const__ RECTL *prclField);
8499 BOOL GpiSetLineEnd (HPS hps, LONG lLineEnd);
8500 BOOL GpiSetLineJoin (HPS hps, LONG lLineJoin);
8501 BOOL GpiSetLineType (HPS hps, LONG lLineType);
8502 BOOL GpiSetLineWidth (HPS hps, FIXED fxLineWidth);
8503 BOOL GpiSetLineWidthGeom (HPS hps, LONG lLineWidth);
8504 BOOL GpiSetMarker (HPS hps, LONG lSymbol);
8505 BOOL GpiSetMarkerBox (HPS hps, __const__ SIZEF *psizfxSize);
8506 BOOL GpiSetMarkerSet (HPS hps, LONG lSet);
8507 BOOL GpiSetMetaFileBits (HMF hmf, LONG lOffset, LONG lLength,
8508 __const__ BYTE *pbBuffer);
8509 BOOL GpiSetMix (HPS hps, LONG lMixMode);
8510 BOOL GpiSetModelTransformMatrix (HPS hps, LONG lCount,
8511 __const__ MATRIXLF *pmatlfArray, LONG lOptions);
8512 BOOL GpiSetPageViewport (HPS hps, __const__ RECTL *prclViewport);
8513 BOOL GpiSetPaletteEntries (HPAL hpal, ULONG ulFormat, ULONG ulStart,
8514 ULONG ulCount, __const__ ULONG *aulTable);
8515 BOOL GpiSetPattern (HPS hps, LONG lPatternSymbol);
8516 BOOL GpiSetPatternRefPoint (HPS hps, __const__ POINTL *pptlRefPoint);
8517 BOOL GpiSetPatternSet (HPS hps, LONG lSet);
8518 BOOL GpiSetRegion (HPS hps, HRGN hrgn, LONG lcount,
8519 __const__ RECTL *arclRectangles);
8520 BOOL GpiSetSegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
8521 __const__ MATRIXLF *pmatlfarray, LONG lOptions);
8522 BOOL GpiSetTextAlignment (HPS hps, LONG lHoriz, LONG lVert);
8523 BOOL GpiSetViewingLimits (HPS hps, __const__ RECTL *prclLimits);
8524 BOOL GpiSetViewingTransformMatrix (HPS hps, LONG lCount,
8525 __const__ MATRIXLF *pmatlfArray, LONG lOptions);
8526 LONG GpiStrokePath (HPS hps, LONG lPath, ULONG flOptions);
8527 BOOL GpiTranslate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions,
8528 __const__ POINTL *pptlTranslation);
8529 BOOL GpiUnloadFonts (HAB hab, PCSZ pszFilename);
8530 BOOL GpiUnloadPublicFonts (HAB hab, PCSZ pszFilename);
8531
8532
8533 #if defined (INCL_GPIBITMAPS) || !defined (INCL_NOCOMMON)
8534
8535 #define ROP_SRCCOPY 0x00cc
8536 #define ROP_SRCPAINT 0x00ee
8537 #define ROP_SRCAND 0x0088
8538 #define ROP_SRCINVERT 0x0066
8539 #define ROP_SRCERASE 0x0044
8540 #define ROP_NOTSRCCOPY 0x0033
8541 #define ROP_NOTSRCERASE 0x0011
8542 #define ROP_MERGECOPY 0x00c0
8543 #define ROP_MERGEPAINT 0x00bb
8544 #define ROP_PATCOPY 0x00f0
8545 #define ROP_PATPAINT 0x00fb
8546 #define ROP_PATINVERT 0x005a
8547 #define ROP_DSTINVERT 0x0055
8548 #define ROP_ZERO 0x0000
8549 #define ROP_ONE 0x00ff
8550
8551 #define BBO_OR 0
8552 #define BBO_AND 1
8553 #define BBO_IGNORE 2
8554 #define BBO_PAL_COLORS 4
8555 #define BBO_NO_COLOR_INFO 8
8556
8557 #define FF_BOUNDARY 0
8558 #define FF_SURFACE 1
8559
8560 #define HBM_ERROR ((HBITMAP)(-1))
8561
8562
8563 LONG GpiBitBlt (HPS hpsTarget, HPS hpsSource, LONG lCount,
8564 __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
8565 BOOL GpiDeleteBitmap (HBITMAP hbm);
8566 HBITMAP GpiLoadBitmap (HPS hps, HMODULE Resource, ULONG idBitmap,
8567 LONG lWidth, LONG lHeight);
8568 HBITMAP GpiSetBitmap (HPS hps, HBITMAP hbm);
8569 LONG GpiWCBitBlt (HPS hpsTarget, HBITMAP hbmSource, LONG lCount,
8570 __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
8571
8572 #endif /* INCL_GPIBITMAPS */
8573
8574
8575 #if defined (INCL_GPIBITMAPS)
8576
8577 #define BFT_ICON 0x4349
8578 #define BFT_BMAP 0x4d42
8579 #define BFT_POINTER 0x5450
8580 #define BFT_COLORICON 0x4943
8581 #define BFT_COLORPOINTER 0x5043
8582 #define BFT_BITMAPARRAY 0x4142
8583
8584 #define CBD_BITS 0
8585 #define CBD_COMPRESSION 1
8586 #define CBD_DECOMPRESSION 2
8587
8588 #define CBD_COLOR_CONVERSION 0x0001
8589
8590 #define CBM_INIT 0x0004
8591
8592 #define BCA_UNCOMP 0
8593 #define BCA_RLE8 1
8594 #define BCA_RLE4 2
8595 #define BCA_HUFFMAN1D 3
8596 #define BCA_RLE24 4
8597
8598 #define BMB_ERROR (-1)
8599
8600 #define BRU_METRIC 0
8601
8602 #define BRA_BOTTOMUP 0
8603
8604 #define BRH_NOTHALFTONED 0
8605 #define BRH_ERRORDIFFUSION 1
8606 #define BRH_PANDA 2
8607 #define BRH_SUPERCIRCLE 3
8608
8609 #define BCE_PALETTE (-1)
8610 #define BCE_RGB 0
8611
8612
8613 typedef struct _RGB
8614 {
8615 BYTE bBlue;
8616 BYTE bGreen;
8617 BYTE bRed;
8618 } RGB;
8619
8620 typedef struct _RGB2
8621 {
8622 BYTE bBlue;
8623 BYTE bGreen;
8624 BYTE bRed;
8625 BYTE fcOptions;
8626 } RGB2;
8627 typedef RGB2 *PRGB2;
8628
8629 typedef struct _BITMAPINFOHEADER
8630 {
8631 ULONG cbFix;
8632 USHORT cx;
8633 USHORT cy;
8634 USHORT cPlanes;
8635 USHORT cBitCount;
8636 } BITMAPINFOHEADER;
8637 typedef BITMAPINFOHEADER *PBITMAPINFOHEADER;
8638
8639 typedef struct _BITMAPINFO
8640 {
8641 ULONG cbFix;
8642 USHORT cx;
8643 USHORT cy;
8644 USHORT cPlanes;
8645 USHORT cBitCount;
8646 RGB argbColor[1];
8647 } BITMAPINFO;
8648 typedef BITMAPINFO *PBITMAPINFO;
8649
8650 typedef struct _BITMAPINFO2
8651 {
8652 ULONG cbFix;
8653 ULONG cx;
8654 ULONG cy;
8655 USHORT cPlanes;
8656 USHORT cBitCount;
8657 ULONG ulCompression;
8658 ULONG cbImage;
8659 ULONG cxResolution;
8660 ULONG cyResolution;
8661 ULONG cclrUsed;
8662 ULONG cclrImportant;
8663 USHORT usUnits;
8664 USHORT usReserved;
8665 USHORT usRecording;
8666 USHORT usRendering;
8667 ULONG cSize1;
8668 ULONG cSize2;
8669 ULONG ulColorEncoding;
8670 ULONG ulIdentifier;
8671 RGB2 argbColor[1];
8672 } BITMAPINFO2;
8673 typedef BITMAPINFO2 *PBITMAPINFO2;
8674
8675 typedef struct _BITMAPINFOHEADER2
8676 {
8677 ULONG cbFix;
8678 ULONG cx;
8679 ULONG cy;
8680 USHORT cPlanes;
8681 USHORT cBitCount;
8682 ULONG ulCompression;
8683 ULONG cbImage;
8684 ULONG cxResolution;
8685 ULONG cyResolution;
8686 ULONG cclrUsed;
8687 ULONG cclrImportant;
8688 USHORT usUnits;
8689 USHORT usReserved;
8690 USHORT usRecording;
8691 USHORT usRendering;
8692 ULONG cSize1;
8693 ULONG cSize2;
8694 ULONG ulColorEncoding;
8695 ULONG ulIdentifier;
8696 } BITMAPINFOHEADER2;
8697 typedef BITMAPINFOHEADER2 *PBITMAPINFOHEADER2;
8698
8699 typedef struct _BITMAPFILEHEADER
8700 {
8701 USHORT usType;
8702 ULONG cbSize;
8703 SHORT xHotspot;
8704 SHORT yHotspot;
8705 ULONG offBits;
8706 BITMAPINFOHEADER bmp;
8707 } BITMAPFILEHEADER;
8708 typedef BITMAPFILEHEADER *PBITMAPFILEHEADER;
8709
8710 typedef struct _BITMAPARRAYFILEHEADER
8711 {
8712 USHORT usType;
8713 ULONG cbSize;
8714 ULONG offNext;
8715 USHORT cxDisplay;
8716 USHORT cyDisplay;
8717 BITMAPFILEHEADER bfh;
8718 } BITMAPARRAYFILEHEADER;
8719 typedef BITMAPARRAYFILEHEADER *PBITMAPARRAYFILEHEADER;
8720
8721 typedef struct _BITMAPFILEHEADER2
8722 {
8723 USHORT usType;
8724 ULONG cbSize;
8725 SHORT xHotspot;
8726 SHORT yHotspot;
8727 ULONG offBits;
8728 BITMAPINFOHEADER2 bmp2;
8729 } BITMAPFILEHEADER2;
8730 typedef BITMAPFILEHEADER2 *PBITMAPFILEHEADER2;
8731
8732 typedef struct _BITMAPARRAYFILEHEADER2
8733 {
8734 USHORT usType;
8735 ULONG cbSize;
8736 ULONG offNext;
8737 USHORT cxDisplay;
8738 USHORT cyDisplay;
8739 BITMAPFILEHEADER2 bfh2;
8740 } BITMAPARRAYFILEHEADER2;
8741 typedef BITMAPARRAYFILEHEADER2 *PBITMAPARRAYFILEHEADER2;
8742
8743
8744 HBITMAP GpiCreateBitmap (HPS hps, __const__ BITMAPINFOHEADER2 *pbmpNew,
8745 ULONG flOptions, __const__ BYTE *pbInitData,
8746 __const__ BITMAPINFO2 *pbmiInfoTable);
8747 LONG GpiDrawBits (HPS hps, __const__ VOID *pBits,
8748 __const__ BITMAPINFO2 *pbmiInfoTable, LONG lCount,
8749 __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
8750 LONG GpiFloodFill (HPS hps, LONG lOptions, LONG lColor);
8751 LONG GpiQueryBitmapBits (HPS hps, LONG lScanStart, LONG lScans, PBYTE pbBuffer,
8752 PBITMAPINFO2 pbmiInfoTable);
8753 BOOL GpiQueryBitmapDimension (HBITMAP hbm, PSIZEL psizlBitmapDimension);
8754 HBITMAP GpiQueryBitmapHandle (HPS hps, LONG lLcid);
8755 BOOL GpiQueryBitmapInfoHeader (HBITMAP hbm, PBITMAPINFOHEADER2 pbmpData);
8756 BOOL GpiQueryBitmapParameters (HBITMAP hbm, PBITMAPINFOHEADER pbmpData);
8757 BOOL GpiQueryDeviceBitmapFormats (HPS hps, LONG lCount, PLONG alArray);
8758 LONG GpiSetBitmapBits (HPS hps, LONG lScanStart, LONG lScans,
8759 __const__ BYTE *pbBuffer, __const__ BITMAPINFO2 *pbmiInfoTable);
8760 LONG GpiQueryPel (HPS hps, PPOINTL pptlPoint);
8761 BOOL GpiSetBitmapDimension (HBITMAP hbm,
8762 __const__ SIZEL *psizlBitmapDimension);
8763 BOOL GpiSetBitmapId (HPS hps, HBITMAP hbm, LONG lLcid);
8764 LONG GpiSetPel (HPS hps, __const__ POINTL *pptlPoint);
8765
8766
8767 #endif /* INCL_GPIBITMAPS */
8768
8769
8770 #if defined (INCL_GPICONTROL) || !defined (INCL_NOCOMMON)
8771
8772 #define GPIA_NOASSOC 0x0000
8773 #define GPIA_ASSOC 0x4000
8774
8775 #define GPIF_DEFAULT 0x0000
8776 #define GPIF_SHORT 0x0100
8777 #define GPIF_LONG 0x0200
8778
8779 #define GPIM_AREAEXCL 0x8000
8780
8781 #define GPIT_NORMAL 0x0000
8782 #define GPIT_MICRO 0x1000
8783 #define GPIT_INK 0x2000
8784
8785 #define HDC_ERROR ((HDC)(-1))
8786
8787 #define PU_ARBITRARY 0x0004
8788 #define PU_PELS 0x0008
8789 #define PU_LOMETRIC 0x000c
8790 #define PU_HIMETRIC 0x0010
8791 #define PU_LOENGLISH 0x0014
8792 #define PU_HIENGLISH 0x0018
8793 #define PU_TWIPS 0x001c
8794
8795
8796 BOOL GpiAssociate (HPS hps, HDC hdc);
8797 HPS GpiCreatePS (HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions);
8798 BOOL GpiDestroyPS (HPS hps);
8799 BOOL GpiErase (HPS hps);
8800 HDC GpiQueryDevice (HPS hps);
8801 BOOL GpiRestorePS (HPS hps, LONG lPSid);
8802 LONG GpiSavePS (HPS hps);
8803
8804 #endif /* INCL_GPICONTROL */
8805
8806
8807 #if defined (INCL_GPICONTROL)
8808
8809 #define DCTL_ERASE 1
8810 #define DCTL_DISPLAY 2
8811 #define DCTL_BOUNDARY 3
8812 #define DCTL_DYNAMIC 4
8813 #define DCTL_CORRELATE 5
8814
8815 #define DCTL_ERROR (-1)
8816 #define DCTL_OFF 0
8817 #define DCTL_ON 1
8818
8819 #define DM_ERROR 0
8820 #define DM_DRAW 1
8821 #define DM_RETAIN 2
8822 #define DM_DRAWANDRETAIN 3
8823
8824 #define GPIE_SEGMENT 0
8825 #define GPIE_ELEMENT 1
8826 #define GPIE_DATA 2
8827
8828 #define GRES_ATTRS 0x0001
8829 #define GRES_SEGMENTS 0x0002
8830 #define GRES_ALL 0x0004
8831
8832 #define PS_UNITS 0x00fc
8833 #define PS_FORMAT 0x0f00
8834 #define PS_TYPE 0x1000
8835 #define PS_MODE 0x2000
8836 #define PS_ASSOCIATE 0x4000
8837 #define PS_NORESET 0x8000
8838
8839 #define SDW_ERROR (-1)
8840 #define SDW_OFF 0
8841 #define SDW_ON 1
8842
8843
8844 LONG GpiErrorSegmentData (HPS hps, PLONG plSegment, PLONG plContext);
8845 LONG GpiQueryDrawControl (HPS hps, LONG lControl);
8846 LONG GpiQueryDrawingMode (HPS hps);
8847 ULONG GpiQueryPS (HPS hps, PSIZEL psizlSize);
8848 BOOL GpiResetPS (HPS hps, ULONG flOptions);
8849 LONG GpiQueryStopDraw (HPS hps);
8850 BOOL GpiSetDrawControl (HPS hps, LONG lControl, LONG lValue);
8851 BOOL GpiSetDrawingMode (HPS hps, LONG lMode);
8852 BOOL GpiSetPS (HPS hps, __const__ SIZEL *psizlsize, ULONG flOptions);
8853 BOOL GpiSetStopDraw (HPS hps, LONG lValue);
8854
8855 #endif /* INCL_GPICONTROL */
8856
8857
8858 #if defined (INCL_GPICORRELATION)
8859
8860 #define GPI_HITS 2
8861
8862 #define PICKAP_DEFAULT 0
8863 #define PICKAP_REC 2
8864
8865 #define PICKSEL_VISIBLE 0
8866 #define PICKSEL_ALL 1
8867
8868
8869 LONG GpiCorrelateChain (HPS hps, LONG lType, __const__ POINTL *pptlPick,
8870 LONG lMaxHits, LONG lMaxDepth, PLONG pl2);
8871 LONG GpiCorrelateFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment,
8872 LONG lType, __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth,
8873 PLONG plSegTag);
8874 LONG GpiCorrelateSegment (HPS hps, LONG lSegment, LONG lType,
8875 __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth, PLONG alSegTag);
8876 BOOL GpiQueryBoundaryData (HPS hps, PRECTL prclBoundary);
8877 BOOL GpiQueryPickAperturePosition (HPS hps, PPOINTL pptlPoint);
8878 BOOL GpiQueryPickApertureSize (HPS hps, PSIZEL psizlSize);
8879 BOOL GpiQueryTag (HPS hps, PLONG plTag);
8880 BOOL GpiResetBoundaryData (HPS hps);
8881 BOOL GpiSetPickAperturePosition (HPS hps, __const__ POINTL *pptlPick);
8882 BOOL GpiSetPickApertureSize (HPS hps, LONG lOptions,
8883 __const__ SIZEL *psizlSize);
8884 BOOL GpiSetTag (HPS hps, LONG lTag);
8885
8886 #endif /* INCL_GPICORRELATION */
8887
8888
8889 #if defined (INCL_GPIINK)
8890
8891 #define PPE_KEEPPATH 0
8892 #define PPE_ERASEPATH 1
8893
8894 #define PPS_INKMOVE 0
8895 #define PPS_INKDOWN 1
8896 #define PPS_INKUP 2
8897
8898
8899 BOOL GpiBeginInkPath (HPS hps, LONG lPath, ULONG flOptions);
8900 BOOL GpiEndInkPath (HPS hps, ULONG flOptions);
8901 LONG GpiStrokeInkPath (HPS hps, LONG lPath, LONG lCount,
8902 __const__ POINTL *aptlPoints, ULONG flOptions);
8903
8904 #endif /* INCL_GPIINK */
8905
8906
8907 #if defined (INCL_GPISEGMENTS)
8908
8909 #define DFORM_NOCONV 0
8910
8911 #define DFORM_S370SHORT 1
8912 #define DFORM_PCSHORT 2
8913 #define DFORM_PCLONG 4
8914
8915 #define ATTR_ERROR (-1)
8916 #define ATTR_DETECTABLE 1
8917 #define ATTR_VISIBLE 2
8918 #define ATTR_CHAINED 6
8919 #define ATTR_DYNAMIC 8
8920 #define ATTR_FASTCHAIN 9
8921 #define ATTR_PROP_DETECTABLE 10
8922 #define ATTR_PROP_VISIBLE 11
8923
8924 #define ATTR_OFF 0
8925 #define ATTR_ON 1
8926
8927 #define LOWER_PRI (-1)
8928 #define HIGHER_PRI 1
8929
8930
8931 BOOL GpiCloseSegment (HPS hps);
8932 BOOL GpiDeleteSegment (HPS hps, LONG lSegid);
8933 BOOL GpiDeleteSegments (HPS hps, LONG lFirstSegment, LONG lLastSegment);
8934 BOOL GpiDrawChain (HPS hps);
8935 BOOL GpiDrawDynamics (HPS hps);
8936 BOOL GpiDrawFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment);
8937 BOOL GpiDrawSegment (HPS hps, LONG lSegment);
8938 LONG GpiGetData (HPS hps, LONG lSegid, PLONG plOffset, LONG lFormat,
8939 LONG lLength, PBYTE pbData);
8940 BOOL GpiOpenSegment (HPS hps, LONG lSegment);
8941 LONG GpiPutData (HPS hps, LONG lFormat, PLONG plCount, __const__ BYTE *pbData);
8942 LONG GpiQueryInitialSegmentAttrs (HPS hps, LONG lAttribute);
8943 LONG GpiQuerySegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute);
8944 LONG GpiQuerySegmentNames (HPS hps, LONG lFirstSegid, LONG lLastSegid,
8945 LONG lMax, PLONG alSegids);
8946 LONG GpiQuerySegmentPriority (HPS hps, LONG lRefSegid, LONG lOrder);
8947 BOOL GpiRemoveDynamics (HPS hps, LONG lFirstSegid, LONG lLastSegid);
8948 BOOL GpiSetInitialSegmentAttrs (HPS hps, LONG lAttribute, LONG lValue);
8949 BOOL GpiSetSegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute, LONG lValue);
8950 BOOL GpiSetSegmentPriority (HPS hps, LONG lSegid, LONG lRefSegid, LONG lOrder);
8951
8952 #endif /* INCL_GPISEGMENTS */
8953
8954
8955 /* ---------------------- DEVICE CONTEXTS --------------------------------- */
8956
8957 #define DEV_ERROR 0
8958 #define DEV_OK 1
8959 #define DEV_BAD_PARAMETERS 2
8960 #define DEV_WARNING 3
8961 #define DEV_PROP_BUF_TOO_SMALL 4
8962 #define DEV_ITEM_BUF_TOO_SMALL 5
8963 #define DEV_INV_INP_JOBPROPERTIES 6
8964
8965 #define ADDRESS 0
8966 #define DRIVER_NAME 1
8967 #define DRIVER_DATA 2
8968 #define DATA_TYPE 3
8969 #define COMMENT 4
8970 #define PROC_NAME 5
8971 #define PROC_PARAMS 6
8972 #define SPL_PARAMS 7
8973 #define NETWORK_PARAMS 8
8974
8975 #define OD_SCREEN 0
8976 #define OD_QUEUED 2
8977 #define OD_DIRECT 5
8978 #define OD_INFO 6
8979 #define OD_METAFILE 7
8980 #define OD_MEMORY 8
8981 #define OD_METAFILE_NOQUERY 9
8982
8983 #define CAPS_FAMILY 0
8984 #define CAPS_IO_CAPS 1
8985 #define CAPS_TECHNOLOGY 2
8986 #define CAPS_DRIVER_VERSION 3
8987 #define CAPS_WIDTH 4
8988 #define CAPS_HEIGHT 5
8989 #define CAPS_WIDTH_IN_CHARS 6
8990 #define CAPS_HEIGHT_IN_CHARS 7
8991 #define CAPS_HORIZONTAL_RESOLUTION 8
8992 #define CAPS_VERTICAL_RESOLUTION 9
8993 #define CAPS_CHAR_WIDTH 10
8994 #define CAPS_CHAR_HEIGHT 11
8995 #define CAPS_SMALL_CHAR_WIDTH 12
8996 #define CAPS_SMALL_CHAR_HEIGHT 13
8997 #define CAPS_COLORS 14
8998 #define CAPS_COLOR_PLANES 15
8999 #define CAPS_COLOR_BITCOUNT 16
9000 #define CAPS_COLOR_TABLE_SUPPORT 17
9001 #define CAPS_MOUSE_BUTTONS 18
9002 #define CAPS_FOREGROUND_MIX_SUPPORT 19
9003 #define CAPS_BACKGROUND_MIX_SUPPORT 20
9004 #define CAPS_DEVICE_WINDOWING 31
9005 #define CAPS_ADDITIONAL_GRAPHICS 32
9006 #define CAPS_VIO_LOADABLE_FONTS 21
9007 #define CAPS_WINDOW_BYTE_ALIGNMENT 22
9008 #define CAPS_BITMAP_FORMATS 23
9009 #define CAPS_RASTER_CAPS 24
9010 #define CAPS_MARKER_HEIGHT 25
9011 #define CAPS_MARKER_WIDTH 26
9012 #define CAPS_DEVICE_FONTS 27
9013 #define CAPS_GRAPHICS_SUBSET 28
9014 #define CAPS_GRAPHICS_VERSION 29
9015 #define CAPS_GRAPHICS_VECTOR_SUBSET 30
9016 #define CAPS_PHYS_COLORS 33
9017 #define CAPS_COLOR_INDEX 34
9018 #define CAPS_GRAPHICS_CHAR_WIDTH 35
9019 #define CAPS_GRAPHICS_CHAR_HEIGHT 36
9020 #define CAPS_HORIZONTAL_FONT_RES 37
9021 #define CAPS_VERTICAL_FONT_RES 38
9022 #define CAPS_DEVICE_FONT_SIM 39
9023 #define CAPS_LINEWIDTH_THICK 40
9024 #define CAPS_DEVICE_POLYSET_POINTS 41
9025
9026 #define CAPS_IO_DUMMY 1
9027 #define CAPS_IO_SUPPORTS_OP 2
9028 #define CAPS_IO_SUPPORTS_IP 3
9029 #define CAPS_IO_SUPPORTS_IO 4
9030
9031 #define CAPS_TECH_UNKNOWN 0
9032 #define CAPS_TECH_VECTOR_PLOTTER 1
9033 #define CAPS_TECH_RASTER_DISPLAY 2
9034 #define CAPS_TECH_RASTER_PRINTER 3
9035 #define CAPS_TECH_RASTER_CAMERA 4
9036 #define CAPS_TECH_POSTSCRIPT 5
9037
9038 #define CAPS_COLTABL_RGB_8 0x0001
9039 #define CAPS_COLTABL_RGB_8_PLUS 0x0002
9040 #define CAPS_COLTABL_TRUE_MIX 0x0004
9041 #define CAPS_COLTABL_REALIZE 0x0008
9042
9043 #define CAPS_FM_OR 0x0001
9044 #define CAPS_FM_OVERPAINT 0x0002
9045 #define CAPS_FM_XOR 0x0008
9046 #define CAPS_FM_LEAVEALONE 0x0010
9047 #define CAPS_FM_AND 0x0020
9048 #define CAPS_FM_GENERAL_BOOLEAN 0x0040
9049
9050 #define CAPS_BM_OR 0x0001
9051 #define CAPS_BM_OVERPAINT 0x0002
9052 #define CAPS_BM_XOR 0x0008
9053 #define CAPS_BM_LEAVEALONE 0x0010
9054 #define CAPS_BM_AND 0x0020
9055 #define CAPS_BM_GENERAL_BOOLEAN 0x0040
9056 #define CAPS_BM_SRCTRANSPARENT 0x0080
9057 #define CAPS_BM_DESTTRANSPARENT 0x0100
9058
9059 #define CAPS_DEV_WINDOWING_SUPPORT 0x0001
9060
9061 #define CAPS_DEV_FONT_SIM_BOLD 0x0001
9062 #define CAPS_DEV_FONT_SIM_ITALIC 0x0002
9063 #define CAPS_DEV_FONT_SIM_UNDERSCORE 0x0004
9064 #define CAPS_DEV_FONT_SIM_STRIKEOUT 0x0008
9065
9066 #define CAPS_VDD_DDB_TRANSFER 0x0001
9067 #define CAPS_GRAPHICS_KERNING_SUPPORT 0x0002
9068 #define CAPS_FONT_OUTLINE_DEFAULT 0x0004
9069 #define CAPS_FONT_IMAGE_DEFAULT 0x0008
9070 #define CAPS_SCALED_DEFAULT_MARKERS 0x0040
9071 #define CAPS_COLOR_CURSOR_SUPPORT 0x0080
9072 #define CAPS_PALETTE_MANAGER 0x0100
9073 #define CAPS_COSMETIC_WIDELINE_SUPPORT 0x0200
9074 #define CAPS_DIRECT_FILL 0x0400
9075 #define CAPS_REBUILD_FILLS 0x0800
9076 #define CAPS_CLIP_FILLS 0x1000
9077 #define CAPS_ENHANCED_FONTMETRICS 0x2000
9078 #define CAPS_TRANSFORM_SUPPORT 0x4000
9079 #define CAPS_EXTERNAL_16_BITCOUNT 0x8000
9080
9081 #define CAPS_BYTE_ALIGN_REQUIRED 0
9082 #define CAPS_BYTE_ALIGN_RECOMMENDED 1
9083 #define CAPS_BYTE_ALIGN_NOT_REQUIRED 2
9084
9085 #define CAPS_RASTER_BITBLT 0x0001
9086 #define CAPS_RASTER_BANDING 0x0002
9087 #define CAPS_RASTER_BITBLT_SCALING 0x0004
9088 #define CAPS_RASTER_SET_PEL 0x0010
9089 #define CAPS_RASTER_FONTS 0x0020
9090 #define CAPS_RASTER_FLOOD_FILL 0x0040
9091
9092 #define DEVESC_ERROR (-1)
9093 #define DEVESC_NOTIMPLEMENTED 0
9094
9095 #define DEVESC_QUERYESCSUPPORT 0
9096 #define DEVESC_GETSCALINGFACTOR 1
9097 #define DEVESC_QUERYVIOCELLSIZES 2
9098 #define DEVESC_GETCP 8000
9099 #define DEVESC_STARTDOC 8150
9100 #define DEVESC_ENDDOC 8151
9101 #define DEVESC_NEXTBAND 8152
9102 #define DEVESC_ABORTDOC 8153
9103 #define DEVESC_GETJOBID 8160
9104 #define DEVESC_QUERY_RASTER 8161
9105 #define DEVESC_QUERYSIZE 8162
9106 #define DEVESC_QUERYJOBPROPERTIES 8163
9107 #define DEVESC_SETJOBPROPERTIES 8164
9108 #define DEVESC_DEFAULTJOBPROPERTIES 8165
9109 #define DEVESC_CHANGEOUTPUTPORT 8166
9110 #define DEVESC_NEWFRAME 16300
9111 #define DEVESC_DRAFTMODE 16301
9112 #define DEVESC_FLUSHOUTPUT 16302
9113 #define DEVESC_RAWDATA 16303
9114 #define DEVESC_SETMODE 16304
9115 #define DEVESC_SEP 16305
9116 #define DEVESC_MACRO 16307
9117 #define DEVESC_BEGIN_BITBLT 16309
9118 #define DEVESC_END_BITBLT 16310
9119 #define DEVESC_SEND_COMPDATA 16311
9120 #define DEVESC_DBE_FIRST 24450
9121 #define DEVESC_DBE_LAST 24455
9122 #define DEVESC_CHAR_EXTRA 16998
9123 #define DEVESC_BREAK_EXTRA 16999
9124 #define DEVESC_STD_JOURNAL 32600
9125 #define DEVESC_STARTDOC_WPROP 49150
9126 #define DEVESC_NEWFRAME_WPROP 49151
9127
9128 #define DPDM_ERROR (-1)
9129 #define DPDM_NONE 0
9130
9131 #define DPDM_POSTJOBPROP 0
9132 #define DPDM_CHANGEPROP 1
9133 #define DPDM_QUERYJOBPROP 2
9134
9135 #define DQHC_ERROR (-1)
9136
9137 #define HCAPS_CURRENT 1
9138 #define HCAPS_SELECTABLE 2
9139
9140
9141 typedef PSZ *PDEVOPENDATA;
9142
9143
9144 typedef struct _DRIVDATA
9145 {
9146 LONG cb;
9147 LONG lVersion;
9148 CHAR szDeviceName[32];
9149 CHAR abGeneralData[1];
9150 } DRIVDATA;
9151 typedef DRIVDATA *PDRIVDATA;
9152
9153 typedef struct _DEVOPENSTRUC
9154 {
9155 PSZ pszLogAddress;
9156 PSZ pszDriverName;
9157 PDRIVDATA pdriv;
9158 PSZ pszDataType;
9159 PSZ pszComment;
9160 PSZ pszQueueProcName;
9161 PSZ pszQueueProcParams;
9162 PSZ pszSpoolerParams;
9163 PSZ pszNetworkParams;
9164 } DEVOPENSTRUC;
9165 typedef DEVOPENSTRUC *PDEVOPENSTRUC;
9166
9167 typedef struct _ESCMODE
9168 {
9169 ULONG mode;
9170 BYTE modedata[1];
9171 } ESCMODE;
9172 typedef ESCMODE *PESCMODE;
9173
9174 typedef struct _VIOSIZECOUNT
9175 {
9176 LONG maxcount;
9177 LONG count;
9178 } VIOSIZECOUNT;
9179 typedef VIOSIZECOUNT *PVIOSIZECOUNT;
9180
9181 typedef struct _VIOFONTCELLSIZE
9182 {
9183 LONG cx;
9184 LONG cy;
9185 } VIOFONTCELLSIZE;
9186 typedef VIOFONTCELLSIZE *PVIOFONTCELLSIZE;
9187
9188 typedef struct _SFACTORS
9189 {
9190 LONG x;
9191 LONG y;
9192 } SFACTORS;
9193 typedef SFACTORS *PSFACTORS;
9194
9195 typedef struct _BANDRECT
9196 {
9197 LONG xleft;
9198 LONG ybottom;
9199 LONG xright;
9200 LONG ytop;
9201 } BANDRECT;
9202 typedef BANDRECT *PBANDRECT;
9203
9204 typedef struct _HCINFO
9205 {
9206 CHAR szFormname[32];
9207 LONG cx;
9208 LONG cy;
9209 LONG xLeftClip;
9210 LONG yBottomClip;
9211 LONG xRightClip;
9212 LONG yTopClip;
9213 LONG xPels;
9214 LONG yPels;
9215 LONG flAttributes;
9216 } HCINFO;
9217 typedef HCINFO *PHCINFO;
9218
9219 HMF DevCloseDC (HDC hdc);
9220 LONG DevEscape (HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData,
9221 PLONG plOutCount, PBYTE pbOutData);
9222 HDC DevOpenDC (HAB hab, LONG lType, PCSZ pszToken, LONG lCount,
9223 PDEVOPENDATA pdopData, HDC hdcComp);
9224 LONG DevPostDeviceModes (HAB hab, PDRIVDATA pdrivDriverData ,
9225 PCSZ pszDriverName, PCSZ pszDeviceName, PCSZ pszName, ULONG flOptions);
9226 BOOL DevQueryCaps (HDC hdc, LONG lStart, LONG lCount, PLONG alArray);
9227 BOOL DevQueryDeviceNames (HAB hab, PCSZ pszDriverName, PLONG pldn,
9228 PSTR32 aDeviceName, PSTR64 aDeviceDesc, PLONG pldt, PSTR16 aDataType);
9229 LONG DevQueryHardcopyCaps (HDC hdc, LONG lStartForm, LONG lForms,
9230 PHCINFO phciHcInfo);
9231
9232 /* ------------------ PRESENTATION MANAGER SHELL -------------------------- */
9233
9234 #define MAXNAMEL 60
9235
9236 #define HINI_PROFILE (HINI)0
9237 #define HINI_USERPROFILE (HINI)(-1)
9238 #define HINI_SYSTEMPROFILE (HINI)(-2)
9239 #define HINI_USER HINI_USERPROFILE
9240 #define HINI_SYSTEM HINI_SYSTEMPROFILE
9241
9242 typedef LHANDLE HSWITCH;
9243 typedef HSWITCH *PHSWITCH;
9244
9245 typedef LHANDLE HPROGRAM;
9246 typedef HPROGRAM *PHPROGRAM;
9247
9248 typedef LHANDLE HINI;
9249 typedef HINI *PHINI;
9250
9251 typedef LHANDLE HAPP;
9252
9253
9254 typedef struct _PRFPROFILE
9255 {
9256 ULONG cchUserName;
9257 PSZ pszUserName;
9258 ULONG cchSysName;
9259 PSZ pszSysName;
9260 } PRFPROFILE;
9261 typedef PRFPROFILE *PPRFPROFILE;
9262
9263
9264 #if defined (INCL_WINPROGRAMLIST)
9265
9266 #define MAXPATHL 128
9267 #define SGH_ROOT (HPROGRAM)(-1L)
9268
9269 #define PROG_DEFAULT 0
9270 #define PROG_FULLSCREEN 1
9271 #define PROG_WINDOWABLEVIO 2
9272 #define PROG_PM 3
9273 #define PROG_GROUP 5
9274 #define PROG_REAL 4
9275 #define PROG_VDM 4
9276 #define PROG_WINDOWEDVDM 7
9277 #define PROG_DLL 6
9278 #define PROG_PDD 8
9279 #define PROG_VDD 9
9280 #define PROG_WINDOW_REAL 10
9281 #define PROG_WINDOW_PROT 11
9282 #define PROG_WINDOW_AUTO 12
9283 #define PROG_SEAMLESSVDM 13
9284 #define PROG_SEAMLESSCOMMON 14
9285 #define PROG_30_STDSEAMLESSCOMMON 14
9286 #define PROG_31_STDSEAMLESSVDM 15
9287 #define PROG_31_STDSEAMLESSCOMMON 16
9288 #define PROG_31_ENHSEAMLESSVDM 17
9289 #define PROG_31_ENHSEAMLESSCOMMON 18
9290 #define PROG_31_ENH 19
9291 #define PROG_31_STD 20
9292 #define PROG_DOS_GAME 21
9293 #define PROG_WIN_GAME 22
9294 #define PROG_DOS_MODE 23
9295 #define PROG_RESERVED 255
9296
9297 #define SAF_VALIDFLAGS 0x001f
9298
9299 #define SAF_INSTALLEDCMDLINE 0x0001
9300 #define SAF_STARTCHILDAPP 0x0002
9301 #define SAF_MAXIMIZED 0x0004
9302 #define SAF_MINIMIZED 0x0008
9303 #define SAF_BACKGROUND 0x0010
9304
9305 #define SHE_VISIBLE 0x00
9306 #define SHE_INVISIBLE 0x01
9307 #define SHE_RESERVED 0xff
9308
9309 #define SHE_UNPROTECTED 0x00
9310 #define SHE_PROTECTED 0x02
9311
9312
9313 typedef ULONG PROGCATEGORY;
9314 typedef PROGCATEGORY *PPROGCATEGORY;
9315
9316 typedef struct _HPROGARRAY
9317 {
9318 HPROGRAM ahprog[1];
9319 } HPROGARRAY;
9320 typedef HPROGARRAY *PHPROGARRAY;
9321
9322 typedef struct _PROGTYPE
9323 {
9324 PROGCATEGORY progc;
9325 ULONG fbVisible;
9326 } PROGTYPE;
9327 typedef PROGTYPE *PPROGTYPE;
9328
9329 typedef struct _PROGTITLE
9330 {
9331 HPROGRAM hprog;
9332 PROGTYPE progt;
9333 PSZ pszTitle;
9334 } PROGTITLE;
9335 typedef PROGTITLE *PPROGTITLE;
9336
9337 typedef struct _PROGDETAILS
9338 {
9339 ULONG Length;
9340 PROGTYPE progt;
9341 PSZ pszTitle;
9342 PSZ pszExecutable;
9343 PSZ pszParameters;
9344 PSZ pszStartupDir;
9345 PSZ pszIcon;
9346 PSZ pszEnvironment;
9347 SWP swpInitial;
9348 } PROGDETAILS;
9349 typedef PROGDETAILS *PPROGDETAILS;
9350
9351
9352 HPROGRAM PrfAddProgram (HINI hini, PPROGDETAILS pDetails, HPROGRAM hprogGroup);
9353 BOOL PrfChangeProgram (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails);
9354 HPROGRAM PrfCreateGroup (HINI hini, PCSZ pszTitle, UCHAR chVisibility);
9355 BOOL PrfDestroyGroup (HINI hini, HPROGRAM hprogGroup);
9356 PROGCATEGORY PrfQueryProgramCategory (HINI hini, PCSZ pszExe);
9357 ULONG PrfQueryProgramHandle (HINI hini, PCSZ pszExe,
9358 PHPROGARRAY phprogArray, ULONG cchBufferMax, PULONG pulCount);
9359 ULONG PrfQueryProgramTitles (HINI hini, HPROGRAM hprogGroup,
9360 PPROGTITLE pTitles, ULONG ulBufferLength, PULONG pulCount);
9361 ULONG PrfQueryDefinition (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails,
9362 ULONG ulBufferLength);
9363 BOOL PrfRemoveProgram (HINI hini, HPROGRAM hprog);
9364
9365 HAPP WinStartApp (HWND hwndNotify, PPROGDETAILS pDetails,
9366 PCSZ pszParams, PVOID Reserved, ULONG fbOptions);
9367 BOOL WinTerminateApp (HAPP happ);
9368
9369 #endif /* INCL_WINPROGRAMLIST */
9370
9371
9372 #if defined (INCL_WINSWITCHLIST) || !defined (INCL_NOCOMMON)
9373
9374 #define SWL_INVISIBLE 0x01
9375 #define SWL_GRAYED 0x02
9376 #define SWL_VISIBLE 0x04
9377
9378 #define SWL_NOTJUMPABLE 0x01
9379 #define SWL_JUMPABLE 0x02
9380
9381 typedef struct _SWCNTRL
9382 {
9383 HWND hwnd;
9384 HWND hwndIcon;
9385 HPROGRAM hprog;
9386 PID idProcess;
9387 ULONG idSession;
9388 ULONG uchVisibility;
9389 ULONG fbJump;
9390 CHAR szSwtitle[MAXNAMEL+4];
9391 ULONG bProgType;
9392 } SWCNTRL;
9393 typedef SWCNTRL *PSWCNTRL;
9394
9395 HSWITCH WinAddSwitchEntry (__const__ SWCNTRL *pswctl);
9396 ULONG WinRemoveSwitchEntry (HSWITCH hsw);
9397
9398 #endif /* INCL_WINSWITCHLIST || !INCL_NOCOMMON */
9399
9400 #if defined (INCL_WINSWITCHLIST)
9401
9402 typedef struct _SWENTRY
9403 {
9404 HSWITCH hswitch;
9405 SWCNTRL swctl;
9406 } SWENTRY;
9407 typedef SWENTRY *PSWENTRY;
9408
9409 typedef struct _SWBLOCK
9410 {
9411 ULONG cswentry;
9412 SWENTRY aswentry[1];
9413 } SWBLOCK;
9414 typedef SWBLOCK *PSWBLOCK;
9415
9416
9417 ULONG WinChangeSwitchEntry (HSWITCH hsw, __const__ SWCNTRL *pswctl);
9418 HSWITCH WinCreateSwitchEntry (HAB hab, __const__ SWCNTRL *pswctl);
9419 ULONG WinQuerySessionTitle (HAB hab, ULONG usSession, PSZ pszTitle,
9420 ULONG usTitlelen);
9421 ULONG WinQuerySwitchEntry (HSWITCH hsw, PSWCNTRL pswctl);
9422 HSWITCH WinQuerySwitchHandle (HWND hwnd, PID pid);
9423 ULONG WinQuerySwitchList (HAB hab, PSWBLOCK pswblk, ULONG usDataLength);
9424 ULONG WinQueryTaskSizePos (HAB hab, ULONG usScreenGroup, PSWP pswp);
9425 ULONG WinQueryTaskTitle (ULONG usSession, PSZ pszTitle, ULONG usTitlelen);
9426 ULONG WinSwitchToProgram (HSWITCH hsw);
9427
9428 #endif /* INCL_WINSWITCHLIST */
9429
9430
9431 #if defined (INCL_WINSHELLDATA)
9432
9433 #define PL_ALTERED 0x008e
9434
9435 BOOL PrfCloseProfile (HINI hini);
9436 HINI PrfOpenProfile (HAB hab, PCSZ pszFileName);
9437 BOOL PrfQueryProfile (HAB hab, PPRFPROFILE pPrfProfile);
9438 BOOL PrfQueryProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey, PVOID pBuffer,
9439 PULONG pulBufferLength);
9440 LONG PrfQueryProfileInt (HINI hini, PCSZ pszApp, PCSZ pszKey, LONG sDefault);
9441 BOOL PrfQueryProfileSize (HINI hini, PCSZ pszApp, PCSZ pszKey,
9442 PULONG pulReqLen);
9443 ULONG PrfQueryProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey,
9444 PCSZ pszDefault, PVOID pBuffer, ULONG ulBufferLength);
9445 BOOL PrfReset (HAB hab, __const__ PRFPROFILE *pPrfProfile);
9446 BOOL PrfWriteProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey,
9447 CPVOID pData, ULONG ulDataLength);
9448 BOOL PrfWriteProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey,
9449 PCSZ pszData);
9450
9451 #endif /* INCL_WINSHELLDATA */
9452
9453 /* ------------------ STANDARD DIALOGS: FILE ------------------------------ */
9454
9455 #if defined (INCL_WINSTDFILE)
9456
9457 #define FDM_FILTER (WM_USER+40)
9458 #define FDM_VALIDATE (WM_USER+41)
9459 #define FDM_ERROR (WM_USER+42)
9460
9461 #define DID_FILE_DIALOG 256
9462 #define DID_FILENAME_TXT 257
9463 #define DID_FILENAME_ED 258
9464 #define DID_DRIVE_TXT 259
9465 #define DID_DRIVE_CB 260
9466 #define DID_FILTER_TXT 261
9467 #define DID_FILTER_CB 262
9468 #define DID_DIRECTORY_TXT 263
9469 #define DID_DIRECTORY_LB 264
9470 #define DID_FILES_TXT 265
9471 #define DID_FILES_LB 266
9472 #define DID_HELP_PB 267
9473 #define DID_APPLY_PB 268
9474 #define DID_READ_ONLY 269
9475 #define DID_DIRECTORY_SELECTED 270
9476 #define DID_OK_PB DID_OK
9477 #define DID_CANCEL_PB DID_CANCEL
9478
9479 #define FDS_CENTER 0x00000001
9480 #define FDS_CUSTOM 0x00000002
9481 #define FDS_FILTERUNION 0x00000004
9482 #define FDS_HELPBUTTON 0x00000008
9483 #define FDS_APPLYBUTTON 0x00000010
9484 #define FDS_PRELOAD_VOLINFO 0x00000020
9485 #define FDS_MODELESS 0x00000040
9486 #define FDS_INCLUDE_EAS 0x00000080
9487 #define FDS_OPEN_DIALOG 0x00000100
9488 #define FDS_SAVEAS_DIALOG 0x00000200
9489 #define FDS_MULTIPLESEL 0x00000400
9490 #define FDS_ENABLEFILELB 0x00000800
9491 #define FDS_NATIONAL_LANGUAGE 0x80000000
9492
9493 #define FDS_EFSELECTION 0
9494 #define FDS_LBSELECTION 1
9495
9496 #define FDS_SUCCESSFUL 0
9497 #define FDS_ERR_DEALLOCATE_MEMORY 1
9498 #define FDS_ERR_FILTER_TRUNC 2
9499 #define FDS_ERR_INVALID_DIALOG 3
9500 #define FDS_ERR_INVALID_DRIVE 4
9501 #define FDS_ERR_INVALID_FILTER 5
9502 #define FDS_ERR_INVALID_PATHFILE 6
9503 #define FDS_ERR_OUT_OF_MEMORY 7
9504 #define FDS_ERR_PATH_TOO_LONG 8
9505 #define FDS_ERR_TOO_MANY_FILE_TYPES 9
9506 #define FDS_ERR_INVALID_VERSION 10
9507 #define FDS_ERR_INVALID_CUSTOM_HANDLE 11
9508 #define FDS_ERR_DIALOG_LOAD_ERROR 12
9509 #define FDS_ERR_DRIVE_ERROR 13
9510
9511 #define IDS_FILE_ALL_FILES_SELECTOR 1000
9512 #define IDS_FILE_BACK_CUR_PATH 1001
9513 #define IDS_FILE_BACK_PREV_PATH 1002
9514 #define IDS_FILE_BACK_SLASH 1003
9515 #define IDS_FILE_BASE_FILTER 1004
9516 #define IDS_FILE_BLANK 1005
9517 #define IDS_FILE_COLON 1006
9518 #define IDS_FILE_DOT 1007
9519 #define IDS_FILE_DRIVE_LETTERS 1008
9520 #define IDS_FILE_FWD_CUR_PATH 1009
9521 #define IDS_FILE_FWD_PREV_PATH 1010
9522 #define IDS_FILE_FORWARD_SLASH 1011
9523 #define IDS_FILE_PARENT_DIR 1012
9524 #define IDS_FILE_Q_MARK 1013
9525 #define IDS_FILE_SPLAT 1014
9526 #define IDS_FILE_SPLAT_DOT 1015
9527 #define IDS_FILE_SAVEAS_TITLE 1016
9528 #define IDS_FILE_SAVEAS_FILTER_TXT 1017
9529 #define IDS_FILE_SAVEAS_FILENM_TXT 1018
9530 #define IDS_FILE_DUMMY_FILE_NAME 1019
9531 #define IDS_FILE_DUMMY_FILE_EXT 1020
9532 #define IDS_FILE_DUMMY_DRIVE 1021
9533 #define IDS_FILE_DUMMY_ROOT_DIR 1022
9534 #define IDS_FILE_PATH_PTR 1023
9535 #define IDS_FILE_VOLUME_PREFIX 1024
9536 #define IDS_FILE_VOLUME_SUFFIX 1025
9537 #define IDS_FILE_PATH_PTR2 1026
9538 #define IDS_FILE_INVALID_CHARS 1027
9539 #define IDS_FILE_ETC_BACK_SLASH 1028
9540 #define IDS_FILE_OPEN_PARENTHESIS 1029
9541 #define IDS_FILE_CLOSE_PARENTHESIS 1030
9542 #define IDS_FILE_SEMICOLON 1031
9543 #define IDS_FILE_BAD_DRIVE_NAME 1100
9544 #define IDS_FILE_BAD_DRIVE_OR_PATH_NAME 1101
9545 #define IDS_FILE_BAD_FILE_NAME 1102
9546 #define IDS_FILE_BAD_FQF 1103
9547 #define IDS_FILE_BAD_NETWORK_NAME 1104
9548 #define IDS_FILE_BAD_SUB_DIR_NAME 1105
9549 #define IDS_FILE_DRIVE_NOT_AVAILABLE 1106
9550 #define IDS_FILE_FQFNAME_TOO_LONG 1107
9551 #define IDS_FILE_OPEN_DIALOG_NOTE 1108
9552 #define IDS_FILE_PATH_TOO_LONG 1109
9553 #define IDS_FILE_SAVEAS_DIALOG_NOTE 1110
9554 #define IDS_FILE_DRIVE_DISK_CHANGE 1120
9555 #define IDS_FILE_DRIVE_NOT_READY 1122
9556 #define IDS_FILE_DRIVE_LOCKED 1123
9557 #define IDS_FILE_DRIVE_NO_SECTOR 1124
9558 #define IDS_FILE_DRIVE_SOME_ERROR 1125
9559 #define IDS_FILE_DRIVE_INVALID 1126
9560 #define IDS_FILE_INSERT_DISK_NOTE 1127
9561 #define IDS_FILE_OK_WHEN_READY 1128
9562
9563 typedef PSZ APSZ[1];
9564 typedef APSZ *PAPSZ;
9565
9566 typedef struct _FILEDLG
9567 {
9568 ULONG cbSize;
9569 ULONG fl;
9570 ULONG ulUser;
9571 LONG lReturn;
9572 LONG lSRC;
9573 PSZ pszTitle;
9574 PSZ pszOKButton;
9575 PFNWP pfnDlgProc;
9576 PSZ pszIType;
9577 PAPSZ papszITypeList;
9578 PSZ pszIDrive;
9579 PAPSZ papszIDriveList;
9580 HMODULE hMod;
9581 CHAR szFullFile[CCHMAXPATH];
9582 PAPSZ papszFQFilename;
9583 ULONG ulFQFCount;
9584 USHORT usDlgId;
9585 SHORT x;
9586 SHORT y;
9587 SHORT sEAType;
9588 } FILEDLG;
9589 typedef FILEDLG *PFILEDLG;
9590
9591
9592 MRESULT WinDefFileDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
9593 HWND WinFileDlg (HWND hwndP, HWND hwndO, PFILEDLG pfild);
9594 BOOL WinFreeFileDlgList (PAPSZ papszFQFilename);
9595
9596 #endif /* INCL_WINSTDFILE */
9597
9598 /* ------------------ STANDARD DIALOGS: FONT ------------------------------ */
9599
9600 #if defined (INCL_WINSTDFONT)
9601
9602 #define FNTM_FACENAMECHANGED (WM_USER+50)
9603 #define FNTM_POINTSIZECHANGED (WM_USER+51)
9604 #define FNTM_STYLECHANGED (WM_USER+52)
9605 #define FNTM_COLORCHANGED (WM_USER+53)
9606 #define FNTM_UPDATEPREVIEW (WM_USER+54)
9607 #define FNTM_FILTERLIST (WM_USER+55)
9608
9609 #define FNTS_CENTER 0x00000001
9610 #define FNTS_CUSTOM 0x00000002
9611 #define FNTS_OWNERDRAWPREVIEW 0x00000004
9612 #define FNTS_HELPBUTTON 0x00000008
9613 #define FNTS_APPLYBUTTON 0x00000010
9614 #define FNTS_RESETBUTTON 0x00000020
9615 #define FNTS_MODELESS 0x00000040
9616 #define FNTS_INITFROMFATTRS 0x00000080
9617 #define FNTS_BITMAPONLY 0x00000100
9618 #define FNTS_VECTORONLY 0x00000200
9619 #define FNTS_FIXEDWIDTHONLY 0x00000400
9620 #define FNTS_PROPORTIONALONLY 0x00000800
9621 #define FNTS_NOSYNTHESIZEDFONTS 0x00001000
9622 #define FNTS_NATIONAL_LANGUAGE 0x80000000
9623
9624 #define FNTF_NOVIEWSCREENFONTS 0x0001
9625 #define FNTF_NOVIEWPRINTERFONTS 0x0002
9626 #define FNTF_SCREENFONTSELECTED 0x0004
9627 #define FNTF_PRINTERFONTSELECTED 0x0008
9628
9629 #define CLRC_FOREGROUND 1
9630 #define CLRC_BACKGROUND 2
9631
9632 #define FNTI_BITMAPFONT 0x0001
9633 #define FNTI_VECTORFONT 0x0002
9634 #define FNTI_FIXEDWIDTHFONT 0x0004
9635 #define FNTI_PROPORTIONALFONT 0x0008
9636 #define FNTI_SYNTHESIZED 0x0010
9637 #define FNTI_DEFAULTLIST 0x0020
9638 #define FNTI_FAMILYNAME 0x0100
9639 #define FNTI_STYLENAME 0x0200
9640 #define FNTI_POINTSIZE 0x0400
9641
9642 #define FNTS_SUCCESSFUL 0
9643 #define FNTS_ERR_INVALID_DIALOG 3
9644 #define FNTS_ERR_ALLOC_SHARED_MEM 4
9645 #define FNTS_ERR_INVALID_PARM 5
9646 #define FNTS_ERR_OUT_OF_MEMORY 7
9647 #define FNTS_ERR_INVALID_VERSION 10
9648 #define FNTS_ERR_DIALOG_LOAD_ERROR 12
9649
9650 #define DID_FONT_DIALOG 300
9651 #define DID_NAME 301
9652 #define DID_STYLE 302
9653 #define DID_DISPLAY_FILTER 303
9654 #define DID_PRINTER_FILTER 304
9655 #define DID_SIZE 305
9656 #define DID_SAMPLE 306
9657 #define DID_OUTLINE 307
9658 #define DID_UNDERSCORE 308
9659 #define DID_STRIKEOUT 309
9660 #define DID_HELP_BUTTON 310
9661 #define DID_APPLY_BUTTON 311
9662 #define DID_RESET_BUTTON 312
9663 #define DID_OK_BUTTON DID_OK
9664 #define DID_CANCEL_BUTTON DID_CANCEL
9665 #define DID_NAME_PREFIX 313
9666 #define DID_STYLE_PREFIX 314
9667 #define DID_SIZE_PREFIX 315
9668 #define DID_SAMPLE_GROUPBOX 316
9669 #define DID_EMPHASIS_GROUPBOX 317
9670 #define DID_FONT_ISO_SUPPORT 318
9671 #define DID_FONT_ISO_UNTESTED 319
9672
9673 #define IDS_FONT_SAMPLE 350
9674 #define IDS_FONT_BLANK 351
9675 #define IDS_FONT_KEY_0 352
9676 #define IDS_FONT_KEY_9 353
9677 #define IDS_FONT_KEY_SEP 354
9678 #define IDS_FONT_DISP_ONLY 355
9679 #define IDS_FONT_PRINTER_ONLY 356
9680 #define IDS_FONT_COMBINED 357
9681 #define IDS_FONT_WEIGHT1 358
9682 #define IDS_FONT_WEIGHT2 359
9683 #define IDS_FONT_WEIGHT3 360
9684 #define IDS_FONT_WEIGHT4 361
9685 #define IDS_FONT_WEIGHT5 362
9686 #define IDS_FONT_WEIGHT6 363
9687 #define IDS_FONT_WEIGHT7 364
9688 #define IDS_FONT_WEIGHT8 365
9689 #define IDS_FONT_WEIGHT9 366
9690 #define IDS_FONT_WIDTH1 367
9691 #define IDS_FONT_WIDTH2 368
9692 #define IDS_FONT_WIDTH3 369
9693 #define IDS_FONT_WIDTH4 370
9694 #define IDS_FONT_WIDTH5 371
9695 #define IDS_FONT_WIDTH6 372
9696 #define IDS_FONT_WIDTH7 373
9697 #define IDS_FONT_WIDTH8 374
9698 #define IDS_FONT_WIDTH9 375
9699 #define IDS_FONT_OPTION0 376
9700 #define IDS_FONT_OPTION1 377
9701 #define IDS_FONT_OPTION2 378
9702 #define IDS_FONT_OPTION3 379
9703 #define IDS_FONT_POINT_SIZE_LIST 380
9704
9705 typedef struct _FONTDLG
9706 {
9707 ULONG cbSize;
9708 HPS hpsScreen;
9709 HPS hpsPrinter;
9710 PSZ pszTitle;
9711 PSZ pszPreview;
9712 PSZ pszPtSizeList;
9713 PFNWP pfnDlgProc;
9714 PSZ pszFamilyname;
9715 FIXED fxPointSize;
9716 ULONG fl;
9717 ULONG flFlags;
9718 ULONG flType;
9719 ULONG flTypeMask;
9720 ULONG flStyle;
9721 ULONG flStyleMask;
9722 LONG clrFore;
9723 LONG clrBack;
9724 ULONG ulUser;
9725 LONG lReturn;
9726 LONG lSRC;
9727 LONG lEmHeight;
9728 LONG lXHeight;
9729 LONG lExternalLeading;
9730 HMODULE hMod;
9731 FATTRS fAttrs;
9732 SHORT sNominalPointSize;
9733 USHORT usWeight;
9734 USHORT usWidth;
9735 SHORT x;
9736 SHORT y;
9737 USHORT usDlgId;
9738 USHORT usFamilyBufLen;
9739 USHORT usReserved;
9740 } FONTDLG;
9741 typedef FONTDLG *PFONTDLG;
9742
9743 typedef struct _STYLECHANGE
9744 {
9745 USHORT usWeight;
9746 USHORT usWeightOld;
9747 USHORT usWidth;
9748 USHORT usWidthOld;
9749 ULONG flType;
9750 ULONG flTypeOld;
9751 ULONG flTypeMask;
9752 ULONG flTypeMaskOld;
9753 ULONG flStyle;
9754 ULONG flStyleOld;
9755 ULONG flStyleMask;
9756 ULONG flStyleMaskOld;
9757 } STYLECHANGE;
9758 typedef STYLECHANGE *PSTYLECHANGE;
9759
9760 HWND WinFontDlg (HWND hwndP, HWND hwndO, PFONTDLG pfntd);
9761 MRESULT WinDefFontDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
9762
9763 #endif /* INCL_WINSTDFONT */
9764
9765 /* -------------------------- SPIN BUTTON --------------------------------- */
9766
9767 #if defined (INCL_WINSTDSPIN)
9768
9769 #define SPBS_ALLCHARACTERS 0x0000
9770 #define SPBS_NUMERICONLY 0x0001
9771 #define SPBS_READONLY 0x0002
9772 #define SPBS_SERVANT 0x0000
9773 #define SPBS_MASTER 0x0010
9774 #define SPBS_JUSTDEFAULT 0x0000
9775 #define SPBS_JUSTRIGHT 0x0004
9776 #define SPBS_JUSTLEFT 0x0008
9777 #define SPBS_JUSTCENTER 0x000c
9778 #define SPBS_NOBORDER 0x0020
9779 #define SPBS_PADWITHZEROS 0x0080
9780 #define SPBS_FASTSPIN 0x0100
9781
9782 #define SPBM_OVERRIDESETLIMITS 0x0200
9783 #define SPBM_QUERYLIMITS 0x0201
9784 #define SPBM_SETTEXTLIMIT 0x0202
9785 #define SPBM_SPINUP 0x0203
9786 #define SPBM_SPINDOWN 0x0204
9787 #define SPBM_QUERYVALUE 0x0205
9788 #define SPBM_SETARRAY 0x0206
9789 #define SPBM_SETLIMITS 0x0207
9790 #define SPBM_SETCURRENTVALUE 0x0208
9791 #define SPBM_SETMASTER 0x0209
9792
9793 #define SPBN_UPARROW 0x020a
9794 #define SPBN_DOWNARROW 0x020b
9795 #define SPBN_ENDSPIN 0x020c
9796 #define SPBN_CHANGE 0x020d
9797 #define SPBN_SETFOCUS 0x020e
9798 #define SPBN_KILLFOCUS 0x020f
9799
9800 #define SPBQ_UPDATEIFVALID 0
9801 #define SPBQ_ALWAYSUPDATE 1
9802 #define SPBQ_DONOTUPDATE 3
9803
9804 #endif /* INCL_WINSTDSPIN */
9805
9806 /* ----------------------------- SLIDER ----------------------------------- */
9807
9808 #if defined (INCL_WINSTDSLIDER)
9809
9810 #define SLM_ADDDETENT 0x0369
9811 #define SLM_QUERYDETENTPOS 0x036a
9812 #define SLM_QUERYSCALETEXT 0x036b
9813 #define SLM_QUERYSLIDERINFO 0x036c
9814 #define SLM_QUERYTICKPOS 0x036d
9815 #define SLM_QUERYTICKSIZE 0x036e
9816 #define SLM_REMOVEDETENT 0x036f
9817 #define SLM_SETSCALETEXT 0x0370
9818 #define SLM_SETSLIDERINFO 0x0371
9819 #define SLM_SETTICKSIZE 0x0372
9820
9821 #define SLN_CHANGE 1
9822 #define SLN_SLIDERTRACK 2
9823 #define SLN_SETFOCUS 3
9824 #define SLN_KILLFOCUS 4
9825
9826 #define SLS_HORIZONTAL 0x0000
9827 #define SLS_VERTICAL 0x0001
9828 #define SLS_CENTER 0x0000
9829 #define SLS_BOTTOM 0x0002
9830 #define SLS_TOP 0x0004
9831 #define SLS_LEFT 0x0002
9832 #define SLS_RIGHT 0x0004
9833 #define SLS_SNAPTOINCREMENT 0x0008
9834 #define SLS_BUTTONSBOTTOM 0x0010
9835 #define SLS_BUTTONSTOP 0x0020
9836 #define SLS_BUTTONSLEFT 0x0010
9837 #define SLS_BUTTONSRIGHT 0x0020
9838 #define SLS_OWNERDRAW 0x0040
9839 #define SLS_READONLY 0x0080
9840 #define SLS_RIBBONSTRIP 0x0100
9841 #define SLS_HOMEBOTTOM 0x0000
9842 #define SLS_HOMETOP 0x0200
9843 #define SLS_HOMELEFT 0x0000
9844 #define SLS_HOMERIGHT 0x0200
9845 #define SLS_PRIMARYSCALE1 0x0000
9846 #define SLS_PRIMARYSCALE2 0x0400
9847
9848 #define SMA_SCALE1 0x0001
9849 #define SMA_SCALE2 0x0002
9850 #define SMA_SHAFTDIMENSIONS 0x0000
9851 #define SMA_SHAFTPOSITION 0x0001
9852 #define SMA_SLIDERARMDIMENSIONS 0x0002
9853 #define SMA_SLIDERARMPOSITION 0x0003
9854 #define SMA_RANGEVALUE 0x0000
9855 #define SMA_INCREMENTVALUE 0x0001
9856 #define SMA_SETALLTICKS 0xffff
9857
9858 #define SDA_RIBBONSTRIP 1
9859 #define SDA_SLIDERSHAFT 2
9860 #define SDA_BACKGROUND 3
9861 #define SDA_SLIDERARM 4
9862
9863 #define PMERR_UPDATE_IN_PROGRESS 0x1f06
9864 #define SLDERR_INVALID_PARAMETERS (-1)
9865
9866
9867 typedef struct _SLDCDATA
9868 {
9869 ULONG cbSize;
9870 USHORT usScale1Increments;
9871 USHORT usScale1Spacing;
9872 USHORT usScale2Increments;
9873 USHORT usScale2Spacing;
9874 } SLDCDATA;
9875 typedef SLDCDATA *PSLDCDATA;
9876
9877 #endif /* INCL_WINSTDSLIDER */
9878
9879 /* ------------------------- CIRCULAR SLIDER ------------------------------ */
9880
9881 #if defined (INCL_WINCIRCULARSLIDER)
9882
9883 #define CSM_QUERYRANGE 0x053d
9884 #define CSM_SETRANGE 0x053e
9885 #define CSM_QUERYVALUE 0x053f
9886 #define CSM_SETVALUE 0x0540
9887 #define CSM_QUERYRADIUS 0x0541
9888 #define CSM_SETINCREMENT 0x0542
9889 #define CSM_QUERYINCREMENT 0x0543
9890 #define CSM_SETBITMAPDATA 0x0544
9891 #define CSN_SETFOCUS 0x0548
9892 #define CSN_CHANGED 0x0549
9893 #define CSN_TRACKING 0x054a
9894 #define CSN_QUERYBACKGROUNDCOLOR 0x054b
9895
9896 #define CSS_NOBUTTON 0x0001
9897 #define CSS_NOTEXT 0x0002
9898 #define CSS_NONUMBER 0x0004
9899 #define CSS_POINTSELECT 0x0008
9900 #define CSS_360 0x0010
9901 #define CSS_MIDPOINT 0x0020
9902 #define CSS_PROPORTIONALTICKS 0x0040
9903 #define CSS_NOTICKS 0x0080
9904 #define CSS_CIRCULARVALUE 0x0100
9905
9906 typedef struct _CSBITMAPDATA
9907 {
9908 HBITMAP hbmLeftUp;
9909 HBITMAP hbmLeftDown;
9910 HBITMAP hbmRightUp;
9911 HBITMAP hbmRightDown;
9912 } CSBITMAPDATA;
9913 typedef CSBITMAPDATA *PCSBITMAPDATA;
9914
9915 #endif /* INCL_WINCIRCULARSLIDER */
9916
9917 /* ---------------------------- NOTEBOOK ---------------------------------- */
9918
9919 #if defined (INCL_WINSTDBOOK)
9920
9921 #define BFA_PAGEDATA 0x0001
9922 #define BFA_PAGEFROMHWND 0x0002
9923 #define BFA_PAGEFROMDLGTEMPLATE 0x0004
9924 #define BFA_PAGEFROMDLGRES 0x0008
9925 #define BFA_STATUSLINE 0x0010
9926 #define BFA_MAJORTABBITMAP 0x0020
9927 #define BFA_MINORTABBITMAP 0x0040
9928 #define BFA_MAJORTABTEXT 0x0080
9929 #define BFA_MINORTABTEXT 0x0100
9930 #define BFA_BIDIINFO 0x0200
9931
9932 #define BKM_CALCPAGERECT 0x0353
9933 #define BKM_DELETEPAGE 0x0354
9934 #define BKM_INSERTPAGE 0x0355
9935 #define BKM_INVALIDATETABS 0x0356
9936 #define BKM_TURNTOPAGE 0x0357
9937 #define BKM_QUERYPAGECOUNT 0x0358
9938 #define BKM_QUERYPAGEID 0x0359
9939 #define BKM_QUERYPAGEDATA 0x035a
9940 #define BKM_QUERYPAGEWINDOWHWND 0x035b
9941 #define BKM_QUERYTABBITMAP 0x035c
9942 #define BKM_QUERYTABTEXT 0x035d
9943 #define BKM_SETDIMENSIONS 0x035e
9944 #define BKM_SETPAGEDATA 0x035f
9945 #define BKM_SETPAGEWINDOWHWND 0x0360
9946 #define BKM_SETSTATUSLINETEXT 0x0361
9947 #define BKM_SETTABBITMAP 0x0362
9948 #define BKM_SETTABTEXT 0x0363
9949 #define BKM_SETNOTEBOOKCOLORS 0x0364
9950 #define BKM_QUERYPAGESTYLE 0x0365
9951 #define BKM_QUERYSTATUSLINETEXT 0x0366
9952 #define BKM_SETPAGEINFO 0x0367
9953 #define BKM_QUERYPAGEINFO 0x0368
9954 #define BKM_SETTABCOLOR 0x0374
9955 #define BKM_SETNOTEBOOKBUTTONS 0x0375
9956
9957 #define BKN_PAGESELECTED 0x0082
9958 #define BKN_NEWPAGESIZE 0x0083
9959 #define BKN_HELP 0x0084
9960 #define BKN_PAGEDELETED 0x0085
9961 #define BKN_PAGESELECTEDPENDING 0x0086
9962
9963 #define BKA_ALL 0x0001
9964 #define BKA_SINGLE 0x0002
9965 #define BKA_TAB 0x0004
9966
9967 #define BKA_LAST 0x0002
9968 #define BKA_FIRST 0x0004
9969 #define BKA_NEXT 0x0008
9970 #define BKA_PREV 0x0010
9971 #define BKA_TOP 0x0020
9972
9973 #define BKA_MAJORTAB 0x0001
9974 #define BKA_MINORTAB 0x0002
9975 #define BKA_PAGEBUTTON 0x0100
9976
9977 #define BKA_STATUSTEXTON 0x0001
9978 #define BKA_MAJOR 0x0040
9979 #define BKA_MINOR 0x0080
9980 #define BKA_AUTOPAGESIZE 0x0100
9981 #define BKA_END 0x0200
9982
9983 #define BKA_TEXT 0x0400
9984 #define BKA_BITMAP 0x0800
9985
9986 #define BKA_AUTOCOLOR (-1)
9987 #define BKA_MAXBUTTONID 7999
9988
9989 #define BKS_BACKPAGESBR 0x0001
9990 #define BKS_BACKPAGESBL 0x0002
9991 #define BKS_BACKPAGESTR 0x0004
9992 #define BKS_BACKPAGESTL 0x0008
9993
9994 #define BKS_MAJORTABRIGHT 0x0010
9995 #define BKS_MAJORTABLEFT 0x0020
9996 #define BKS_MAJORTABTOP 0x0040
9997 #define BKS_MAJORTABBOTTOM 0x0080
9998
9999 #define BKS_SQUARETABS 0x0000
10000 #define BKS_ROUNDEDTABS 0x0100
10001 #define BKS_POLYGONTABS 0x0200
10002
10003 #define BKS_SOLIDBIND 0x0000
10004 #define BKS_SPIRALBIND 0x0400
10005
10006 #define BKS_STATUSTEXTLEFT 0x0000
10007 #define BKS_STATUSTEXTRIGHT 0x1000
10008 #define BKS_STATUSTEXTCENTER 0x2000
10009
10010 #define BKS_TABTEXTLEFT 0x0000
10011 #define BKS_TABTEXTRIGHT 0x4000
10012 #define BKS_TABTEXTCENTER 0x8000
10013
10014 #define BKS_BUTTONAREA 0x0200
10015 #define BKS_TABBEDDIALOG 0x0800
10016
10017 #define BKA_BACKGROUNDPAGECOLORINDEX 0x0001
10018 #define BKA_BACKGROUNDPAGECOLOR 0x0002
10019 #define BKA_BACKGROUNDMAJORCOLORINDEX 0x0003
10020 #define BKA_BACKGROUNDMAJORCOLOR 0x0004
10021 #define BKA_BACKGROUNDMINORCOLORINDEX 0x0005
10022 #define BKA_BACKGROUNDMINORCOLOR 0x0006
10023 #define BKA_FOREGROUNDMAJORCOLORINDEX 0x0007
10024 #define BKA_FOREGROUNDMAJORCOLOR 0x0008
10025 #define BKA_FOREGROUNDMINORCOLORINDEX 0x0009
10026 #define BKA_FOREGROUNDMINORCOLOR 0x000a
10027
10028 #define BOOKERR_INVALID_PARAMETERS (-1)
10029
10030
10031 typedef struct _BOOKTEXT
10032 {
10033 PSZ pString;
10034 ULONG textLen;
10035 } BOOKTEXT;
10036 typedef BOOKTEXT *PBOOKTEXT;
10037
10038 typedef struct _NOTEBOOKBUTTON
10039 {
10040 PSZ pszText;
10041 ULONG idButton;
10042 LHANDLE hImage;
10043 LONG flStyle;
10044 } NOTEBOOKBUTTON;
10045 typedef NOTEBOOKBUTTON *PNOTEBOOKBUTTON;
10046
10047 typedef struct _DELETENOTIFY
10048 {
10049 HWND hwndBook;
10050 HWND hwndPage;
10051 ULONG ulAppPageData;
10052 HBITMAP hbmTab;
10053 } DELETENOTIFY;
10054 typedef DELETENOTIFY *PDELETENOTIFY;
10055
10056 typedef struct _PAGESELECTNOTIFY
10057 {
10058 HWND hwndBook;
10059 ULONG ulPageIdCur;
10060 ULONG ulPageIdNew;
10061 } PAGESELECTNOTIFY;
10062 typedef PAGESELECTNOTIFY *PPAGESELECTNOTIFY;
10063
10064 typedef struct _BOOKPAGEINFO
10065 {
10066 ULONG cb;
10067 ULONG fl;
10068 BOOL bLoadDlg;
10069 ULONG ulPageData;
10070 HWND hwndPage;
10071 PFN pfnPageDlgProc;
10072 ULONG idPageDlg;
10073 HMODULE hmodPageDlg;
10074 PVOID pPageDlgCreateParams;
10075 PDLGTEMPLATE pdlgtPage;
10076 ULONG cbStatusLine;
10077 PSZ pszStatusLine;
10078 HBITMAP hbmMajorTab;
10079 HBITMAP hbmMinorTab;
10080 ULONG cbMajorTab;
10081 PSZ pszMajorTab;
10082 ULONG cbMinorTab;
10083 PSZ pszMinorTab;
10084 PVOID pBidiInfo;
10085 } BOOKPAGEINFO;
10086 typedef BOOKPAGEINFO *PBOOKPAGEINFO;
10087
10088 #endif /* INCL_WINSTDBOOK */
10089
10090 /* -------------------------- DRAG AND DROP ------------------------------- */
10091
10092 #if defined (INCL_WINSTDDRAG)
10093
10094 #define PMERR_NOT_DRAGGING 0x1f00
10095 #define PMERR_ALREADY_DRAGGING 0x1f01
10096
10097 #define WM_DRAGFIRST 0x0310
10098 #define WM_DRAGLAST 0x032f
10099
10100 #define DM_DROP 0x032f
10101 #define DM_DRAGOVER 0x032e
10102 #define DM_DRAGLEAVE 0x032d
10103 #define DM_DROPHELP 0x032c
10104 #define DM_ENDCONVERSATION 0x032b
10105 #define DM_PRINT 0x032a
10106 #define DM_RENDER 0x0329
10107 #define DM_RENDERCOMPLETE 0x0328
10108 #define DM_RENDERPREPARE 0x0327
10109 #define DM_DRAGFILECOMPLETE 0x0326
10110 #define DM_EMPHASIZETARGET 0x0325
10111 #define DM_DRAGERROR 0x0324
10112 #define DM_FILERENDERED 0x0323
10113 #define DM_RENDERFILE 0x0322
10114 #define DM_DRAGOVERNOTIFY 0x0321
10115 #define DM_PRINTOBJECT 0x0320
10116 #define DM_DISCARDOBJECT 0x031f
10117 #define DM_DROPNOTIFY 0x031e
10118
10119 #define MSGF_DRAG 0x0010
10120
10121 #define DC_OPEN 0x0001
10122 #define DC_REF 0x0002
10123 #define DC_GROUP 0x0004
10124 #define DC_CONTAINER 0x0008
10125 #define DC_PREPARE 0x0010
10126 #define DC_REMOVEABLEMEDIA 0x0020
10127
10128 #define DF_MOVE 0x0001
10129 #define DF_SOURCE 0x0002
10130 #define DF_SUCCESSFUL 0x0004
10131
10132 #define DFF_MOVE 1
10133 #define DFF_COPY 2
10134 #define DFF_DELETE 3
10135
10136 #define DGS_DRAGINPROGRESS 0x0001
10137 #define DGS_LAZYDRAGINPROGRESS 0x0002
10138
10139 #define DME_IGNOREABORT 1
10140 #define DME_IGNORECONTINUE 2
10141 #define DME_REPLACE 3
10142 #define DME_RETRY 4
10143
10144 #define DMFL_TARGETSUCCESSFUL 0x0001
10145 #define DMFL_TARGETFAIL 0x0002
10146 #define DMFL_NATIVERENDER 0x0004
10147 #define DMFL_RENDERRETRY 0x0008
10148 #define DMFL_RENDEROK 0x0010
10149 #define DMFL_RENDERFAIL 0x0020
10150
10151 #define DO_DEFAULT 0xbffe
10152 #define DO_UNKNOWN 0xbfff
10153 #define DO_COPYABLE 0x0001
10154 #define DO_MOVEABLE 0x0002
10155 #define DO_LINKABLE 0x0004
10156 #define DO_CREATEABLE 0x0008
10157 #define DO_CREATEPROGRAMOBJECTABLE 0x0010
10158
10159 #define DO_COPY 0x0010
10160 #define DO_MOVE 0x0020
10161 #define DO_LINK 0x0018
10162 #define DO_CREATE 0x0040
10163 #define DO_CREATEPROGRAMOBJECT 0x0080
10164
10165 #define DOR_NODROP 0x0000
10166 #define DOR_DROP 0x0001
10167 #define DOR_NODROPOP 0x0002
10168 #define DOR_NEVERDROP 0x0003
10169
10170 #define DRG_ICON 0x0001
10171 #define DRG_BITMAP 0x0002
10172 #define DRG_POLYGON 0x0004
10173 #define DRG_STRETCH 0x0008
10174 #define DRG_TRANSPARENT 0x0010
10175 #define DRG_CLOSED 0x0020
10176 #define DRG_MINIBITMAP 0x0040
10177
10178 #define DRR_SOURCE 1
10179 #define DRR_TARGET 2
10180 #define DRR_ABORT 3
10181
10182 #define DRT_ASM "Assembler Code"
10183 #define DRT_BASIC "BASIC Code"
10184 #define DRT_BINDATA "Binary Data"
10185 #define DRT_BITMAP "Bitmap"
10186 #define DRT_C "C Code"
10187 #define DRT_COBOL "COBOL Code"
10188 #define DRT_DLL "Dynamic Link Library"
10189 #define DRT_DOSCMD "DOS Command File"
10190 #define DRT_EXE "Executable"
10191 #define DRT_FORTRAN "FORTRAN Code"
10192 #define DRT_ICON "Icon"
10193 #define DRT_LIB "Library"
10194 #define DRT_METAFILE "Metafile"
10195 #define DRT_OS2CMD "OS/2 Command File"
10196 #define DRT_PASCAL "Pascal Code"
10197 #define DRT_RESOURCE "Resource File"
10198 #define DRT_TEXT "Plain Text"
10199 #define DRT_UNKNOWN "Unknown"
10200
10201 typedef LHANDLE HSTR;
10202
10203 typedef struct _DRAGIMAGE
10204 {
10205 USHORT cb;
10206 USHORT cptl;
10207 LHANDLE hImage;
10208 SIZEL sizlStretch;
10209 ULONG fl;
10210 SHORT cxOffset;
10211 SHORT cyOffset;
10212 } DRAGIMAGE;
10213 typedef DRAGIMAGE *PDRAGIMAGE;
10214
10215 typedef struct _DRAGINFO
10216 {
10217 ULONG cbDraginfo;
10218 USHORT cbDragitem;
10219 USHORT usOperation;
10220 HWND hwndSource;
10221 SHORT xDrop;
10222 SHORT yDrop;
10223 USHORT cditem;
10224 USHORT usReserved;
10225 } DRAGINFO;
10226 typedef DRAGINFO *PDRAGINFO;
10227
10228 typedef struct _DRAGITEM
10229 {
10230 HWND hwndItem;
10231 ULONG ulItemID;
10232 HSTR hstrType;
10233 HSTR hstrRMF;
10234 HSTR hstrContainerName;
10235 HSTR hstrSourceName;
10236 HSTR hstrTargetName;
10237 SHORT cxOffset;
10238 SHORT cyOffset;
10239 USHORT fsControl;
10240 USHORT fsSupportedOps;
10241 } DRAGITEM;
10242 typedef DRAGITEM *PDRAGITEM;
10243
10244 typedef struct _DRAGTRANSFER
10245 {
10246 ULONG cb;
10247 HWND hwndClient;
10248 PDRAGITEM pditem;
10249 HSTR hstrSelectedRMF;
10250 HSTR hstrRenderToName;
10251 ULONG ulTargetInfo;
10252 USHORT usOperation;
10253 USHORT fsReply;
10254 } DRAGTRANSFER;
10255 typedef DRAGTRANSFER *PDRAGTRANSFER;
10256
10257 typedef struct _RENDERFILE
10258 {
10259 HWND hwndDragFiles;
10260 HSTR hstrSource;
10261 HSTR hstrTarget;
10262 USHORT fMove;
10263 USHORT usRsvd;
10264 } RENDERFILE;
10265 typedef RENDERFILE *PRENDERFILE;
10266
10267
10268 BOOL DrgAcceptDroppedFiles (HWND hwnd, PCSZ pszPath, PCSZ pszTypes,
10269 ULONG ulDefaultOp, ULONG ulReserved);
10270 BOOL DrgAccessDraginfo (PDRAGINFO pdinfo);
10271 HSTR DrgAddStrHandle (PCSZ psz);
10272 PDRAGINFO DrgAllocDraginfo (ULONG cDitem);
10273 PDRAGTRANSFER DrgAllocDragtransfer (ULONG cdxfer);
10274 BOOL DrgCancelLazyDrag (VOID);
10275 BOOL DrgDeleteDraginfoStrHandles (PDRAGINFO pdinfo);
10276 BOOL DrgDeleteStrHandle (HSTR hstr);
10277 HWND DrgDrag (HWND hwndSource, PDRAGINFO pdinfo, PDRAGIMAGE pdimg,
10278 ULONG cdimg, LONG vkTerminate, PVOID pReserved);
10279 BOOL DrgDragFiles (HWND hwnd, PSZ *apszFiles, PSZ *apszTypes, PSZ *apszTargets,
10280 ULONG cFiles, HPOINTER hptrDrag, ULONG vkTerm, BOOL fSourceRender,
10281 ULONG ulReserved);
10282 BOOL DrgFreeDraginfo (PDRAGINFO pdinfo);
10283 BOOL DrgFreeDragtransfer (PDRAGTRANSFER pdxfer);
10284 HPS DrgGetPS (HWND hwnd);
10285 BOOL DrgLazyDrag (HWND hwndSource, PDRAGINFO pDraginfo, PDRAGIMAGE pdimg,
10286 ULONG cdimg, PVOID pReserved);
10287 BOOL DrgLazyDrop (HWND hwndTarget, ULONG ulOperation, PPOINTL pptlDrop);
10288 BOOL DrgPostTransferMsg (HWND hwnd, ULONG msg, PDRAGTRANSFER pdxfer, ULONG fl,
10289 ULONG ulReserved, BOOL fRetry);
10290 BOOL DrgPushDraginfo (PDRAGINFO pdinfo, HWND hwndDest);
10291 PDRAGINFO DrgQueryDraginfoPtr (PDRAGINFO pReserved);
10292 PDRAGINFO DrgQueryDraginfoPtrFromHwnd (HWND hwndSource);
10293 PDRAGINFO DrgQueryDraginfoPtrFromDragitem (__const__ DRAGITEM *pDragitem);
10294 BOOL DrgQueryDragitem (PDRAGINFO pdinfo, ULONG cbBuffer, PDRAGITEM pditem,
10295 ULONG iItem);
10296 ULONG DrgQueryDragitemCount (PDRAGINFO pdinfo);
10297 PDRAGITEM DrgQueryDragitemPtr (PDRAGINFO pdinfo, ULONG ulIndex);
10298 ULONG DrgQueryDragStatus (VOID);
10299 BOOL DrgQueryNativeRMF (PDRAGITEM pditem, ULONG cbBuffer, PCHAR pBuffer);
10300 ULONG DrgQueryNativeRMFLen (PDRAGITEM pditem);
10301 ULONG DrgQueryStrName (HSTR hstr, ULONG cbBuffer, PSZ pBuffer);
10302 ULONG DrgQueryStrNameLen (HSTR hstr);
10303 BOOL DrgQueryTrueType (PDRAGITEM pditem, ULONG cbBuffer, PSZ pBuffer);
10304 ULONG DrgQueryTrueTypeLen (PDRAGITEM pditem);
10305 PDRAGINFO DrgReallocDraginfo (PDRAGINFO pDraginfoOld, ULONG cditem);
10306 BOOL DrgReleasePS (HPS hps);
10307 MRESULT DrgSendTransferMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
10308 BOOL DrgSetDragImage (PDRAGINFO pdinfo, PDRAGIMAGE pdimg, ULONG cdimg,
10309 PVOID pReserved);
10310 BOOL DrgSetDragitem (PDRAGINFO pdinfo, PDRAGITEM pditem, ULONG cbBuffer,
10311 ULONG iItem);
10312 BOOL DrgSetDragPointer (PDRAGINFO pdinfo, HPOINTER hptr);
10313 BOOL DrgVerifyNativeRMF (PDRAGITEM pditem, PCSZ pszRMF);
10314 BOOL DrgVerifyRMF (PDRAGITEM pditem, PCSZ pszMech, PCSZ pszFmt);
10315 BOOL DrgVerifyTrueType (PDRAGITEM pditem, PCSZ pszType);
10316 BOOL DrgVerifyType (PDRAGITEM pditem, PCSZ pszType);
10317 BOOL DrgVerifyTypeSet (PDRAGITEM pditem, PCSZ pszType, ULONG cbMatch,
10318 PSZ pszMatch);
10319
10320 #endif /* INCL_WINSTDDRAG */
10321
10322 /* -------------------------- VALUE SET ----------------------------------- */
10323
10324 #if defined (INCL_WINSTDVALSET)
10325
10326 #define VDA_ITEM 0x0001
10327 #define VDA_ITEMBACKGROUND 0x0002
10328 #define VDA_SURROUNDING 0x0003
10329 #define VDA_BACKGROUND 0x0004
10330
10331 #define VIA_BITMAP 0x0001
10332 #define VIA_ICON 0x0002
10333 #define VIA_TEXT 0x0004
10334 #define VIA_RGB 0x0008
10335 #define VIA_COLORINDEX 0x0010
10336 #define VIA_OWNERDRAW 0x0020
10337 #define VIA_DISABLED 0x0040
10338 #define VIA_DRAGGABLE 0x0080
10339 #define VIA_DROPONABLE 0x0100
10340
10341 #define VM_QUERYITEM 0x0375
10342 #define VM_QUERYITEMATTR 0x0376
10343 #define VM_QUERYMETRICS 0x0377
10344 #define VM_QUERYSELECTEDITEM 0x0378
10345 #define VM_SELECTITEM 0x0379
10346 #define VM_SETITEM 0x037a
10347 #define VM_SETITEMATTR 0x037b
10348 #define VM_SETMETRICS 0x037c
10349
10350 #define VMA_ITEMSIZE 0x0001
10351 #define VMA_ITEMSPACING 0x0002
10352
10353 #define VN_SELECT 0x0078
10354 #define VN_ENTER 0x0079
10355 #define VN_DRAGLEAVE 0x007a
10356 #define VN_DRAGOVER 0x007b
10357 #define VN_DROP 0x007c
10358 #define VN_DROPHELP 0x007d
10359 #define VN_INITDRAG 0x007e
10360 #define VN_SETFOCUS 0x007f
10361 #define VN_KILLFOCUS 0x0080
10362 #define VN_HELP 0x0081
10363
10364 #define VS_BITMAP 0x0001
10365 #define VS_ICON 0x0002
10366 #define VS_TEXT 0x0004
10367 #define VS_RGB 0x0008
10368 #define VS_COLORINDEX 0x0010
10369 #define VS_BORDER 0x0020
10370 #define VS_ITEMBORDER 0x0040
10371 #define VS_SCALEBITMAPS 0x0080
10372 #define VS_RIGHTTOLEFT 0x0100
10373 #define VS_OWNERDRAW 0x0200
10374
10375 #define VSERR_INVALID_PARAMETERS (-1)
10376
10377
10378 typedef struct _VSCDATA
10379 {
10380 ULONG cbSize;
10381 USHORT usRowCount;
10382 USHORT usColumnCount;
10383 } VSCDATA;
10384 typedef VSCDATA *PVSCDATA;
10385
10386 typedef struct _VSDRAGINIT
10387 {
10388 HWND hwnd;
10389 LONG x;
10390 LONG y;
10391 LONG cx;
10392 LONG cy;
10393 USHORT usRow;
10394 USHORT usColumn;
10395 } VSDRAGINIT;
10396 typedef VSDRAGINIT *PVSDRAGINIT;
10397
10398 typedef struct _VSDRAGINFO
10399 {
10400 PDRAGINFO pDragInfo;
10401 USHORT usRow;
10402 USHORT usColumn;
10403 } VSDRAGINFO;
10404 typedef VSDRAGINFO *PVSDRAGINFO;
10405
10406 typedef struct _VSTEXT
10407 {
10408 PSZ pszItemText;
10409 ULONG ulBufLen;
10410 } VSTEXT;
10411 typedef VSTEXT *PVSTEXT;
10412
10413 #endif /* INCL_WINSTDVALSET */
10414
10415 /* ---------------------------- CONTAINER --------------------------------- */
10416
10417 #if defined (INCL_WINSTDCNR)
10418
10419 #define CA_CONTAINERTITLE 0x00000200
10420 #define CA_TITLESEPARATOR 0x00000400
10421 #define CA_TITLELEFT 0x00000800
10422 #define CA_TITLERIGHT 0x00001000
10423 #define CA_TITLECENTER 0x00002000
10424 #define CA_OWNERDRAW 0x00004000
10425 #define CA_DETAILSVIEWTITLES 0x00008000
10426 #define CA_ORDEREDTARGETEMPH 0x00010000
10427 #define CA_DRAWBITMAP 0x00020000
10428 #define CA_DRAWICON 0x00040000
10429 #define CA_TITLEREADONLY 0x00080000
10430 #define CA_OWNERPAINTBACKGROUND 0x00100000
10431 #define CA_MIXEDTARGETEMPH 0x00200000
10432 #define CA_TREELINE 0x00400000
10433
10434 #define CCS_EXTENDSEL 0x0001
10435 #define CCS_MULTIPLESEL 0x0002
10436 #define CCS_SINGLESEL 0x0004
10437 #define CCS_AUTOPOSITION 0x0008
10438 #define CCS_VERIFYPOINTERS 0x0010
10439 #define CCS_READONLY 0x0020
10440 #define CCS_MINIRECORDCORE 0x0040
10441 #define CCS_MINIICONS 0x0800
10442 #define CCS_NOCONTROLPTR 0x1000
10443
10444 #define CFA_LEFT 0x00000001
10445 #define CFA_RIGHT 0x00000002
10446 #define CFA_CENTER 0x00000004
10447 #define CFA_TOP 0x00000008
10448 #define CFA_VCENTER 0x00000010
10449 #define CFA_BOTTOM 0x00000020
10450 #define CFA_INVISIBLE 0x00000040
10451 #define CFA_BITMAPORICON 0x00000100
10452 #define CFA_SEPARATOR 0x00000200
10453 #define CFA_HORZSEPARATOR 0x00000400
10454 #define CFA_STRING 0x00000800
10455 #define CFA_OWNER 0x00001000
10456 #define CFA_DATE 0x00002000
10457 #define CFA_TIME 0x00004000
10458 #define CFA_FIREADONLY 0x00008000
10459 #define CFA_FITITLEREADONLY 0x00010000
10460 #define CFA_ULONG 0x00020000
10461 #define CFA_RANGE 0x00040000
10462 #define CFA_NEWCOMP 0x00080000
10463 #define CFA_OBJECT 0x00100000
10464 #define CFA_LIST 0x00200000
10465 #define CFA_CLASS 0x00400000
10466 #define CFA_IGNORE 0x80000000
10467
10468 #define CID_LEFTCOLTITLEWND 0x7ff0
10469 #define CID_RIGHTCOLTITLEWND 0x7ff1
10470 #define CID_BLANKBOX 0x7ff2
10471 #define CID_HSCROLL 0x7ff3
10472 #define CID_RIGHTHSCROLL 0x7ff4
10473 #define CID_CNRTITLEWND 0x7ff5
10474 #define CID_LEFTDVWND 0x7ff7
10475 #define CID_RIGHTDVWND 0x7ff8
10476 #define CID_VSCROLL 0x7ff9
10477 #define CID_MLE 0x7ffa
10478
10479 #define CM_ALLOCDETAILFIELDINFO 0x0330
10480 #define CM_ALLOCRECORD 0x0331
10481 #define CM_ARRANGE 0x0332
10482 #define CM_ERASERECORD 0x0333
10483 #define CM_FILTER 0x0334
10484 #define CM_FREEDETAILFIELDINFO 0x0335
10485 #define CM_FREERECORD 0x0336
10486 #define CM_HORZSCROLLSPLITWINDOW 0x0337
10487 #define CM_INSERTDETAILFIELDINFO 0x0338
10488 #define CM_INSERTRECORD 0x0339
10489 #define CM_INVALIDATEDETAILFIELDINFO 0x033a
10490 #define CM_INVALIDATERECORD 0x033b
10491 #define CM_PAINTBACKGROUND 0x033c
10492 #define CM_QUERYCNRINFO 0x033d
10493 #define CM_QUERYDETAILFIELDINFO 0x033e
10494 #define CM_QUERYDRAGIMAGE 0x033f
10495 #define CM_QUERYRECORD 0x0340
10496 #define CM_QUERYRECORDEMPHASIS 0x0341
10497 #define CM_QUERYRECORDFROMRECT 0x0342
10498 #define CM_QUERYRECORDRECT 0x0343
10499 #define CM_QUERYVIEWPORTRECT 0x0344
10500 #define CM_REMOVEDETAILFIELDINFO 0x0345
10501 #define CM_REMOVERECORD 0x0346
10502 #define CM_SCROLLWINDOW 0x0347
10503 #define CM_SEARCHSTRING 0x0348
10504 #define CM_SETCNRINFO 0x0349
10505 #define CM_SETRECORDEMPHASIS 0x034a
10506 #define CM_SORTRECORD 0x034b
10507 #define CM_OPENEDIT 0x034c
10508 #define CM_CLOSEEDIT 0x034d
10509 #define CM_COLLAPSETREE 0x034e
10510 #define CM_EXPANDTREE 0x034f
10511 #define CM_QUERYRECORDINFO 0x0350
10512 #define CM_INSERTRECORDARRAY 0x0351
10513 #define CM_MOVETREE 0x0352
10514 #define CM_SETTEXTVISIBILITY 0x0353
10515 #define CM_SETGRIDINFO 0x0354
10516 #define CM_QUERYGRIDINFO 0x0355
10517 #define CM_SNAPTOGRID 0x0356
10518
10519 #define CMA_TOP 0x0001
10520 #define CMA_BOTTOM 0x0002
10521 #define CMA_LEFT 0x0004
10522 #define CMA_RIGHT 0x0008
10523 #define CMA_PERIMETER 0x0010
10524 #define CMA_USER 0x0020
10525
10526 #define CMA_FIRST 0x0010
10527 #define CMA_LAST 0x0020
10528 #define CMA_END 0x0040
10529 #define CMA_PREV 0x0080
10530 #define CMA_NEXT 0x0100
10531
10532 #define CMA_HORIZONTAL 0x0200
10533 #define CMA_VERTICAL 0x0400
10534 #define CMA_ICON 0x0800
10535 #define CMA_TEXT 0x1000
10536 #define CMA_PARTIAL 0x2000
10537 #define CMA_COMPLETE 0x4000
10538
10539 #define CMA_PARENT 0x0001
10540 #define CMA_FIRSTCHILD 0x0002
10541 #define CMA_LASTCHILD 0x0004
10542
10543 #define CMA_CNRTITLE 0x0001
10544 #define CMA_DELTA 0x0002
10545 #define CMA_FLWINDOWATTR 0x0004
10546 #define CMA_LINESPACING 0x0008
10547 #define CMA_PFIELDINFOLAST 0x0010
10548
10549 #define CMA_PSORTRECORD 0x0020
10550 #define CMA_PTLORIGIN 0x0040
10551 #define CMA_SLBITMAPORICON 0x0080
10552 #define CMA_XVERTSPLITBAR 0x0100
10553 #define CMA_PFIELDINFOOBJECT 0x0200
10554
10555 #define CMA_TREEICON 0x0400
10556 #define CMA_TREEBITMAP 0x0800
10557 #define CMA_CXTREEINDENT 0x1000
10558 #define CMA_CXTREELINE 0x2000
10559 #define CMA_SLTREEBITMAPORICON 0x4000
10560
10561 #define CMA_ITEMORDER 0x0001
10562 #define CMA_WINDOW 0x0002
10563 #define CMA_WORKSPACE 0x0004
10564 #define CMA_ZORDER 0x0008
10565
10566 #define CMA_DELTATOP 0x0001
10567 #define CMA_DELTABOT 0x0002
10568 #define CMA_DELTAHOME 0x0004
10569 #define CMA_DELTAEND 0x0008
10570
10571 #define CMA_NOREPOSITION 0x0001
10572 #define CMA_REPOSITION 0x0002
10573 #define CMA_TEXTCHANGED 0x0004
10574 #define CMA_ERASE 0x0008
10575 #define CMA_NOTEXTCHANGED 0x0010
10576 #define CMA_FILTER 0x1000
10577
10578 #define CMA_FREE 0x0001
10579 #define CMA_INVALIDATE 0x0002
10580
10581 #define CMA_ARRANGESTANDARD 0x0000
10582 #define CMA_ARRANGEGRID 0x0001
10583 #define CMA_ARRANGESELECTED 0x0002
10584
10585 #define CMA_AVAIL 0x0001
10586 #define CMA_UNAVAIL 0x0002
10587
10588 #define CN_DRAGAFTER 0x0065
10589 #define CN_DRAGLEAVE 0x0066
10590 #define CN_DRAGOVER 0x0067
10591 #define CN_DROP 0x0068
10592 #define CN_DROPHELP 0x0069
10593 #define CN_ENTER 0x006a
10594 #define CN_INITDRAG 0x006b
10595 #define CN_EMPHASIS 0x006c
10596 #define CN_KILLFOCUS 0x006d
10597 #define CN_SCROLL 0x006e
10598 #define CN_QUERYDELTA 0x006f
10599 #define CN_SETFOCUS 0x0070
10600 #define CN_REALLOCPSZ 0x0071
10601 #define CN_BEGINEDIT 0x0072
10602 #define CN_ENDEDIT 0x0073
10603 #define CN_COLLAPSETREE 0x0074
10604 #define CN_EXPANDTREE 0x0075
10605 #define CN_HELP 0x0076
10606 #define CN_CONTEXTMENU 0x0077
10607 #define CN_VERIFYEDIT 0x0086
10608 #define CN_PICKUP 0x0087
10609 #define CN_DROPNOTIFY 0x0088
10610 #define CN_GRIDRESIZED 0x0089
10611
10612 #define CRA_SELECTED 0x00000001
10613 #define CRA_TARGET 0x00000002
10614 #define CRA_CURSORED 0x00000004
10615 #define CRA_INUSE 0x00000008
10616 #define CRA_FILTERED 0x00000010
10617 #define CRA_DROPONABLE 0x00000020
10618 #define CRA_RECORDREADONLY 0x00000040
10619 #define CRA_EXPANDED 0x00000080
10620 #define CRA_COLLAPSED 0x00000100
10621 #define CRA_PICKED 0x00000200
10622 #define CRA_LOCKED 0x00000400
10623 #define CRA_DISABLED 0x00001000
10624 #define CRA_SOURCE 0x00004000
10625 #define CRA_IGNORE 0x00008000
10626 #define CRA_OWNERFREE 0x00010000
10627 #define CRA_OWNERDRAW 0x00020000
10628
10629 #define CV_TEXT 0x00000001
10630 #define CV_NAME 0x00000002
10631 #define CV_ICON 0x00000004
10632 #define CV_DETAIL 0x00000008
10633 #define CV_FLOW 0x00000010
10634 #define CV_MINI 0x00000020
10635 #define CV_TREE 0x00000040
10636 #define CV_GRID 0x00000080
10637 #define CV_EXACTLENGTH 0x10000000
10638
10639 #define PMERR_NOFILTERED_ITEMS 0x1f02
10640 #define PMERR_COMPARISON_FAILED 0x1f03
10641 #define PMERR_RECORD_CURRENTLY_INSERTED 0x1f04
10642 #define PMERR_FI_CURRENTLY_INSERTED 0x1f05
10643
10644
10645 typedef struct _TREEITEMDESC
10646 {
10647 HBITMAP hbmExpanded;
10648 HBITMAP hbmCollapsed;
10649 HPOINTER hptrExpanded;
10650 HPOINTER hptrCollapsed;
10651 } TREEITEMDESC;
10652 typedef TREEITEMDESC *PTREEITEMDESC;
10653
10654 typedef struct _FIELDINFO
10655 {
10656 ULONG cb;
10657 ULONG flData;
10658 ULONG flTitle;
10659 PVOID pTitleData;
10660 ULONG offStruct;
10661 PVOID pUserData;
10662 struct _FIELDINFO *pNextFieldInfo;
10663 ULONG cxWidth;
10664 } FIELDINFO;
10665 typedef FIELDINFO *PFIELDINFO;
10666
10667 typedef struct _RECORDCORE
10668 {
10669 ULONG cb;
10670 ULONG flRecordAttr;
10671 POINTL ptlIcon;
10672 struct _RECORDCORE *preccNextRecord;
10673 PSZ pszIcon;
10674 HPOINTER hptrIcon;
10675 HPOINTER hptrMiniIcon;
10676 HBITMAP hbmBitmap;
10677 HBITMAP hbmMiniBitmap;
10678 PTREEITEMDESC pTreeItemDesc;
10679 PSZ pszText;
10680 PSZ pszName;
10681 PSZ pszTree;
10682 } RECORDCORE;
10683 typedef RECORDCORE *PRECORDCORE;
10684
10685 typedef struct _MINIRECORDCORE
10686 {
10687 ULONG cb;
10688 ULONG flRecordAttr;
10689 POINTL ptlIcon;
10690 struct _MINIRECORDCORE *preccNextRecord;
10691 PSZ pszIcon;
10692 HPOINTER hptrIcon;
10693 } MINIRECORDCORE;
10694 typedef MINIRECORDCORE *PMINIRECORDCORE;
10695
10696 typedef struct _TREEMOVE
10697 {
10698 PRECORDCORE preccMove;
10699 PRECORDCORE preccNewParent;
10700 PRECORDCORE pRecordOrder;
10701 BOOL flMoveSiblings;
10702 } TREEMOVE;
10703 typedef TREEMOVE *PTREEMOVE;
10704
10705 typedef struct _CNRINFO
10706 {
10707 ULONG cb;
10708 PVOID pSortRecord;
10709 PFIELDINFO pFieldInfoLast;
10710 PFIELDINFO pFieldInfoObject;
10711 PSZ pszCnrTitle;
10712 ULONG flWindowAttr;
10713 POINTL ptlOrigin;
10714 ULONG cDelta;
10715 ULONG cRecords;
10716 SIZEL slBitmapOrIcon;
10717 SIZEL slTreeBitmapOrIcon;
10718 HBITMAP hbmExpanded;
10719 HBITMAP hbmCollapsed;
10720 HPOINTER hptrExpanded;
10721 HPOINTER hptrCollapsed;
10722 LONG cyLineSpacing;
10723 LONG cxTreeIndent;
10724 LONG cxTreeLine;
10725 ULONG cFields;
10726 LONG xVertSplitbar;
10727 } CNRINFO;
10728 typedef CNRINFO *PCNRINFO;
10729
10730 typedef struct _GRIDSQUARE
10731 {
10732 ULONG ulNumber;
10733 ULONG ulState;
10734 RECTL rctlSquare;
10735 } GRIDSQUARE;
10736 typedef GRIDSQUARE *PGRIDSQUARE;
10737
10738 typedef struct _GRIDINFO
10739 {
10740 ULONG cb;
10741 SHORT cxGrid;
10742 SHORT cyGrid;
10743 SHORT sGridRows;
10744 SHORT sGridCols;
10745 LONG cGridSquares;
10746 PGRIDSQUARE pGrid;
10747 } GRIDINFO;
10748 typedef GRIDINFO *PGRIDINFO;
10749
10750 typedef struct _CDATE
10751 {
10752 UCHAR day;
10753 UCHAR month;
10754 USHORT year;
10755 } CDATE;
10756 typedef CDATE *PCDATE;
10757
10758 typedef struct _CTIME
10759 {
10760 UCHAR hours;
10761 UCHAR minutes;
10762 UCHAR seconds;
10763 UCHAR ucReserved;
10764 } CTIME;
10765 typedef CTIME *PCTIME;
10766
10767 typedef struct _CNRDRAGINIT
10768 {
10769 HWND hwndCnr;
10770 PRECORDCORE pRecord;
10771 LONG x;
10772 LONG y;
10773 LONG cx;
10774 LONG cy;
10775 } CNRDRAGINIT;
10776 typedef CNRDRAGINIT *PCNRDRAGINIT;
10777
10778 typedef struct _FIELDINFOINSERT
10779 {
10780 ULONG cb;
10781 PFIELDINFO pFieldInfoOrder;
10782 ULONG fInvalidateFieldInfo;
10783 ULONG cFieldInfoInsert;
10784 } FIELDINFOINSERT;
10785 typedef FIELDINFOINSERT *PFIELDINFOINSERT;
10786
10787 typedef struct _RECORDINSERT
10788 {
10789 ULONG cb;
10790 PRECORDCORE pRecordOrder;
10791 PRECORDCORE pRecordParent;
10792 ULONG fInvalidateRecord;
10793 ULONG zOrder;
10794 ULONG cRecordsInsert;
10795 } RECORDINSERT;
10796 typedef RECORDINSERT *PRECORDINSERT;
10797
10798 typedef struct _QUERYRECFROMRECT
10799 {
10800 ULONG cb;
10801 RECTL rect;
10802 ULONG fsSearch;
10803 } QUERYRECFROMRECT;
10804 typedef QUERYRECFROMRECT *PQUERYRECFROMRECT;
10805
10806 typedef struct _QUERYRECORDRECT
10807 {
10808 ULONG cb;
10809 PRECORDCORE pRecord;
10810 ULONG fRightSplitWindow;
10811 ULONG fsExtent;
10812 } QUERYRECORDRECT;
10813 typedef QUERYRECORDRECT *PQUERYRECORDRECT;
10814
10815 typedef struct _SEARCHSTRING
10816 {
10817 ULONG cb;
10818 PSZ pszSearch;
10819 ULONG fsPrefix;
10820 ULONG fsCaseSensitive;
10821 ULONG usView;
10822 } SEARCHSTRING;
10823 typedef SEARCHSTRING *PSEARCHSTRING;
10824
10825 typedef struct _CNRDRAGINFO
10826 {
10827 PDRAGINFO pDragInfo;
10828 PRECORDCORE pRecord;
10829 } CNRDRAGINFO;
10830 typedef CNRDRAGINFO *PCNRDRAGINFO;
10831
10832 typedef struct _CNRLAZYDRAGINFO
10833 {
10834 PDRAGINFO pDragInfo;
10835 PRECORDCORE pRecord;
10836 HWND hwndTarget;
10837 } CNRLAZYDRAGINFO;
10838 typedef CNRLAZYDRAGINFO *PCNRLAZYDRAGINFO;
10839
10840 typedef struct _NOTIFYRECORDEMPHASIS
10841 {
10842 HWND hwndCnr;
10843 PRECORDCORE pRecord;
10844 ULONG fEmphasisMask;
10845 } NOTIFYRECORDEMPHASIS;
10846 typedef NOTIFYRECORDEMPHASIS *PNOTIFYRECORDEMPHASIS;
10847
10848 typedef struct _NOTIFYRECORDENTER
10849 {
10850 HWND hwndCnr;
10851 ULONG fKey;
10852 PRECORDCORE pRecord;
10853 } NOTIFYRECORDENTER;
10854 typedef NOTIFYRECORDENTER *PNOTIFYRECORDENTER;
10855
10856 typedef struct _NOTIFYDELTA
10857 {
10858 HWND hwndCnr;
10859 ULONG fDelta;
10860 } NOTIFYDELTA;
10861 typedef NOTIFYDELTA *PNOTIFYDELTA;
10862
10863 typedef struct _NOTIFYSCROLL
10864 {
10865 HWND hwndCnr;
10866 LONG lScrollInc;
10867 ULONG fScroll;
10868 } NOTIFYSCROLL;
10869 typedef NOTIFYSCROLL *PNOTIFYSCROLL;
10870
10871 typedef struct _CNREDITDATA
10872 {
10873 ULONG cb;
10874 HWND hwndCnr;
10875 PRECORDCORE pRecord;
10876 PFIELDINFO pFieldInfo;
10877 PSZ *ppszText;
10878 ULONG cbText;
10879 ULONG id;
10880 } CNREDITDATA;
10881 typedef CNREDITDATA *PCNREDITDATA;
10882
10883 typedef struct _OWNERBACKGROUND
10884 {
10885 HWND hwnd;
10886 HPS hps;
10887 RECTL rclBackground;
10888 LONG idWindow;
10889 } OWNERBACKGROUND;
10890 typedef OWNERBACKGROUND *POWNERBACKGROUND;
10891
10892 typedef struct _CNRDRAWITEMINFO
10893 {
10894 PRECORDCORE pRecord;
10895 PFIELDINFO pFieldInfo;
10896 } CNRDRAWITEMINFO;
10897 typedef CNRDRAWITEMINFO *PCNRDRAWITEMINFO;
10898
10899 #endif /* INCL_WINSTDCNR */
10900
10901 /* ------------------------- WORKPLACE SHELL ------------------------------ */
10902
10903 #if defined (INCL_WPCLASS) || !defined (INCL_NOCOMMON)
10904
10905 #define CCHMAXCLASS 3
10906
10907 #define QC_First 0
10908 #define QC_Next 1
10909 #define QC_Last 2
10910 #define QC_FIRST QC_First
10911 #define QC_NEXT QC_Next
10912 #define QC_LAST QC_Last
10913
10914 #define CO_FAILIFEXISTS 0
10915 #define CO_REPLACEIFEXISTS 1
10916 #define CO_UPDATEIFEXISTS 2
10917
10918 #if !defined (LOCATION_DESKTOP)
10919 #define LOCATION_DESKTOP ((PSZ)0xffff0001)
10920 #endif
10921
10922 typedef struct _OBJCLASS
10923 {
10924 struct _OBJCLASS *pNext;
10925 PSZ pszClassName;
10926 PSZ pszModName;
10927 } OBJCLASS;
10928 typedef OBJCLASS *POBJCLASS;
10929
10930 HOBJECT WinCopyObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
10931 ULONG ulReserved);
10932 HOBJECT WinCreateObject (PCSZ pszClassName, PCSZ pszTitle, PCSZ pszSetupString,
10933 PCSZ pszLocation, ULONG ulFlags);
10934 HOBJECT WinCreateShadow (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
10935 ULONG ulReserved);
10936 BOOL WinDeregisterObjectClass (PCSZ pszClassName);
10937 BOOL WinDestroyObject (HOBJECT hObject);
10938 BOOL WinEnumObjectClasses (POBJCLASS pObjClass, PULONG pulSize);
10939 BOOL WinIsSOMDDReady (VOID);
10940 BOOL WinIsWPDServerReady (VOID);
10941 HOBJECT WinMoveObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
10942 ULONG ulReserved);
10943 BOOL WinOpenObject (HOBJECT hObject, ULONG ulView, BOOL fFlag);
10944 BOOL WinQueryActiveDesktopPathname (PSZ pszPathName, ULONG ulSize);
10945 HOBJECT WinQueryObject (PCSZ pszObjectID);
10946 BOOL WinQueryObjectPath (HOBJECT hobject, PSZ pszPathName, ULONG ulSize);
10947 BOOL WinRegisterObjectClass (PCSZ pszClassName, PCSZ pszModName);
10948 BOOL WinReplaceObjectClass (PCSZ pszOldClassName, PCSZ pszNewClassName,
10949 BOOL fReplace);
10950 ULONG WinRestartSOMDD (BOOL fState);
10951 ULONG WinRestartWPDServer (BOOL fState);
10952 BOOL WinSaveObject (HOBJECT hObject, BOOL fAsync);
10953 BOOL WinSetObjectData (HOBJECT hObject, PCSZ pszSetupString);
10954
10955 #endif /* INCL_WPCLASS || !INCL_NOCOMMON */
10956
10957 #if !defined (INCL_NOCOMMON)
10958
10959 BOOL WinFreeFileIcon (HPOINTER hptr);
10960 HPOINTER WinLoadFileIcon (PCSZ pszFileName, BOOL fPrivate);
10961 BOOL WinRestoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd);
10962 #if defined (INCL_WINPOINTERS)
10963 BOOL WinSetFileIcon (PCSZ pszFileName, __const__ ICONINFO *pIconInfo);
10964 #endif
10965 BOOL WinShutdownSystem (HAB hab, HMQ hmq);
10966 BOOL WinStoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd);
10967
10968 #endif /* !INCL_NOCOMMON */
10969
10970 /* ---------------------------- SPOOLER ----------------------------------- */
10971
10972 #if defined (INCL_SPL)
10973
10974 #define SPL_ERROR 0
10975 #define SPL_OK 1
10976
10977 #define SPL_INI_SPOOLER "PM_SPOOLER"
10978 #define SPL_INI_QUEUE "PM_SPOOLER_QUEUE"
10979 #define SPL_INI_PRINTER "PM_SPOOLER_PRINTER"
10980 #define SPL_INI_PRINTERDESCR "PM_SPOOLER_PRINTER_DESCR"
10981 #define SPL_INI_QUEUEDESCR "PM_SPOOLER_QUEUE_DESCR"
10982 #define SPL_INI_QUEUEDD "PM_SPOOLER_QUEUE_DD"
10983 #define SPL_INI_QUEUEDDDATA "PM_SPOOLER_QUEUE_DDDATA"
10984
10985 #define SPLC_ABORT 1
10986 #define SPLC_PAUSE 2
10987 #define SPLC_CONTINUE 3
10988
10989 #define SPLDATA_PRINTERJAM 0x0001
10990 #define SPLDATA_FORMCHGREQD 0x0002
10991 #define SPLDATA_CARTCHGREQD 0x0004
10992 #define SPLDATA_PENCHGREQD 0x0008
10993 #define SPLDATA_DATAERROR 0x0010
10994 #define SPLDATA_UNEXPECTERROR 0x0020
10995 #define SPLDATA_OTHER 0x8000
10996
10997 #define SPLINFO_QPERROR 0x0001
10998 #define SPLINFO_DDERROR 0x0002
10999 #define SPLINFO_SPLERROR 0x0004
11000 #define SPLINFO_OTHERERROR 0x0080
11001 #define SPLINFO_INFORMATION 0x0100
11002 #define SPLINFO_WARNING 0x0200
11003 #define SPLINFO_ERROR 0x0400
11004 #define SPLINFO_SEVERE 0x0800
11005 #define SPLINFO_USERINTREQD 0x1000
11006
11007 #define SPLPORT_VERSION_REGULAR 0
11008 #define SPLPORT_VERSION_VIRTUAL 1
11009
11010 #define SSQL_ERROR (-1)
11011
11012 #define QP_RAWDATA_BYPASS 0x0001
11013 #define QP_PRINT_SEPARATOR_PAGE 0x0002
11014
11015 #define QPDAT_ADDRESS 0
11016 #define QPDAT_DRIVER_NAME 1
11017 #define QPDAT_DRIVER_DATA 2
11018 #define QPDAT_DATA_TYPE 3
11019 #define QPDAT_COMMENT 4
11020 #define QPDAT_PROC_PARAMS 5
11021 #define QPDAT_SPL_PARAMS 6
11022 #define QPDAT_NET_PARAMS 7
11023 #define QPDAT_DOC_NAME 8
11024 #define QPDAT_QUEUE_NAME 9
11025 #define QPDAT_TOKEN 10
11026 #define QPDAT_JOBID 11
11027
11028 typedef LHANDLE HSPL;
11029 typedef LHANDLE HSTD;
11030 typedef HSTD *PHSTD;
11031 typedef PSZ *PQMOPENDATA;
11032 typedef unsigned long SPLERR;
11033
11034 typedef struct _SQPOPENDATA
11035 {
11036 PSZ pszLogAddress;
11037 PSZ pszDriverName;
11038 PDRIVDATA pdriv;
11039 PSZ pszDataType;
11040 PSZ pszComment;
11041 PSZ pszProcParams;
11042 PSZ pszSpoolParams;
11043 PSZ pszNetworkParams;
11044 PSZ pszDocName;
11045 PSZ pszQueueName;
11046 PSZ pszToken;
11047 USHORT idJobId;
11048 } SQPOPENDATA;
11049 typedef SQPOPENDATA *PSQPOPENDATA;
11050
11051
11052 BOOL SplStdClose (HDC hdc);
11053 BOOL SplStdDelete (HSTD hMetaFile);
11054 BOOL SplStdGetBits (HSTD hMetaFile, LONG offData, LONG cbData, PCH pchData);
11055 BOOL SplStdOpen (HDC hdc);
11056 LONG SplStdQueryLength (HSTD hMetaFile);
11057 BOOL SplStdStart (HDC hdc);
11058 HSTD SplStdStop (HDC hdc);
11059
11060 SPLERR SplControlDevice (PSZ pszComputerName, PSZ pszPortName,
11061 ULONG ulControl);
11062 SPLERR SplCopyJob (PCSZ pszSrcComputerName, PCSZ pszSrcQueueName,
11063 ULONG ulSrcJob, PCSZ pszTrgComputerName, PCSZ pszTrgQueueName,
11064 PULONG pulTrgJob);
11065 SPLERR SplCreateDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11066 ULONG cbBuf);
11067 SPLERR SplCreatePort (PCSZ pszComputerName, PCSZ pszPortName,
11068 PCSZ pszPortDriver, ULONG ulVersion, PVOID pBuf, ULONG cbBuf);
11069 SPLERR SplCreateQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11070 ULONG cbBuf);
11071 SPLERR SplDeleteDevice (PSZ pszComputerName, PSZ pszPrintDeviceName);
11072 SPLERR SplDeleteJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob);
11073 SPLERR SplDeletePort (PCSZ pszComputerName, PCSZ pszPortName);
11074 SPLERR SplDeleteQueue (PSZ pszComputerName, PSZ pszQueueName);
11075 SPLERR SplEnumDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11076 ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
11077 PVOID pReserved);
11078 SPLERR SplEnumDriver (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11079 ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
11080 PVOID pReserved);
11081 SPLERR SplEnumJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
11082 PVOID pBuf, ULONG cbBuf, PULONG pcReturned, PULONG pcTotal,
11083 PULONG pcbNeeded, PVOID pReserved);
11084 SPLERR SplEnumPort (PCSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11085 ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
11086 PVOID pReserved);
11087 SPLERR SplEnumPrinter (PSZ pszComputerName, ULONG uLevel, ULONG flType,
11088 PVOID pBuf, ULONG cbbuf, PULONG pcReturned, PULONG pcTotal,
11089 PULONG pcbNeeded, PVOID pReserved);
11090 SPLERR SplEnumQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11091 ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
11092 PVOID pReserved);
11093 SPLERR SplEnumQueueProcessor (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
11094 ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
11095 PVOID pReserved);
11096 SPLERR SplHoldJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob);
11097 SPLERR SplHoldQueue (PSZ pszComputerName, PSZ pszQueueName);
11098 SPLERR SplPurgeQueue (PSZ pszComputerName, PSZ pszQueueName);
11099 SPLERR SplQueryDevice (PSZ pszComputerName, PSZ pszPrintDeviceName,
11100 ULONG ulLevel, PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
11101 SPLERR SplQueryDriver (PCSZ pszComputerName, PCSZ pszDriverName,
11102 PCSZ pszPrinterName, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
11103 PULONG pcbNeeded);
11104 SPLERR SplQueryJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob,
11105 ULONG ulLevel, PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
11106 SPLERR SplQueryPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel,
11107 PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
11108 SPLERR SplQueryQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
11109 PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
11110 SPLERR SplReleaseJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob);
11111 SPLERR SplReleaseQueue (PSZ pszComputerName, PSZ pszQueueName);
11112 SPLERR SplSetDevice (PSZ pszComputerName, PSZ pszPrintDeviceName,
11113 ULONG ulLevel, PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
11114 SPLERR SplSetDriver (PCSZ pszComputerName, PCSZ pszDriverName,
11115 PCSZ pszPrinterName, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
11116 ULONG ulParmNum);
11117 SPLERR SplSetJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob,
11118 ULONG ulLevel, PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
11119 SPLERR SplSetPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel,
11120 PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
11121 SPLERR SplSetQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
11122 PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
11123
11124 ULONG SplMessageBox (PSZ pszLogAddr, ULONG fErrInfo, ULONG fErrData,
11125 PSZ pszText, PSZ pszCaption, ULONG idWindow, ULONG fStyle);
11126 BOOL SplQmAbort (HSPL hspl);
11127 BOOL SplQmAbortDoc (HSPL hspl);
11128 BOOL SplQmClose (HSPL hspl);
11129 BOOL SplQmEndDoc (HSPL hspl);
11130 ULONG SplQmGetJobID (HSPL hspl, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
11131 PULONG pcbNeeded);
11132 BOOL SplQmNewPage (HSPL hspl, ULONG ulPageNumber);
11133 HSPL SplQmOpen (PSZ pszToken, LONG lCount, PQMOPENDATA pqmdopData);
11134 BOOL SplQmStartDoc (HSPL hspl, PSZ pszDocName);
11135 BOOL SplQmWrite (HSPL hspl, LONG lCount, PVOID pData);
11136
11137 #if defined (INCL_SPLDOSPRINT)
11138
11139 #define CNLEN 15
11140 #define DTLEN 9
11141 #define PDLEN 8
11142 #define QNLEN 12
11143 #define UNLEN 20
11144
11145 #define DRIV_DEVICENAME_SIZE 31
11146 #define DRIV_NAME_SIZE 8
11147 #define FORMNAME_SIZE 31
11148 #define MAXCOMMENTSZ 48
11149 #define PRINTERNAME_SIZE 32
11150 #define QP_DATATYPE_SIZE 15
11151
11152 #define PRD_STATUS_MASK 0x0003
11153 #define PRD_DEVSTATUS 0x0ffc
11154
11155 #define PRD_ACTIVE 0
11156 #define PRD_PAUSED 1
11157
11158 #define PRD_DELETE 0
11159 #define PRD_PAUSE 1
11160 #define PRD_CONT 2
11161 #define PRD_RESTART 3
11162
11163 #define PRD_LOGADDR_PARMNUM 3
11164 #define PRD_COMMENT_PARMNUM 7
11165 #define PRD_DRIVERS_PARMNUM 8
11166 #define PRD_TIMEOUT_PARMNUM 10
11167
11168 #define PRJ_NOTIFYNAME_PARMNUM 3
11169 #define PRJ_DATATYPE_PARMNUM 4
11170 #define PRJ_PARMS_PARMNUM 5
11171 #define PRJ_POSITION_PARMNUM 6
11172 #define PRJ_JOBFILEINUSE_PARMNUM 7
11173 #define PRJ_COMMENT_PARMNUM 11
11174 #define PRJ_DOCUMENT_PARMNUM 12
11175 #define PRJ_STATUSCOMMENT_PARMNUM 13
11176 #define PRJ_PRIORITY_PARMNUM 14
11177 #define PRJ_PROCPARMS_PARMNUM 16
11178 #define PRJ_DRIVERDATA_PARMNUM 18
11179 #define PRJ_SPOOLFILENAME_PARMNUM 19
11180 #define PRJ_PAGESSPOOLED_PARMNUM 20
11181 #define PRJ_PAGESSENT_PARMNUM 21
11182 #define PRJ_PAGESPRINTED_PARMNUM 22
11183 #define PRJ_TIMEPRINTED_PARMNUM 23
11184 #define PRJ_EXTENDSTATUS_PARMNUM 24
11185 #define PRJ_STARTPAGE_PARMNUM 25
11186 #define PRJ_ENDPAGE_PARMNUM 26
11187 #define PRJ_MAXPARMNUM 26
11188
11189 #define PRJ_QSTATUS 0x0003
11190 #define PRJ_DEVSTATUS 0x0ffc
11191
11192 #define PRJ_COMPLETE 0x0004
11193 #define PRJ_INTERV 0x0008
11194 #define PRJ_ERROR 0x0010
11195 #define PRJ_DESTOFFLINE 0x0020
11196 #define PRJ_DESTPAUSED 0x0040
11197 #define PRJ_NOTIFY 0x0080
11198 #define PRJ_DESTNOPAPER 0x0100
11199 #define PRJ_DESTFORMCHG 0x0200
11200 #define PRJ_DESTCRTCHG 0x0400
11201 #define PRJ_DESTPENCHG 0x0800
11202 #define PRJ_JOBFILEINUSE 0x4000
11203 #define PRJ_DELETED 0x8000
11204
11205 #define PRJ_QS_QUEUED 0
11206 #define PRJ_QS_PAUSED 1
11207 #define PRJ_QS_SPOOLING 2
11208 #define PRJ_QS_PRINTING 3
11209
11210 #define PRJ_MAX_PRIORITY 99
11211 #define PRJ_MIN_PRIORITY 1
11212 #define PRJ_NO_PRIORITY 0
11213
11214 #define PRJ4_INPRINTER 0x0001
11215 #define PRJ4_STACKED 0x0002
11216 #define PRJ4_HELDINPRINTER 0x0004
11217 #define PRJ4_JOBSTARTED 0x0008
11218
11219 #define PRPO_PORT_DRIVER 1
11220 #define PRPO_PROTOCOL_CNV 2
11221 #define PRPO_MODE 3
11222 #define PRPO_PRIORITY 4
11223
11224 #define PRPORT_AUTODETECT 1
11225 #define PRPORT_DISABLE_BIDI 2
11226 #define PRPORT_ENABLE_BIDI 3
11227
11228 #define PRQ_PRIORITY_PARMNUM 2
11229 #define PRQ_STARTTIME_PARMNUM 3
11230 #define PRQ_UNTILTIME_PARMNUM 4
11231 #define PRQ_SEPARATOR_PARMNUM 5
11232 #define PRQ_PROCESSOR_PARMNUM 6
11233 #define PRQ_DESTINATIONS_PARMNUM 7
11234 #define PRQ_PARMS_PARMNUM 8
11235 #define PRQ_COMMENT_PARMNUM 9
11236 #define PRQ_TYPE_PARMNUM 10
11237 #define PRQ_PRINTERS_PARMNUM 12
11238 #define PRQ_DRIVERNAME_PARMNUM 13
11239 #define PRQ_DRIVERDATA_PARMNUM 14
11240 #define PRQ_REMOTE_COMPUTER_PARMNUM 15
11241 #define PRQ_REMOTE_QUEUE_PARMNUM 16
11242 #define PRQ_MAXPARMNUM 16
11243
11244 #define PRQ_MAX_PRIORITY 1
11245 #define PRQ_DEF_PRIORITY 5
11246 #define PRQ_MIN_PRIORITY 9
11247 #define PRQ_NO_PRIORITY 0
11248
11249 #define PRQ_STATUS_MASK 3
11250 #define PRQ_ACTIVE 0
11251 #define PRQ_PAUSED 1
11252 #define PRQ_ERROR 2
11253 #define PRQ_PENDING 3
11254
11255 #define PRQ3_PAUSED 0x0001
11256 #define PRQ3_PENDING 0x0002
11257
11258 #define PRQ3_TYPE_RAW 0x0001
11259 #define PRQ3_TYPE_BYPASS 0x0002
11260 #define PRQ3_TYPE_APPDEFAULT 0x0004
11261
11262 #define SPL_PR_QUEUE 0x0001
11263 #define SPL_PR_DIRECT_DEVICE 0x0002
11264 #define SPL_PR_QUEUED_DEVICE 0x0004
11265 #define SPL_PR_LOCAL_ONLY 0x0100
11266
11267 typedef struct _DRIVPROPS
11268 {
11269 PSZ pszKeyName;
11270 ULONG cbBuf;
11271 PVOID pBuf;
11272 } DRIVPROPS;
11273 typedef DRIVPROPS *PDRIVPROPS;
11274
11275 typedef struct _PRINTERINFO
11276 {
11277 ULONG flType;
11278 PSZ pszComputerName;
11279 PSZ pszPrintDestinationName;
11280 PSZ pszDescription;
11281 PSZ pszLocalName;
11282 } PRINTERINFO;
11283 typedef PRINTERINFO *PPRINTERINFO;
11284
11285 typedef struct _PRJINFO
11286 {
11287 USHORT uJobId;
11288 CHAR szUserName[UNLEN+1];
11289 CHAR pad_1;
11290 CHAR szNotifyName[CNLEN+1];
11291 CHAR szDataType[DTLEN+1];
11292 PSZ pszParms;
11293 USHORT uPosition;
11294 USHORT fsStatus;
11295 PSZ pszStatus;
11296 ULONG ulSubmitted;
11297 ULONG ulSize;
11298 PSZ pszComment;
11299 } PRJINFO;
11300 typedef PRJINFO *PPRJINFO;
11301
11302 typedef struct _PRJINFO2
11303 {
11304 USHORT uJobId;
11305 USHORT uPriority;
11306 PSZ pszUserName;
11307 USHORT uPosition;
11308 USHORT fsStatus;
11309 ULONG ulSubmitted;
11310 ULONG ulSize;
11311 PSZ pszComment;
11312 PSZ pszDocument;
11313 } PRJINFO2;
11314 typedef PRJINFO2 *PPRJINFO2;
11315
11316 typedef struct _PRJINFO3
11317 {
11318 USHORT uJobId;
11319 USHORT uPriority;
11320 PSZ pszUserName;
11321 USHORT uPosition;
11322 USHORT fsStatus;
11323 ULONG ulSubmitted;
11324 ULONG ulSize;
11325 PSZ pszComment;
11326 PSZ pszDocument;
11327 PSZ pszNotifyName;
11328 PSZ pszDataType;
11329 PSZ pszParms;
11330 PSZ pszStatus;
11331 PSZ pszQueue;
11332 PSZ pszQProcName;
11333 PSZ pszQProcParms;
11334 PSZ pszDriverName;
11335 PDRIVDATA pDriverData;
11336 PSZ pszPrinterName;
11337 } PRJINFO3;
11338 typedef PRJINFO3 *PPRJINFO3;
11339
11340 typedef struct _PRJINFO4
11341 {
11342 USHORT uJobId;
11343 USHORT uPriority;
11344 PSZ pszUserName;
11345 USHORT uPosition;
11346 USHORT fsStatus;
11347 ULONG ulSubmitted;
11348 ULONG ulSize;
11349 PSZ pszComment;
11350 PSZ pszDocument;
11351 PSZ pszSpoolFileName;
11352 PSZ pszPortName;
11353 PSZ pszStatus;
11354 ULONG ulPagesSpooled;
11355 ULONG ulPagesSent;
11356 ULONG ulPagesPrinted;
11357 ULONG ulTimePrinted;
11358 ULONG ulExtendJobStatus;
11359 ULONG ulStartPage;
11360 ULONG ulEndPage;
11361 } PRJINFO4;
11362 typedef PRJINFO4 *PPRJINFO4;
11363
11364 typedef struct _PRDINFO
11365 {
11366 CHAR szName[PDLEN+1];
11367 CHAR szUserName[UNLEN+1];
11368 USHORT uJobId;
11369 USHORT fsStatus;
11370 PSZ pszStatus;
11371 USHORT time;
11372 } PRDINFO;
11373 typedef PRDINFO *PPRDINFO;
11374
11375 typedef struct _PRDINFO3
11376 {
11377 PSZ pszPrinterName;
11378 PSZ pszUserName;
11379 PSZ pszLogAddr;
11380 USHORT uJobId;
11381 USHORT fsStatus;
11382 PSZ pszStatus;
11383 PSZ pszComment;
11384 PSZ pszDrivers;
11385 USHORT time;
11386 USHORT usTimeOut;
11387 } PRDINFO3;
11388 typedef PRDINFO3 *PPRDINFO3;
11389
11390 typedef struct _PRQINFO
11391 {
11392 CHAR szName[QNLEN+1];
11393 CHAR pad_1;
11394 USHORT uPriority;
11395 USHORT uStartTime;
11396 USHORT uUntilTime;
11397 PSZ pszSepFile;
11398 PSZ pszPrProc;
11399 PSZ pszDestinations;
11400 PSZ pszParms;
11401 PSZ pszComment;
11402 USHORT fsStatus;
11403 USHORT cJobs;
11404 } PRQINFO;
11405 typedef PRQINFO *PPRQINFO;
11406
11407 typedef struct _PRQINFO3
11408 {
11409 PSZ pszName;
11410 USHORT uPriority;
11411 USHORT uStartTime;
11412 USHORT uUntilTime;
11413 USHORT fsType;
11414 PSZ pszSepFile;
11415 PSZ pszPrProc;
11416 PSZ pszParms;
11417 PSZ pszComment;
11418 USHORT fsStatus;
11419 USHORT cJobs;
11420 PSZ pszPrinters;
11421 PSZ pszDriverName;
11422 PDRIVDATA pDriverData;
11423 } PRQINFO3;
11424 typedef PRQINFO3 *PPRQINFO3;
11425
11426 typedef struct _PRQINFO6
11427 {
11428 PSZ pszName;
11429 USHORT uPriority;
11430 USHORT uStartTime;
11431 USHORT uUntilTime;
11432 USHORT fsType;
11433 PSZ pszSepFile;
11434 PSZ pszPrProc;
11435 PSZ pszParms;
11436 PSZ pszComment;
11437 USHORT fsStatus;
11438 USHORT cJobs;
11439 PSZ pszPrinters;
11440 PSZ pszDriverName;
11441 PDRIVDATA pDriverData;
11442 PSZ pszRemoteComputerName;
11443 PSZ pszRemoteQueueName;
11444 } PRQINFO6;
11445 typedef PRQINFO6 *PPRQINFO6;
11446
11447 typedef struct _PRIDINFO
11448 {
11449 USHORT uJobId;
11450 CHAR szComputerName[CNLEN+1];
11451 CHAR szQueueName[QNLEN+1];
11452 CHAR pad_1;
11453 } PRIDINFO;
11454 typedef PRIDINFO *PPRIDINFO;
11455
11456 typedef struct _PRDRIVINFO
11457 {
11458 CHAR szDrivName[DRIV_NAME_SIZE+1+DRIV_DEVICENAME_SIZE+1];
11459 } PRDRIVINFO;
11460 typedef PRDRIVINFO *PPRDRIVINFO;
11461
11462 typedef struct _PRDRIVINFO2
11463 {
11464 PSZ pszPrinterName;
11465 PSZ pszDriverName;
11466 USHORT usFlags;
11467 USHORT cDriverProps;
11468 } PRDRIVINFO2;
11469 typedef PRDRIVINFO2 *PPRDRIVINFO2;
11470
11471 typedef struct _PRQPROCINFO
11472 {
11473 CHAR szQProcName[QNLEN+1];
11474 } PRQPROCINFO;
11475 typedef PRQPROCINFO *PPRQPROCINFO;
11476
11477 typedef struct _PRPORTINFO
11478 {
11479 CHAR szPortName[PDLEN+1];
11480 } PRPORTINFO;
11481 typedef PRPORTINFO *PPRPORTINFO;
11482
11483 typedef struct _PRPORTINFO1
11484 {
11485 PSZ pszPortName;
11486 PSZ pszPortDriverName;
11487 PSZ pszPortDriverPathName;
11488 } PRPORTINFO1;
11489 typedef PRPORTINFO1 *PPRPORTINFO1;
11490
11491 typedef struct _PRPORTINFO2
11492 {
11493 PSZ pszPortName;
11494 PSZ pszPortDriver;
11495 PSZ pszProtocolConverter;
11496 ULONG ulReserved;
11497 ULONG ulMode;
11498 ULONG ulPriority;
11499 } PRPORTINFO2;
11500 typedef PRPORTINFO2 *PPRPORTINFO2;
11501
11502 typedef struct _QMJOBINFO
11503 {
11504 ULONG ulJobID;
11505 PSZ pszComputerName;
11506 PSZ pszQueueName;
11507 } QMJOBINFO;
11508 typedef QMJOBINFO *PQMJOBINFO;
11509
11510 #endif /* INCL_SPLDOSPRINT */
11511 #endif /* INCL_SPL */
11512
11513 /* -------------------------- HELP MANAGER -------------------------------- */
11514
11515 #if defined (INCL_WINHELP)
11516
11517 #define CMIC_HIDE_PANEL_ID 0x0000
11518 #define CMIC_SHOW_PANEL_ID 0x0001
11519 #define CMIC_TOGGLE_PANEL_ID 0x0002
11520
11521 #define CTRL_PREVIOUS_ID ((USHORT)0x0001)
11522 #define CTRL_SEARCH_ID ((USHORT)0x0002)
11523 #define CTRL_PRINT_ID ((USHORT)0x0003)
11524 #define CTRL_INDEX_ID ((USHORT)0x0004)
11525 #define CTRL_CONTENTS_ID ((USHORT)0x0005)
11526 #define CTRL_BACK_ID ((USHORT)0x0006)
11527 #define CTRL_FORWARD_ID ((USHORT)0x0007)
11528 #define CTRL_TUTORIAL_ID ((USHORT)0x00ff)
11529 #define CTRL_USER_ID_BASE ((USHORT)0x0101)
11530
11531 #define HM_MSG_BASE 0x0220
11532 #define HM_DISMISS_WINDOW 0x0221
11533 #define HM_DISPLAY_HELP 0x0222
11534 #define HM_EXT_HELP 0x0223
11535 #define HM_GENERAL_HELP 0x0223 /*!*/
11536 #define HM_SET_ACTIVE_WINDOW 0x0224
11537 #define HM_LOAD_HELP_TABLE 0x0225
11538 #define HM_CREATE_HELP_TABLE 0x0226
11539 #define HM_SET_HELP_WINDOW_TITLE 0x0227
11540 #define HM_SET_SHOW_PANEL_ID 0x0228
11541 #define HM_REPLACE_HELP_FOR_HELP 0x0229
11542 #define HM_REPLACE_USING_HELP 0x0229 /*!*/
11543 #define HM_HELP_INDEX 0x022a
11544 #define HM_HELP_CONTENTS 0x022b
11545 #define HM_KEYS_HELP 0x022c
11546 #define HM_SET_HELP_LIBRARY_NAME 0x022d
11547 #define HM_ERROR 0x022e
11548 #define HM_HELPSUBITEM_NOT_FOUND 0x022f
11549 #define HM_QUERY_KEYS_HELP 0x0230
11550 #define HM_TUTORIAL 0x0231
11551 #define HM_EXT_HELP_UNDEFINED 0x0232
11552 #define HM_GENERAL_HELP_UNDEFINED 0x0232 /*!*/
11553 #define HM_ACTIONBAR_COMMAND 0x0233
11554 #define HM_INFORM 0x0234
11555 #define HM_SET_OBJCOM_WINDOW 0x0238
11556 #define HM_UPDATE_OBJCOM_WINDOW_CHAIN 0x0239
11557 #define HM_QUERY_DDF_DATA 0x023a
11558 #define HM_INVALIDATE_DDF_DATA 0x023b
11559 #define HM_QUERY 0x023c
11560 #define HM_SET_COVERPAGE_SIZE 0x023d
11561 #define HM_NOTIFY 0x0242
11562 #define HM_SET_USERDATA 0x0243
11563 #define HM_CONTROL 0x0244
11564
11565 #define HM_RESOURCEID 0
11566 #define HM_PANELNAME 1
11567
11568 #define HMERR_NO_FRAME_WND_IN_CHAIN 0x1001
11569 #define HMERR_INVALID_ASSOC_APP_WND 0x1002
11570 #define HMERR_INVALID_ASSOC_HELP_INST 0x1003
11571 #define HMERR_INVALID_DESTROY_HELP_INST 0x1004
11572 #define HMERR_NO_HELP_INST_IN_CHAIN 0x1005
11573 #define HMERR_INVALID_HELP_INSTANCE_HDL 0x1006
11574 #define HMERR_INVALID_QUERY_APP_WND 0x1007
11575 #define HMERR_HELP_INST_CALLED_INVALID 0x1008
11576 #define HMERR_HELPTABLE_UNDEFINE 0x1009
11577 #define HMERR_HELP_INSTANCE_UNDEFINE 0x100a
11578 #define HMERR_HELPITEM_NOT_FOUND 0x100b
11579 #define HMERR_INVALID_HELPSUBITEM_SIZE 0x100c
11580 #define HMERR_HELPSUBITEM_NOT_FOUND 0x100d
11581
11582 #define HMERR_INDEX_NOT_FOUND 0x2001
11583 #define HMERR_CONTENT_NOT_FOUND 0x2002
11584 #define HMERR_OPEN_LIB_FILE 0x2003
11585 #define HMERR_READ_LIB_FILE 0x2004
11586 #define HMERR_CLOSE_LIB_FILE 0x2005
11587 #define HMERR_INVALID_LIB_FILE 0x2006
11588 #define HMERR_NO_MEMORY 0x2007
11589 #define HMERR_ALLOCATE_SEGMENT 0x2008
11590 #define HMERR_FREE_MEMORY 0x2009
11591 #define HMERR_PANEL_NOT_FOUND 0x2010
11592 #define HMERR_DATABASE_NOT_OPEN 0x2011
11593 #define HMERR_LOAD_DLL 0x2013
11594
11595 #define HMPANELTYPE_NUMBER 0
11596 #define HMPANELTYPE_NAME 1
11597
11598 #define HMQVP_NUMBER 0x0001
11599 #define HMQVP_NAME 0x0002
11600 #define HMQVP_GROUP 0x0003
11601
11602 #define HMQW_COVERPAGE 0x0001
11603 #define HMQW_INDEX 0x0002
11604 #define HMQW_TOC 0x0003
11605 #define HMQW_SEARCH 0x0004
11606 #define HMQW_VIEWPAGES 0x0005
11607 #define HMQW_LIBRARY 0x0006
11608 #define HMQW_VIEWPORT 0x0007
11609 #define HMQW_OBJCOM_WINDOW 0x0008
11610 #define HMQW_INSTANCE 0x0009
11611 #define HMQW_ACTIVEVIEWPORT 0x000a
11612 #define CONTROL_SELECTED 0x000b
11613
11614 #define HMQW_GROUP_VIEWPORT 0x00f1
11615 #define HMQW_RES_VIEWPORT 0x00f2
11616 #define USERDATA 0x00f3
11617
11618 #define HWND_PARENT (HWND)NULL
11619
11620 #define OPEN_COVERPAGE 0x0001
11621 #define OPEN_PAGE 0x0002
11622 #define SWAP_PAGE 0x0003
11623 #define OPEN_TOC 0x0004
11624 #define OPEN_INDEX 0x0005
11625 #define OPEN_HISTORY 0x0006
11626 #define OPEN_SEARCH_HIT_LIST 0x0007
11627 #define OPEN_LIBRARY 0x0008
11628
11629
11630 typedef USHORT HELPSUBTABLE;
11631 typedef HELPSUBTABLE *PHELPSUBTABLE;
11632
11633
11634 typedef struct _ACVP
11635 {
11636 ULONG cb;
11637 HAB hAB;
11638 HMQ hmq;
11639 ULONG ObjectID;
11640 HWND hWndParent;
11641 HWND hWndOwner;
11642 HWND hWndACVP;
11643 } ACVP;
11644 typedef ACVP *PACVP;
11645
11646 typedef struct _HELPTABLE
11647 {
11648 USHORT idAppWindow;
11649 PHELPSUBTABLE phstHelpSubTable;
11650 USHORT idExtPanel;
11651 } HELPTABLE;
11652 typedef HELPTABLE *PHELPTABLE;
11653
11654 typedef struct _HELPINIT
11655 {
11656 ULONG cb;
11657 ULONG ulReturnCode;
11658 PSZ pszTutorialName;
11659 PHELPTABLE phtHelpTable;
11660 HMODULE hmodHelpTableModule;
11661 HMODULE hmodAccelActionBarModule;
11662 ULONG idAccelTable;
11663 ULONG idActionBar;
11664 PSZ pszHelpWindowTitle;
11665 ULONG fShowPanelId;
11666 PSZ pszHelpLibraryName;
11667 } HELPINIT;
11668 typedef HELPINIT *PHELPINIT;
11669
11670 BOOL WinAssociateHelpInstance (HWND hwndHelpInstance, HWND hwndApp);
11671 HWND WinCreateHelpInstance (HAB hab, PHELPINIT phinitHMInitStructure);
11672 BOOL WinCreateHelpTable (HWND hwndHelpInstance,
11673 __const__ HELPTABLE *phtHelpTable);
11674 BOOL WinDestroyHelpInstance (HWND hwndHelpInstance);
11675 BOOL WinLoadHelpTable (HWND hwndHelpInstance, ULONG idHelpTable,
11676 HMODULE Module);
11677 HWND WinQueryHelpInstance (HWND hwndApp);
11678
11679 #endif /* INCL_WINHELP */
11680
11681
11682 #if defined (INCL_DDF)
11683
11684 #define ART_RUNIN 0x0010
11685 #define ART_LEFT 0x0001
11686 #define ART_RIGHT 0x0002
11687 #define ART_CENTER 0x0004
11688
11689 #define CLR_UNCHANGED (-6)
11690
11691 #define HMBT_NONE 1
11692 #define HMBT_ALL 2
11693 #define HMBT_FIT 3
11694
11695 #define HMERR_DDF_MEMORY 0x3001
11696 #define HMERR_DDF_ALIGN_TYPE 0x3002
11697 #define HMERR_DDF_BACKCOLOR 0x3003
11698 #define HMERR_DDF_FORECOLOR 0x3004
11699 #define HMERR_DDF_FONTSTYLE 0x3005
11700 #define HMERR_DDF_REFTYPE 0x3006
11701 #define HMERR_DDF_LIST_UNCLOSED 0x3007
11702 #define HMERR_DDF_LIST_UNINITIALIZED 0x3008
11703 #define HMERR_DDF_LIST_BREAKTYPE 0x3009
11704 #define HMERR_DDF_LIST_SPACING 0x300A
11705 #define HMERR_DDF_HINSTANCE 0x300B
11706 #define HMERR_DDF_EXCEED_MAX_LENGTH 0x300C
11707 #define HMERR_DDF_EXCEED_MAX_INC 0x300D
11708 #define HMERR_DDF_INVALID_DDF 0x300E
11709 #define HMERR_DDF_FORMAT_TYPE 0x300F
11710 #define HMERR_DDF_INVALID_PARM 0x3010
11711 #define HMERR_DDF_INVALID_FONT 0x3011
11712 #define HMERR_DDF_SEVERE 0x3012
11713
11714 #define HMLS_SINGLELINE 1
11715 #define HMLS_DOUBLELINE 2
11716
11717 #define REFERENCE_BY_ID 0
11718 #define REFERENCE_BY_RES 1
11719
11720 typedef VOID *HDDF;
11721
11722 BOOL DdfBeginList (HDDF hddf, ULONG ulWidthDT, ULONG fBreakType,
11723 ULONG fSpacing);
11724 BOOL DdfBitmap (HDDF hddf, HBITMAP hbm, ULONG fAlign);
11725 BOOL DdfEndList (HDDF hddf);
11726 BOOL DdfHyperText (HDDF hddf, PCSZ pszText, PCSZ pszReference,
11727 ULONG fReferenceType);
11728 BOOL DdfInform (HDDF hddf, PCSZ pszText, ULONG resInformNumber);
11729 HDDF DdfInitialize (HWND hwndHelpInstance, ULONG cbBuffer, ULONG ulIncrement);
11730 BOOL DdfListItem (HDDF hddf, PCSZ pszTerm, PCSZ pszDescription);
11731 BOOL DdfMetafile (HDDF hddf, HMF hmf, __const__ RECTL *prclRect);
11732 BOOL DdfPara (HDDF hddf);
11733 BOOL DdfSetColor (HDDF hddf, COLOR fBackColor, COLOR fForColor);
11734 BOOL DdfSetFont (HDDF hddf, PCSZ pszFaceName, ULONG ulWidth, ULONG ulHeight);
11735 BOOL DdfSetFontStyle (HDDF hddf, ULONG fFontStyle);
11736 BOOL DdfSetFormat (HDDF hddf, ULONG fFormatType);
11737 BOOL DdfSetTextAlign (HDDF hddf, ULONG fAlign);
11738 BOOL DdfText (HDDF hddf, PCSZ pszText);
11739
11740 #endif /* INCL_DDF */
11741
11742 /* ---------------------- Advanced Video ---------------------------------- */
11743
11744 #if defined (INCL_FONTFILEFORMAT)
11745
11746 #define FONTDEFFONT1 0x0047
11747 #define FONTDEFFONT2 0x0042
11748 #define FONTDEFFONT3 0x0042
11749 #define FONTDEFCHAR1 0x0081
11750 #define FONTDEFCHAR2 0x0081
11751 #define FONTDEFCHAR3 0x00b8
11752 #define FONTDEFDEVFONT 0x2000
11753 #define FONTDEFFOCA32 0x4000
11754 #define SPACE_UNDEF 0x8000
11755
11756 #define FONT_SIGNATURE 0xfffffffe
11757 #define FONT_METRICS 0x00000001
11758 #define FONT_DEFINITION 0x00000002
11759 #define FONT_KERNPAIRS 0x00000003
11760 #define FONT_ADDITIONALMETRICS 0x00000004
11761 #define FONT_ENDRECORD 0xffffffff
11762
11763 #define QUERY_PUBLIC_FONTS 0x0001
11764 #define QUERY_PRIVATE_FONTS 0x0002
11765
11766 #define CDEF_GENERIC 0x0001
11767 #define CDEF_BOLD 0x0002
11768 #define CDEF_ITALIC 0x0004
11769 #define CDEF_UNDERSCORE 0x0008
11770 #define CDEF_STRIKEOUT 0x0010
11771 #define CDEF_OUTLINE 0x0020
11772
11773 typedef struct _FOCAMETRICS
11774 {
11775 ULONG ulIdentity;
11776 ULONG ulSize;
11777 CHAR szFamilyname[32];
11778 CHAR szFacename[32];
11779 SHORT usRegistryId;
11780 SHORT usCodePage;
11781 SHORT yEmHeight;
11782 SHORT yXHeight;
11783 SHORT yMaxAscender;
11784 SHORT yMaxDescender;
11785 SHORT yLowerCaseAscent;
11786 SHORT yLowerCaseDescent;
11787 SHORT yInternalLeading;
11788 SHORT yExternalLeading;
11789 SHORT xAveCharWidth;
11790 SHORT xMaxCharInc;
11791 SHORT xEmInc;
11792 SHORT yMaxBaselineExt;
11793 SHORT sCharSlope;
11794 SHORT sInlineDir;
11795 SHORT sCharRot;
11796 USHORT usWeightClass;
11797 USHORT usWidthClass;
11798 SHORT xDeviceRes;
11799 SHORT yDeviceRes;
11800 SHORT usFirstChar;
11801 SHORT usLastChar;
11802 SHORT usDefaultChar;
11803 SHORT usBreakChar;
11804 SHORT usNominalPointSize;
11805 SHORT usMinimumPointSize;
11806 SHORT usMaximumPointSize;
11807 SHORT fsTypeFlags;
11808 SHORT fsDefn;
11809 SHORT fsSelectionFlags;
11810 SHORT fsCapabilities;
11811 SHORT ySubscriptXSize;
11812 SHORT ySubscriptYSize;
11813 SHORT ySubscriptXOffset;
11814 SHORT ySubscriptYOffset;
11815 SHORT ySuperscriptXSize;
11816 SHORT ySuperscriptYSize;
11817 SHORT ySuperscriptXOffset;
11818 SHORT ySuperscriptYOffset;
11819 SHORT yUnderscoreSize;
11820 SHORT yUnderscorePosition;
11821 SHORT yStrikeoutSize;
11822 SHORT yStrikeoutPosition;
11823 SHORT usKerningPairs;
11824 SHORT sFamilyClass;
11825 PSZ pszDeviceNameOffset;
11826 } FOCAMETRICS;
11827 typedef FOCAMETRICS *PFOCAMETRICS;
11828
11829 typedef struct _FONTFILEMETRICS
11830 {
11831 ULONG ulIdentity;
11832 ULONG ulSize;
11833 CHAR szFamilyname[32];
11834 CHAR szFacename[32];
11835 SHORT usRegistryId;
11836 SHORT usCodePage;
11837 SHORT yEmHeight;
11838 SHORT yXHeight;
11839 SHORT yMaxAscender;
11840 SHORT yMaxDescender;
11841 SHORT yLowerCaseAscent;
11842 SHORT yLowerCaseDescent;
11843 SHORT yInternalLeading;
11844 SHORT yExternalLeading;
11845 SHORT xAveCharWidth;
11846 SHORT xMaxCharInc;
11847 SHORT xEmInc;
11848 SHORT yMaxBaselineExt;
11849 SHORT sCharSlope;
11850 SHORT sInlineDir;
11851 SHORT sCharRot;
11852 USHORT usWeightClass;
11853 USHORT usWidthClass;
11854 SHORT xDeviceRes;
11855 SHORT yDeviceRes;
11856 SHORT usFirstChar;
11857 SHORT usLastChar;
11858 SHORT usDefaultChar;
11859 SHORT usBreakChar;
11860 SHORT usNominalPointSize;
11861 SHORT usMinimumPointSize;
11862 SHORT usMaximumPointSize;
11863 SHORT fsTypeFlags;
11864 SHORT fsDefn;
11865 SHORT fsSelectionFlags;
11866 SHORT fsCapabilities;
11867 SHORT ySubscriptXSize;
11868 SHORT ySubscriptYSize;
11869 SHORT ySubscriptXOffset;
11870 SHORT ySubscriptYOffset;
11871 SHORT ySuperscriptXSize;
11872 SHORT ySuperscriptYSize;
11873 SHORT ySuperscriptXOffset;
11874 SHORT ySuperscriptYOffset;
11875 SHORT yUnderscoreSize;
11876 SHORT yUnderscorePosition;
11877 SHORT yStrikeoutSize;
11878 SHORT yStrikeoutPosition;
11879 SHORT usKerningPairs;
11880 SHORT sFamilyClass;
11881 ULONG ulReserved;
11882 PANOSE panose;
11883 } FONTFILEMETRICS;
11884 typedef FONTFILEMETRICS *PFONTFILEMETRICS;
11885
11886 typedef struct _FONTDEFINITIONHEADER
11887 {
11888 ULONG ulIdentity;
11889 ULONG ulSize;
11890 SHORT fsFontdef;
11891 SHORT fsChardef;
11892 SHORT usCellSize;
11893 SHORT xCellWidth;
11894 SHORT yCellHeight;
11895 SHORT xCellIncrement;
11896 SHORT xCellA;
11897 SHORT xCellB;
11898 SHORT xCellC;
11899 SHORT pCellBaseOffset;
11900 } FONTDEFINITIONHEADER;
11901 typedef FONTDEFINITIONHEADER *PFONTDEFINITIONHEADER;
11902
11903 typedef struct _FONTSIGNATURE
11904 {
11905 ULONG ulIdentity;
11906 ULONG ulSize;
11907 CHAR achSignature[12];
11908 } FONTSIGNATURE;
11909 typedef FONTSIGNATURE *PFONTSIGNATURE;
11910
11911 typedef struct _ADDITIONALMETRICS
11912 {
11913 ULONG ulIdentity;
11914 ULONG ulSize;
11915 PANOSE panose;
11916 } ADDITIONALMETRICS;
11917 typedef ADDITIONALMETRICS *PADDITIONALMETRICS;
11918
11919 typedef struct _FOCAFONT
11920 {
11921 FONTSIGNATURE fsSignature;
11922 FOCAMETRICS fmMetrics;
11923 FONTDEFINITIONHEADER fdDefinitions;
11924 } FOCAFONT;
11925 typedef FOCAFONT *PFOCAFONT;
11926
11927 typedef FOCAFONT FOCAFONT32;
11928 typedef FOCAFONT32 *PFOCAFONT32;
11929
11930 #endif /* INCL_FONTFILEFORMAT */
11931
11932 /* ---------------------- Advanced Video ---------------------------------- */
11933
11934 #if defined (INCL_AVIO)
11935
11936 #define FORMAT_CGA 0x0001
11937 #define FORMAT_4BYTE 0x0003
11938
11939 #define VQF_PUBLIC 0x0001
11940 #define VQF_PRIVATE 0x0002
11941
11942 typedef USHORT HVPS;
11943 typedef HVPS *PHVPS;
11944
11945 USHORT VioAssociate (HDC hdc, HVPS hvps);
11946 USHORT VioCreateLogFont (PFATTRS pfatattrs, LONG llcid, PSTR8 pName,
11947 HVPS hvps);
11948 USHORT VioCreatePS (PHVPS phvps, SHORT sDepth, SHORT sWidth, SHORT sFormat,
11949 SHORT sAttrs, HVPS hvpsReserved);
11950 USHORT VioDeleteSetId (LONG llcid, HVPS hvps);
11951 USHORT VioDestroyPS (HVPS hvps);
11952 USHORT VioGetDeviceCellSize (PSHORT psHeight, PSHORT psWidth, HVPS hvps);
11953 USHORT VioGetOrg (PSHORT psRow, PSHORT psColumn, HVPS hvps);
11954 USHORT VioQueryFonts (PLONG plRemfonts, PFONTMETRICS afmMetrics,
11955 LONG lMetricsLength, PLONG plFonts, PSZ pszFacename, ULONG flOptions,
11956 HVPS hvps);
11957 USHORT VioQuerySetIds (PLONG allcids, PSTR8 pNames, PLONG alTypes, LONG lcount,
11958 HVPS hvps);
11959 USHORT VioSetDeviceCellSize (SHORT sHeight, SHORT sWidth, HVPS hvps);
11960 USHORT VioSetOrg (SHORT sRow, SHORT sColumn, HVPS hvps);
11961 USHORT VioShowPS (SHORT sDepth, SHORT sWidth, SHORT soffCell, HVPS hvps);
11962
11963 MRESULT WinDefAVioWindowProc (HWND hwnd, USHORT msg, ULONG mp1, ULONG mp2);
11964
11965 #endif /* INCL_AVIO */
11966
11967 /* --------------------------- MONITORS ----------------------------------- */
11968
11969 #if defined (INCL_DOSMONITORS)
11970
11971 #define MONITOR_DEFAULT 0x0000
11972 #define MONITOR_BEGIN 0x0001
11973 #define MONITOR_END 0x0002
11974
11975 typedef SHANDLE HMONITOR;
11976 typedef HMONITOR *PHMONITOR;
11977
11978 typedef struct _MONIN
11979 {
11980 USHORT cb;
11981 BYTE abReserved[18];
11982 BYTE abBuffer[108];
11983 } MONIN;
11984 typedef MONIN *PMONIN;
11985
11986 typedef struct _MONOUT
11987 {
11988 USHORT cb;
11989 UCHAR buffer[18];
11990 BYTE abBuf[108];
11991 } MONOUT;
11992 typedef MONOUT *PMONOUT;
11993
11994 USHORT DosMonOpen (PSZ pszDevName, PHMONITOR phmon);
11995 USHORT DosMonClose (HMONITOR hmon);
11996 USHORT DosMonReg (HMONITOR hmon, PBYTE pbInBuf, PBYTE pbOutBuf,
11997 USHORT fPosition, USHORT usIndex);
11998 USHORT DosMonRead (PBYTE pbInBuf, USHORT fWait, PBYTE pbDataBuf,
11999 PUSHORT pcbData);
12000 USHORT DosMonWrite (PBYTE pbOutBuf, PBYTE pbDataBuf, USHORT cbData);
12001
12002 #endif /* INCL_DOSMONITORS */
12003
12004 /* -------------------------- SUBSYSTEMS ---------------------------------- */
12005
12006 #if defined (INCL_KBD)
12007
12008 #define IO_WAIT 0
12009 #define IO_NOWAIT 1
12010
12011 #define KBDSTF_RIGHTSHIFT 0x0001
12012 #define KBDSTF_LEFTSHIFT 0x0002
12013 #define KBDSTF_CONTROL 0x0004
12014 #define KBDSTF_ALT 0x0008
12015 #define KBDSTF_SCROLLLOCK_ON 0x0010
12016 #define KBDSTF_NUMLOCK_ON 0x0020
12017 #define KBDSTF_CAPSLOCK_ON 0x0040
12018 #define KBDSTF_INSERT_ON 0x0080
12019 #define KBDSTF_LEFTCONTROL 0x0100
12020 #define KBDSTF_LEFTALT 0x0200
12021 #define KBDSTF_RIGHTCONTROL 0x0400
12022 #define KBDSTF_RIGHTALT 0x0800
12023 #define KBDSTF_SCROLLLOCK 0x1000
12024 #define KBDSTF_NUMLOCK 0x2000
12025 #define KBDSTF_CAPSLOCK 0x4000
12026 #define KBDSTF_SYSREQ 0x8000
12027
12028 #define KBDTRF_SHIFT_KEY_IN 0x01
12029 #define KBDTRF_EXTENDED_CODE 0x02
12030 #define KBDTRF_CONVERSION_REQUEST 0x20
12031 #define KBDTRF_FINAL_CHAR_IN 0x40
12032 #define KBDTRF_INTERIM_CHAR_IN 0x80
12033
12034 #define KEYBOARD_ECHO_ON 0x0001
12035 #define KEYBOARD_ECHO_OFF 0x0002
12036 #define KEYBOARD_BINARY_MODE 0x0004
12037 #define KEYBOARD_ASCII_MODE 0x0008
12038 #define KEYBOARD_MODIFY_STATE 0x0010
12039 #define KEYBOARD_MODIFY_INTERIM 0x0020
12040 #define KEYBOARD_MODIFY_TURNAROUND 0x0040
12041 #define KEYBOARD_2B_TURNAROUND 0x0080
12042 #define KEYBOARD_SHIFT_REPORT 0x0100
12043
12044 #define KR_KBDCHARIN 0x00000001
12045 #define KR_KBDPEEK 0x00000002
12046 #define KR_KBDFLUSHBUFFER 0x00000004
12047 #define KR_KBDGETSTATUS 0x00000008
12048 #define KR_KBDSETSTATUS 0x00000010
12049 #define KR_KBDSTRINGIN 0x00000020
12050 #define KR_KBDOPEN 0x00000040
12051 #define KR_KBDCLOSE 0x00000080
12052 #define KR_KBDGETFOCUS 0x00000100
12053 #define KR_KBDFREEFOCUS 0x00000200
12054 #define KR_KBDGETCP 0x00000400
12055 #define KR_KBDSETCP 0x00000800
12056 #define KR_KBDXLATE 0x00001000
12057 #define KR_KBDSETCUSTXT 0x00002000
12058
12059 typedef USHORT HKBD;
12060 typedef HKBD *PHKBD;
12061
12062 typedef struct _KBDKEYINFO
12063 {
12064 UCHAR chChar;
12065 UCHAR chScan;
12066 UCHAR fbStatus;
12067 UCHAR bNlsShift;
12068 USHORT fsState;
12069 ULONG time;
12070 } KBDKEYINFO;
12071 typedef KBDKEYINFO *PKBDKEYINFO;
12072
12073 typedef struct _KBDINFO
12074 {
12075 USHORT cb;
12076 USHORT fsMask;
12077 USHORT chTurnAround;
12078 USHORT fsInterim;
12079 USHORT fsState;
12080 } KBDINFO;
12081 typedef KBDINFO *PKBDINFO;
12082
12083 typedef struct _KBDHWID
12084 {
12085 USHORT cb;
12086 USHORT idKbd;
12087 USHORT usReserved1;
12088 USHORT usReserved2;
12089 } KBDHWID;
12090 typedef KBDHWID *PKBDHWID;
12091
12092 typedef struct _KBDTRANS
12093 {
12094 UCHAR chChar;
12095 UCHAR chScan;
12096 UCHAR fbStatus;
12097 UCHAR bNlsShift;
12098 USHORT fsState;
12099 ULONG time;
12100 USHORT fsDD;
12101 USHORT fsXlate;
12102 USHORT fsShift;
12103 USHORT sZero;
12104 } KBDTRANS;
12105 typedef KBDTRANS *PKBDTRANS;
12106
12107 typedef struct _STRINGINBUF
12108 {
12109 USHORT cb;
12110 USHORT cchIn;
12111 } STRINGINBUF;
12112 typedef STRINGINBUF *PSTRINGINBUF;
12113
12114 USHORT KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd);
12115 USHORT KbdClose (HKBD hkbd);
12116 USHORT KbdDeRegister (VOID);
12117 USHORT KbdFlushBuffer (HKBD hkbd);
12118 USHORT KbdFreeFocus (HKBD hkbd);
12119 USHORT KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd);
12120 USHORT KbdGetFocus (USHORT fWait, HKBD hkbd);
12121 USHORT KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
12122 USHORT KbdGetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
12123 USHORT KbdOpen (PHKBD phkbd);
12124 USHORT KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd);
12125 USHORT KbdRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask);
12126 USHORT KbdSetCp (USHORT usReserved, USHORT idCP, HKBD hkbd);
12127 USHORT KbdSetCustXt (PUSHORT pusCodePage, HKBD hkbd);
12128 USHORT KbdSetFgnd (VOID);
12129 USHORT KbdSetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
12130 USHORT KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
12131 USHORT KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fWait, HKBD hkbd);
12132 USHORT KbdSynch (USHORT fWait);
12133 USHORT KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd);
12134
12135 #endif /* INCL_KBD */
12136
12137 #if defined (INCL_VIO)
12138
12139 #define ANSI_OFF 0
12140 #define ANSI_ON 1
12141
12142 #define COLORS_2 0x01
12143 #define COLORS_4 0x02
12144 #define COLORS_16 0x04
12145
12146 #define VGMT_OTHER 0x01
12147 #define VGMT_GRAPHICS 0x02
12148 #define VGMT_DISABLEBURST 0x04
12149
12150 #define VP_NOWAIT 0x0000
12151 #define VP_WAIT 0x0001
12152 #define VP_OPAQUE 0x0000
12153 #define VP_TRANSPARENT 0x0002
12154
12155 #define VMWR_POPUP 0
12156 #define VMWN_POPUP 0
12157
12158 #define VSRWI_SAVEANDREDRAW 0
12159 #define VSRWI_REDRAW 1
12160
12161 #define VSRWN_SAVE 0
12162 #define VSRWN_REDRAW 1
12163
12164 #define UNDOI_GETOWNER 0
12165 #define UNDOI_RELEASEOWNER 1
12166
12167 #define UNDOK_ERRORCODE 0
12168 #define UNDOK_TERMINATE 1
12169
12170 #define LOCKIO_NOWAIT 0
12171 #define LOCKIO_WAIT 1
12172
12173 #define LOCK_SUCCESS 0
12174 #define LOCK_FAIL 1
12175
12176 #define VCC_SBCSCHAR 0
12177 #define VCC_DBCSFULLCHAR 1
12178 #define VCC_DBCS1STHALF 2
12179 #define VCC_DBCS2NDHALF 3
12180
12181 #define VGFI_GETCURFONT 0
12182 #define VGFI_GETROMFONT 1
12183
12184 #define VIO_CONFIG_CURRENT 0
12185 #define VIO_CONFIG_PRIMARY 1
12186 #define VIO_CONFIG_SECONDARY 2
12187
12188 #define DISPLAY_MONOCHROME 0
12189 #define DISPLAY_CGA 1
12190 #define DISPLAY_EGA 2
12191 #define DISPLAY_VGA 3
12192 #define DISPLAY_8514A 7
12193 #define DISPLAY_IMAGEADAPTER 8
12194 #define DISPLAY_XGA 9
12195
12196 #define MONITOR_MONOCHROME 0x0000
12197 #define MONITOR_COLOR 0x0001
12198 #define MONITOR_ENHANCED 0x0002
12199 #define MONITOR_8503 0x0003
12200 #define MONITOR_851X_COLOR 0x0004
12201 #define MONITOR_8514 0x0009
12202 #define MONITOR_FLATPANEL 0x000a
12203 #define MONITOR_8507_8604 0x000b
12204 #define MONITOR_8515 0x000c
12205 #define MONITOR_9515 0x000f
12206 #define MONITOR_9517 0x0011
12207 #define MONITOR_9518 0x0012
12208
12209 #define VR_VIOGETCURPOS 0x00000001
12210 #define VR_VIOGETCURTYPE 0x00000002
12211 #define VR_VIOGETMODE 0x00000004
12212 #define VR_VIOGETBUF 0x00000008
12213 #define VR_VIOGETPHYSBUF 0x00000010
12214 #define VR_VIOSETCURPOS 0x00000020
12215 #define VR_VIOSETCURTYPE 0x00000040
12216 #define VR_VIOSETMODE 0x00000080
12217 #define VR_VIOSHOWBUF 0x00000100
12218 #define VR_VIOREADCHARSTR 0x00000200
12219 #define VR_VIOREADCELLSTR 0x00000400
12220 #define VR_VIOWRTNCHAR 0x00000800
12221 #define VR_VIOWRTNATTR 0x00001000
12222 #define VR_VIOWRTNCELL 0x00002000
12223 #define VR_VIOWRTTTY 0x00004000
12224 #define VR_VIOWRTCHARSTR 0x00008000
12225 #define VR_VIOWRTCHARSTRATT 0x00010000
12226 #define VR_VIOWRTCELLSTR 0x00020000
12227 #define VR_VIOSCROLLUP 0x00040000
12228 #define VR_VIOSCROLLDN 0x00080000
12229 #define VR_VIOSCROLLLF 0x00100000
12230 #define VR_VIOSCROLLRT 0x00200000
12231 #define VR_VIOSETANSI 0x00400000
12232 #define VR_VIOGETANSI 0x00800000
12233 #define VR_VIOPRTSC 0x01000000
12234 #define VR_VIOSCRLOCK 0x02000000
12235 #define VR_VIOSCRUNLOCK 0x04000000
12236 #define VR_VIOSAVREDRAWWAIT 0x08000000
12237 #define VR_VIOSAVREDRAWUNDO 0x10000000
12238 #define VR_VIOPOPUP 0x20000000
12239 #define VR_VIOENDPOPUP 0x40000000
12240 #define VR_VIOPRTSCTOGGLE 0x80000000
12241
12242 #define VR_VIOMODEWAIT 0x00000001
12243 #define VR_VIOMODEUNDO 0x00000002
12244 #define VR_VIOGETFONT 0x00000004
12245 #define VR_VIOGETCONFIG 0x00000008
12246 #define VR_VIOSETCP 0x00000010
12247 #define VR_VIOGETCP 0x00000020
12248 #define VR_VIOSETFONT 0x00000040
12249 #define VR_VIOGETSTATE 0x00000080
12250 #define VR_VIOSETSTATE 0x00000100
12251
12252
12253 typedef USHORT HVIO;
12254 typedef HVIO *PHVIO;
12255
12256
12257 typedef struct _VIOMODEINFO
12258 {
12259 USHORT cb;
12260 UCHAR fbType;
12261 UCHAR color;
12262 USHORT col;
12263 USHORT row;
12264 USHORT hres;
12265 USHORT vres;
12266 UCHAR fmt_ID;
12267 UCHAR attrib;
12268 ULONG buf_addr;
12269 ULONG buf_length;
12270 ULONG full_length;
12271 ULONG partial_length;
12272 PCH ext_data_addr;
12273 } VIOMODEINFO;
12274 typedef VIOMODEINFO *PVIOMODEINFO;
12275
12276 typedef struct _VIOCONFIGINFO
12277 {
12278 USHORT cb;
12279 USHORT adapter;
12280 USHORT display;
12281 ULONG cbMemory;
12282 USHORT Configuration;
12283 USHORT VDHVersion;
12284 USHORT Flags;
12285 ULONG HWBufferSize;
12286 ULONG FullSaveSize;
12287 ULONG PartSaveSize;
12288 USHORT EMAdaptersOFF;
12289 USHORT EMDisplaysOFF;
12290 } VIOCONFIGINFO;
12291 typedef VIOCONFIGINFO *PVIOCONFIGINFO;
12292
12293 typedef struct _VIOPHYSBUF
12294 {
12295 PBYTE pBuf;
12296 ULONG cb;
12297 SEL asel[1];
12298 } VIOPHYSBUF;
12299 typedef VIOPHYSBUF *PVIOPHYSBUF;
12300
12301 typedef struct _VIOPALSTATE
12302 {
12303 USHORT cb;
12304 USHORT type;
12305 USHORT iFirst;
12306 USHORT acolor[1];
12307 } VIOPALSTATE;
12308 typedef VIOPALSTATE *PVIOPALSTATE;
12309
12310 typedef struct _VIOOVERSCAN
12311 {
12312 USHORT cb;
12313 USHORT type;
12314 USHORT color;
12315 } VIOOVERSCAN;
12316 typedef VIOOVERSCAN *PVIOOVERSCAN;
12317
12318 typedef struct _VIOINTENSITY
12319 {
12320 USHORT cb;
12321 USHORT type;
12322 USHORT fs;
12323 } VIOINTENSITY;
12324 typedef VIOINTENSITY *PVIOINTENSITY;
12325
12326 typedef struct _VIOCOLORREG
12327 {
12328 USHORT cb;
12329 USHORT type;
12330 USHORT firstcolorreg;
12331 USHORT numcolorregs;
12332 PCH colorregaddr;
12333 } VIOCOLORREG;
12334 typedef VIOCOLORREG *PVIOCOLORREG;
12335
12336 typedef struct _VIOSETULINELOC
12337 {
12338 USHORT cb;
12339 USHORT type;
12340 USHORT scanline;
12341 } VIOSETULINELOC;
12342 typedef VIOSETULINELOC *PVIOSETULINELOC;
12343
12344 typedef struct _VIOSETTARGET
12345 {
12346 USHORT cb;
12347 USHORT type;
12348 USHORT defaultalgorithm;
12349 } VIOSETTARGET;
12350 typedef VIOSETTARGET *PVIOSETTARGET;
12351
12352 typedef struct _VIOCURSORINFO
12353 {
12354 USHORT yStart;
12355 USHORT cEnd;
12356 USHORT cx;
12357 USHORT attr;
12358 } VIOCURSORINFO;
12359 typedef VIOCURSORINFO *PVIOCURSORINFO;
12360
12361 typedef struct _VIOFONTINFO
12362 {
12363 USHORT cb;
12364 USHORT type;
12365 USHORT cxCell;
12366 USHORT cyCell;
12367 ULONG pbData; /* PVOID16 / _far16ptr */
12368 USHORT cbData;
12369 } VIOFONTINFO;
12370 typedef VIOFONTINFO *PVIOFONTINFO;
12371
12372
12373 USHORT VioCheckCharType (PUSHORT pType, USHORT usRow, USHORT usColumn,
12374 HVIO hvio);
12375 USHORT VioDeRegister (VOID);
12376 USHORT VioEndPopUp (HVIO hvio);
12377 USHORT VioGetAnsi (PUSHORT pfAnsi, HVIO hvio);
12378 USHORT VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio);
12379 USHORT VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin, HVIO hvio);
12380 USHORT VioGetCp (USHORT usReserved, PUSHORT pusCodePage, HVIO hvio);
12381 USHORT VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio);
12382 USHORT VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
12383 USHORT VioGetFont (PVIOFONTINFO pviofi, HVIO hvio);
12384 USHORT VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
12385 USHORT VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved);
12386 USHORT VioGetState (PVOID pState, HVIO hvio);
12387 USHORT VioGlobalReg (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1,
12388 ULONG ulFunMask2, USHORT usReturn);
12389 USHORT VioModeUndo (USHORT usOwnerInd, USHORT usKillInd, USHORT usReserved);
12390 USHORT VioModeWait (USHORT usReqType, PUSHORT pNotifyType, USHORT usReserved);
12391 USHORT VioPopUp (PUSHORT pfWait, HVIO hvio);
12392 USHORT VioPrtSc (HVIO hvio);
12393 USHORT VioPrtScToggle (HVIO hvio);
12394 USHORT VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow,
12395 USHORT usColumn, HVIO hvio);
12396 USHORT VioReadCharStr (PCH pch, PUSHORT pcb, USHORT usRow, USHORT usColumn,
12397 HVIO hvio);
12398 USHORT VioRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1,
12399 ULONG ulFunMask2);
12400 USHORT VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd,
12401 USHORT usReserved);
12402 USHORT VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pusNotifyType,
12403 USHORT usReserved);
12404 USHORT VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio);
12405 USHORT VioScrollDn (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
12406 USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio);
12407 USHORT VioScrollLf (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
12408 USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio);
12409 USHORT VioScrollRt (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
12410 USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio);
12411 USHORT VioScrollUp (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
12412 USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio);
12413 USHORT VioScrUnLock (HVIO hvio);
12414 USHORT VioSetAnsi (USHORT fAnsi, HVIO hvio);
12415 USHORT VioSetCp (USHORT usReserved, USHORT usCodePage, HVIO hvio);
12416 USHORT VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio);
12417 USHORT VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
12418 USHORT VioSetFont (PVIOFONTINFO pviofi, HVIO hvio);
12419 USHORT VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
12420 USHORT VioSetState (CPVOID pState, HVIO hvio);
12421 USHORT VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio);
12422 USHORT VioWrtCellStr (PCCH pchCellStr, USHORT cb, USHORT usRow,
12423 USHORT usColumn, HVIO hvio);
12424 USHORT VioWrtCharStr (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
12425 HVIO hvio);
12426 USHORT VioWrtCharStrAtt (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
12427 PBYTE pAttr, HVIO hvio);
12428 USHORT VioWrtNAttr (__const__ BYTE *pAttr, USHORT cb, USHORT usRow,
12429 USHORT usColumn, HVIO hvio);
12430 USHORT VioWrtNCell (__const__ BYTE *pCell, USHORT cb, USHORT usRow,
12431 USHORT usColumn, HVIO hvio);
12432 USHORT VioWrtNChar (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
12433 HVIO hvio);
12434 USHORT VioWrtTTY (PCCH pch, USHORT cb, HVIO hvio);
12435
12436 #endif /* INCL_VIO */
12437
12438 #if defined (INCL_MOU)
12439
12440 #define MHK_BUTTON1 0x0001
12441 #define MHK_BUTTON2 0x0002
12442 #define MHK_BUTTON3 0x0004
12443
12444 #define MOU_NOWAIT 0x0000
12445 #define MOU_WAIT 0x0001
12446
12447 #define MOUSE_MOTION 0x0001
12448 #define MOUSE_MOTION_WITH_BN1_DOWN 0x0002
12449 #define MOUSE_BN1_DOWN 0x0004
12450 #define MOUSE_MOTION_WITH_BN2_DOWN 0x0008
12451 #define MOUSE_BN2_DOWN 0x0010
12452 #define MOUSE_MOTION_WITH_BN3_DOWN 0x0020
12453 #define MOUSE_BN3_DOWN 0x0040
12454
12455 #define MOUSE_QUEUEBUSY 0x0001
12456 #define MOUSE_BLOCKREAD 0x0002
12457 #define MOUSE_FLUSH 0x0004
12458 #define MOUSE_UNSUPPORTED_MODE 0x0008
12459 #define MOUSE_DISABLED 0x0100
12460 #define MOUSE_MICKEYS 0x0200
12461
12462 #define MOU_NODRAW 0x0001
12463 #define MOU_DRAW 0x0000
12464 #define MOU_MICKEYS 0x0002
12465 #define MOU_PELS 0x0000
12466
12467 #define MR_MOUGETNUMBUTTONS 0x00000001
12468 #define MR_MOUGETNUMMICKEYS 0x00000002
12469 #define MR_MOUGETDEVSTATUS 0x00000004
12470 #define MR_MOUGETNUMQUEEL 0x00000008
12471 #define MR_MOUREADEVENTQUE 0x00000010
12472 #define MR_MOUGETSCALEFACT 0x00000020
12473 #define MR_MOUGETEVENTMASK 0x00000040
12474 #define MR_MOUSETSCALEFACT 0x00000080
12475 #define MR_MOUSETEVENTMASK 0x00000100
12476 #define MR_MOUOPEN 0x00000800
12477 #define MR_MOUCLOSE 0x00001000
12478 #define MR_MOUGETPTRSHAPE 0x00002000
12479 #define MR_MOUSETPTRSHAPE 0x00004000
12480 #define MR_MOUDRAWPTR 0x00008000
12481 #define MR_MOUREMOVEPTR 0x00010000
12482 #define MR_MOUGETPTRPOS 0x00020000
12483 #define MR_MOUSETPTRPOS 0x00040000
12484 #define MR_MOUINITREAL 0x00080000
12485 #define MR_MOUSETDEVSTATUS 0x00100000
12486
12487
12488 typedef USHORT HMOU;
12489 typedef HMOU *PHMOU;
12490
12491
12492 typedef struct _MOUEVENTINFO
12493 {
12494 USHORT fs;
12495 ULONG time;
12496 SHORT row;
12497 SHORT col;
12498 } MOUEVENTINFO;
12499 typedef MOUEVENTINFO *PMOUEVENTINFO;
12500
12501 typedef struct _MOUQUEINFO
12502 {
12503 USHORT cEvents;
12504 USHORT cmaxEvents;
12505 } MOUQUEINFO;
12506 typedef MOUQUEINFO *PMOUQUEINFO;
12507
12508 typedef struct _PTRLOC
12509 {
12510 USHORT row;
12511 USHORT col;
12512 } PTRLOC;
12513 typedef PTRLOC *PPTRLOC;
12514
12515 typedef struct _NOPTRRECT
12516 {
12517 USHORT row;
12518 USHORT col;
12519 USHORT cRow;
12520 USHORT cCol;
12521 } NOPTRRECT;
12522 typedef NOPTRRECT *PNOPTRRECT;
12523
12524 typedef struct _PTRSHAPE
12525 {
12526 USHORT cb;
12527 USHORT col;
12528 USHORT row;
12529 USHORT colHot;
12530 USHORT rowHot;
12531 } PTRSHAPE;
12532 typedef PTRSHAPE *PPTRSHAPE;
12533
12534 typedef struct _SCALEFACT
12535 {
12536 USHORT rowScale;
12537 USHORT colScale;
12538 } SCALEFACT;
12539 typedef SCALEFACT *PSCALEFACT;
12540
12541 typedef struct _THRESHOLD
12542 {
12543 USHORT Length;
12544 USHORT Level1;
12545 USHORT Lev1Mult;
12546 USHORT Level2;
12547 USHORT lev2Mult;
12548 } THRESHOLD;
12549 typedef THRESHOLD *PTHRESHOLD;
12550
12551
12552 USHORT MouClose (HMOU hmou);
12553 USHORT MouDeRegister (VOID);
12554 USHORT MouDrawPtr (HMOU hmou);
12555 USHORT MouFlushQue (HMOU hmou);
12556 USHORT MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
12557 USHORT MouGetEventMask (PUSHORT pfsEvents, HMOU hmou);
12558 USHORT MouGetNumButtons (PUSHORT pcButtons, HMOU hmou);
12559 USHORT MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou);
12560 USHORT MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou);
12561 USHORT MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
12562 USHORT MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
12563 USHORT MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
12564 USHORT MouGetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
12565 USHORT MouInitReal (PCSZ pszDriverName);
12566 USHORT MouOpen (PCSZ pszDvrName, PHMOU phmou);
12567 USHORT MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait, HMOU hmou);
12568 USHORT MouRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask);
12569 USHORT MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou);
12570 USHORT MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
12571 USHORT MouSetEventMask (PUSHORT pfsEvents, HMOU hmou);
12572 USHORT MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
12573 USHORT MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
12574 USHORT MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
12575 USHORT MouSetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
12576 USHORT MouSynch (USHORT fWait);
12577
12578 #endif /* INCL_MOU */
12579
12580 /* ------------------------------ THE END --------------------------------- */
12581
12582 #pragma pack(4)
12583
12584 #ifdef __cplusplus
12585 }
12586 #endif /* __cplusplus */
12587
12588 #endif /* not _OS2EMX_H */
12589
12590 /* Note 1:
12591
12592 There are some inconsistencies in the structure names defined in
12593 the header files of the IBM Developer's Toolkit for OS/2. To make
12594 C++ modules compiled with those headers linkable with C++ modules
12595 compiled with this header, we have to use the same (questionable)
12596 structure names. */
12597
12598 /*
12599 * Local variables:
12600 * indent-tabs-mode: t
12601 * end:
12602 */
12603