home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / e / emxdev8f.zip / OS2EMX.H < prev    next >
C/C++ Source or Header  |  1992-12-15  |  324KB  |  8,759 lines

  1. /* os2emx.h (emx+gcc) */
  2.  
  3. #if !defined (_OS2EMX_H)
  4.  
  5. #define _OS2EMX_H
  6.  
  7. #pragma pack(1)
  8.  
  9. /* ------------------------ INCL_ SYMBOLS --------------------------------- */
  10.  
  11. #if defined (INCL_BASE)
  12. #define INCL_DOS
  13. #define INCL_SUB
  14. #endif
  15.  
  16. #if defined (INCL_DOS)
  17. #define INCL_DOSMODULEMGR
  18. #define INCL_DOSRESOURCES
  19. #endif
  20.  
  21. #if defined (INCL_PM)
  22. #define INCL_AVIO
  23. #define INCL_WIN
  24. #endif
  25.  
  26. #if defined (INCL_WIN)
  27. #define INCL_WINMLE
  28. #define INCL_WINSTDDLGS
  29. #elif defined (RC_INVOKED)
  30. #define INCL_WINMLE
  31. #define INCL_WINSTDDLGS
  32. #endif
  33.  
  34. #if defined (INCL_WINSTDDLGS)
  35. #define INCL_WINSTDFILE
  36. #define INCL_WINSTDSPIN
  37. #define INCL_WINSTDSLIDER
  38. #endif
  39.  
  40. /* ------------------------ DISABLE KEYWORDS ------------------------------ */
  41.  
  42. #define APIENTRY
  43. #define EXPENTRY
  44. #define FAR
  45.  
  46. /* ------------------------ CONSTANTS AND TYPES --------------------------- */
  47.  
  48. #if !defined (FALSE)
  49. #define FALSE 0
  50. #endif
  51.  
  52. #if !defined (TRUE)
  53. #define TRUE 1
  54. #endif
  55.  
  56. #define VOID void
  57.  
  58. #define NULLHANDLE        ((LHANDLE)0)
  59. #define NULLSHANDLE       ((SHANDLE)0)
  60.  
  61. #if !defined (NULL)
  62. #define NULL ((void *)0)
  63. #endif
  64.  
  65. typedef int INT;                /* Required for Toolkit sample programs */
  66. typedef unsigned UINT;
  67. typedef unsigned long APIRET;
  68.  
  69. typedef unsigned short BOOL;
  70. typedef BOOL *PBOOL;
  71.  
  72. typedef unsigned long BOOL32;
  73. typedef BOOL *PBOOL32;
  74.  
  75. typedef char CHAR;
  76. typedef CHAR *PCHAR;
  77.  
  78. typedef unsigned char UCHAR;
  79. typedef UCHAR *PUCHAR;
  80.  
  81. typedef unsigned char BYTE;
  82. typedef BYTE *PBYTE;
  83.  
  84. typedef short SHORT;
  85. typedef SHORT *PSHORT;
  86.  
  87. typedef unsigned short USHORT;
  88. typedef USHORT *PUSHORT;
  89.  
  90. typedef long LONG;
  91. typedef LONG *PLONG;
  92.  
  93. typedef unsigned long ULONG;
  94. typedef ULONG *PULONG;
  95.  
  96. typedef VOID *PVOID;
  97. typedef PVOID *PPVOID;
  98. typedef unsigned char *PCH;
  99. typedef unsigned char *PSZ;
  100. typedef __const__ unsigned char *CONSTPCH;
  101.  
  102. typedef __const__ VOID *CONSTPVOID;
  103. typedef __const__ unsigned char *CONSTPSZ;
  104.  
  105. typedef CHAR STR8[8];
  106. typedef STR8 *PSTR8;
  107.  
  108. typedef CHAR STR16[16];
  109. typedef STR16 *PSTR16;
  110. typedef CHAR STR32[32];
  111. typedef STR32 *PSTR32;
  112. typedef CHAR STR64[64];
  113. typedef STR64 *PSTR64;
  114.  
  115. typedef unsigned long SHANDLE;
  116. typedef VOID *LHANDLE;
  117.  
  118. typedef SHANDLE HFILE;
  119. typedef HFILE *PHFILE;
  120.  
  121. typedef SHANDLE HPIPE;
  122. typedef HPIPE *PHPIPE;
  123.  
  124. typedef SHANDLE HQUEUE;
  125. typedef HQUEUE *PHQUEUE;
  126.  
  127. typedef SHANDLE HMODULE;
  128. typedef HMODULE *PHMODULE;
  129.  
  130. typedef ULONG PID;
  131. typedef PID *PPID;
  132.  
  133. typedef ULONG TID;
  134. typedef TID *PTID;
  135.  
  136. typedef int (*PFN)();
  137. typedef PFN *PPFN;
  138.  
  139. typedef LONG COLOR;
  140. typedef COLOR *PCOLOR;
  141.  
  142. typedef LHANDLE HPAL;
  143. typedef HPAL *PHPAL;
  144.  
  145. typedef LHANDLE HBITMAP;
  146. typedef HBITMAP *PHBITMAP;
  147.  
  148. typedef LHANDLE HMF;
  149. typedef HMF *PHMF;
  150.  
  151. typedef ULONG ERRORID;
  152. typedef ERRORID *PERRORID;
  153.  
  154. typedef USHORT SEL;
  155. typedef SEL *PSEL;
  156.  
  157. #define FIELDOFFSET(t,f)  ((SHORT)&(((t *)0)->field))
  158.  
  159. #define MAKETYPE(v,t)     (*((t *)&v))
  160.  
  161. #define MAKEUSHORT(l,h)   (((USHORT)(l)) | ((USHORT)(h))<<8)
  162. #define MAKESHORT(l,h)    ((SHORT)MAKEUSHORT(l, h))
  163.  
  164. #define MAKEULONG(l,h)    ((ULONG)(((USHORT)(l)) | ((ULONG)((USHORT)(h)))<<16))
  165. #define MAKELONG(l, h)    ((LONG)MAKEULONG(l, h))
  166.  
  167. #define LOUCHAR(w)        ((UCHAR)(w))
  168. #define HIUCHAR(w)        ((UCHAR)((USHORT)(w)>>8))
  169.  
  170. #define LOBYTE(x)         LOUCHAR(x)
  171. #define HIBYTE(x)         HIUCHAR(x)
  172.  
  173. #define LOUSHORT(x)       ((USHORT)((ULONG)(x)))
  174. #define HIUSHORT(x)       ((USHORT)((ULONG)(x)>>16))
  175.  
  176. /* ---------------------------- ERROR CODES ------------------------------- */
  177.  
  178. #define NO_ERROR                                0
  179. #define ERROR_INVALID_FUNCTION                  1
  180. #define ERROR_FILE_NOT_FOUND                    2
  181. #define ERROR_PATH_NOT_FOUND                    3
  182. #define ERROR_TOO_MANY_OPEN_FILES               4
  183. #define ERROR_ACCESS_DENIED                     5
  184. #define ERROR_INVALID_HANDLE                    6
  185. #define ERROR_ARENA_TRASHED                     7
  186. #define ERROR_NOT_ENOUGH_MEMORY                 8
  187. #define ERROR_INVALID_BLOCK                     9
  188. #define ERROR_BAD_ENVIRONMENT                  10
  189. #define ERROR_BAD_FORMAT                       11
  190. #define ERROR_INVALID_ACCESS                   12
  191. #define ERROR_INVALID_DATA                     13
  192. #define ERROR_INVALID_DRIVE                    15
  193. #define ERROR_CURRENT_DIRECTORY                16
  194. #define ERROR_NOT_SAME_DEVICE                  17
  195. #define ERROR_NO_MORE_FILES                    18
  196. #define ERROR_WRITE_PROTECT                    19
  197. #define ERROR_BAD_UNIT                         20
  198. #define ERROR_NOT_READY                        21
  199. #define ERROR_BAD_COMMAND                      22
  200. #define ERROR_CRC                              23
  201. #define ERROR_BAD_LENGTH                       24
  202. #define ERROR_SEEK                             25
  203. #define ERROR_NOT_DOS_DISK                     26
  204. #define ERROR_SECTOR_NOT_FOUND                 27
  205. #define ERROR_OUT_OF_PAPER                     28
  206. #define ERROR_WRITE_FAULT                      29
  207. #define ERROR_READ_FAULT                       30
  208. #define ERROR_GEN_FAILURE                      31
  209. #define ERROR_SHARING_VIOLATION                32
  210. #define ERROR_LOCK_VIOLATION                   33
  211. #define ERROR_WRONG_DISK                       34
  212. #define ERROR_FCB_UNAVAILABLE                  35
  213. #define ERROR_SHARING_BUFFER_EXCEEDED          36
  214. #define ERROR_CODE_PAGE_MISMATCHED             37
  215. #define ERROR_HANDLE_EOF                       38
  216. #define ERROR_HANDLE_DISK_FULL                 39
  217. #define ERROR_NOT_SUPPORTED                    50
  218. #define ERROR_REM_NOT_LIST                     51
  219. #define ERROR_DUP_NAME                         52
  220. #define ERROR_BAD_NETPATH                      53
  221. #define ERROR_NETWORK_BUSY                     54
  222. #define ERROR_DEV_NOT_EXIST                    55
  223. #define ERROR_TOO_MANY_CMDS                    56
  224. #define ERROR_ADAP_HDW_ERR                     57
  225. #define ERROR_BAD_NET_RESP                     58
  226. #define ERROR_UNEXP_NET_ERR                    59
  227. #define ERROR_BAD_REM_ADAP                     60
  228. #define ERROR_PRINTQ_FULL                      61
  229. #define ERROR_NO_SPOOL_SPACE                   62
  230. #define ERROR_PRINT_CANCELLED                  63
  231. #define ERROR_NETNAME_DELETED                  64
  232. #define ERROR_NETWORK_ACCESS_DENIED            65
  233. #define ERROR_BAD_DEV_TYPE                     66
  234. #define ERROR_BAD_NET_NAME                     67
  235. #define ERROR_TOO_MANY_NAMES                   68
  236. #define ERROR_TOO_MANY_SESS                    69
  237. #define ERROR_SHARING_PAUSED                   70
  238. #define ERROR_REQ_NOT_ACCEP                    71
  239. #define ERROR_REDIR_PAUSED                     72
  240. #define ERROR_SBCS_ATT_WRITE_PROT              73
  241. #define ERROR_SBCS_GENERAL_FAILURE             74
  242. #define ERROR_XGA_OUT_MEMORY                   75
  243. #define ERROR_FILE_EXISTS                      80
  244. #define ERROR_DUP_FCB                          81
  245. #define ERROR_CANNOT_MAKE                      82
  246. #define ERROR_FAIL_I24                         83
  247. #define ERROR_OUT_OF_STRUCTURES                84
  248. #define ERROR_ALREADY_ASSIGNED                 85
  249. #define ERROR_INVALID_PASSWORD                 86
  250. #define ERROR_INVALID_PARAMETER                87
  251. #define ERROR_NET_WRITE_FAULT                  88
  252. #define ERROR_NO_PROC_SLOTS                    89
  253. #define ERROR_NOT_FROZEN                       90
  254. #define ERROR_SYS_COMP_NOT_LOADED              90 /*!*/
  255. #define ERR_TSTOVFL                            91
  256. #define ERR_TSTDUP                             92
  257. #define ERROR_NO_ITEMS                         93
  258. #define ERROR_INTERRUPT                        95
  259. #define ERROR_DEVICE_IN_USE                    99
  260. #define ERROR_TOO_MANY_SEMAPHORES             100
  261. #define ERROR_EXCL_SEM_ALREADY_OWNED          101
  262. #define ERROR_SEM_IS_SET                      102
  263. #define ERROR_TOO_MANY_SEM_REQUESTS           103
  264. #define ERROR_INVALID_AT_INTERRUPT_TIME       104
  265. #define ERROR_SEM_OWNER_DIED                  105
  266. #define ERROR_SEM_USER_LIMIT                  106
  267. #define ERROR_DISK_CHANGE                     107
  268. #define ERROR_DRIVE_LOCKED                    108
  269. #define ERROR_BROKEN_PIPE                     109
  270. #define ERROR_OPEN_FAILED                     110
  271. #define ERROR_BUFFER_OVERFLOW                 111
  272. #define ERROR_DISK_FULL                       112
  273. #define ERROR_NO_MORE_SEARCH_HANDLES          113
  274. #define ERROR_INVALID_TARGET_HANDLE           114
  275. #define ERROR_PROTECTION_VIOLATION            115
  276. #define ERROR_VIOKBD_REQUEST                  116
  277. #define ERROR_INVALID_CATEGORY                117
  278. #define ERROR_INVALID_VERIFY_SWITCH           118
  279. #define ERROR_BAD_DRIVER_LEVEL                119
  280. #define ERROR_CALL_NOT_IMPLEMENTED            120
  281. #define ERROR_SEM_TIMEOUT                     121
  282. #define ERROR_INSUFFICIENT_BUFFER             122
  283. #define ERROR_INVALID_NAME                    123
  284. #define ERROR_INVALID_LEVEL                   124
  285. #define ERROR_NO_VOLUME_LABEL                 125
  286. #define ERROR_MOD_NOT_FOUND                   126
  287. #define ERROR_PROC_NOT_FOUND                  127
  288. #define ERROR_WAIT_NO_CHILDREN                128
  289. #define ERROR_CHILD_NOT_COMPLETE              129
  290. #define ERROR_DIRECT_ACCESS_HANDLE            130
  291. #define ERROR_NEGATIVE_SEEK                   131
  292. #define ERROR_SEEK_ON_DEVICE                  132
  293. #define ERROR_IS_JOIN_TARGET                  133
  294. #define ERROR_IS_JOINED                       134
  295. #define ERROR_IS_SUBSTED                      135
  296. #define ERROR_NOT_JOINED                      136
  297. #define ERROR_NOT_SUBSTED                     137
  298. #define ERROR_JOIN_TO_JOIN                    138
  299. #define ERROR_SUBST_TO_SUBST                  139
  300. #define ERROR_JOIN_TO_SUBST                   140
  301. #define ERROR_SUBST_TO_JOIN                   141
  302. #define ERROR_BUSY_DRIVE                      142
  303. #define ERROR_SAME_DRIVE                      143
  304. #define ERROR_DIR_NOT_ROOT                    144
  305. #define ERROR_DIR_NOT_EMPTY                   145
  306. #define ERROR_IS_SUBST_PATH                   146
  307. #define ERROR_IS_JOIN_PATH                    147
  308. #define ERROR_PATH_BUSY                       148
  309. #define ERROR_IS_SUBST_TARGET                 149
  310. #define ERROR_SYSTEM_TRACE                    150
  311. #define ERROR_INVALID_EVENT_COUNT             151
  312. #define ERROR_TOO_MANY_MUXWAITERS             152
  313. #define ERROR_INVALID_LIST_FORMAT             153
  314. #define ERROR_LABEL_TOO_LONG                  154
  315. #define ERROR_TOO_MANY_TCBS                   155
  316. #define ERROR_SIGNAL_REFUSED                  156
  317. #define ERROR_DISCARDED                       157
  318. #define ERROR_NOT_LOCKED                      158
  319. #define ERROR_BAD_THREADID_ADDR               159
  320. #define ERROR_BAD_ARGUMENTS                   160
  321. #define ERROR_BAD_PATHNAME                    161
  322. #define ERROR_SIGNAL_PENDING                  162
  323. #define ERROR_UNCERTAIN_MEDIA                 163
  324. #define ERROR_MAX_THRDS_REACHED               164
  325. #define ERROR_MONITORS_NOT_SUPPORTED          165
  326. #define ERROR_UNC_DRIVER_NOT_INSTALLED        166
  327. #define ERROR_LOCK_FAILED                     167
  328. #define ERROR_SWAPIO_FAILED                   168
  329. #define ERROR_SWAPIN_FAILED                   169
  330. #define ERROR_BUSY                            170
  331. #define ERROR_CANCEL_VIOLATION                173
  332. #define ERROR_ATOMIC_LOCK_NOT_SUPPORTED       174
  333. #define ERROR_READ_LOCKS_NOT_SUPPORTED        175
  334. #define ERROR_INVALID_SEGMENT_NUMBER          180
  335. #define ERROR_INVALID_CALLGATE                181
  336. #define ERROR_INVALID_ORDINAL                 182
  337. #define ERROR_ALREADY_EXISTS                  183
  338. #define ERROR_NO_CHILD_PROCESS                184
  339. #define ERROR_CHILD_ALIVE_NOWAIT              185
  340. #define ERROR_INVALID_FLAG_NUMBER             186
  341. #define ERROR_SEM_NOT_FOUND                   187
  342. #define ERROR_INVALID_STARTING_CODESEG        188
  343. #define ERROR_INVALID_STACKSEG                189
  344. #define ERROR_INVALID_MODULETYPE              190
  345. #define ERROR_INVALID_EXE_SIGNATURE           191
  346. #define ERROR_EXE_MARKED_INVALID              192
  347. #define ERROR_BAD_EXE_FORMAT                  193
  348. #define ERROR_ITERATED_DATA_EXCEEDS_64K       194
  349. #define ERROR_INVALID_MINALLOCSIZE            195
  350. #define ERROR_DYNLINK_FROM_INVALID_RING       196
  351. #define ERROR_IOPL_NOT_ENABLED                197
  352. #define ERROR_INVALID_SEGDPL                  198
  353. #define ERROR_AUTODATASEG_EXCEEDS_64K         199
  354. #define ERROR_RING2SEG_MUST_BE_MOVABLE        200
  355. #define ERROR_RELOCSRC_CHAIN_EXCEEDS_SEGLIMIT 201
  356. #define ERROR_INFLOOP_IN_RELOC_CHAIN          202
  357. #define ERROR_ENVVAR_NOT_FOUND                203
  358. #define ERROR_NOT_CURRENT_CTRY                204
  359. #define ERROR_NO_SIGNAL_SENT                  205
  360. #define ERROR_FILENAME_EXCED_RANGE            206
  361. #define ERROR_RING2_STACK_IN_USE              207
  362. #define ERROR_META_EXPANSION_TOO_LONG         208
  363. #define ERROR_INVALID_SIGNAL_NUMBER           209
  364. #define ERROR_THREAD_1_INACTIVE               210
  365. #define ERROR_INFO_NOT_AVAIL                  211
  366. #define ERROR_LOCKED                          212
  367. #define ERROR_BAD_DYNALINK                    213
  368. #define ERROR_TOO_MANY_MODULES                214
  369. #define ERROR_NESTING_NOT_ALLOWED             215
  370. #define ERROR_CANNOT_SHRINK                   216
  371. #define ERROR_ZOMBIE_PROCESS                  217
  372. #define ERROR_STACK_IN_HIGH_MEMORY            218
  373. #define ERROR_INVALID_EXITROUTINE_RING        219
  374. #define ERROR_GETBUF_FAILED                   220
  375. #define ERROR_FLUSHBUF_FAILED                 221
  376. #define ERROR_TRANSFER_TOO_LONG               222
  377. #define ERROR_FORCENOSWAP_FAILED              223
  378. #define ERROR_SMG_NO_TARGET_WINDOW            224
  379. #define ERROR_NO_CHILDREN                     228
  380. #define ERROR_INVALID_SCREEN_GROUP            229
  381. #define ERROR_BAD_PIPE                        230
  382. #define ERROR_PIPE_BUSY                       231
  383. #define ERROR_NO_DATA                         232
  384. #define ERROR_PIPE_NOT_CONNECTED              233
  385. #define ERROR_MORE_DATA                       234
  386. #define ERROR_VC_DISCONNECTED                 240
  387. #define ERROR_CIRCULARITY_REQUESTED           250
  388. #define ERROR_DIRECTORY_IN_CDS                251
  389. #define ERROR_INVALID_FSD_NAME                252
  390. #define ERROR_INVALID_PATH                    253
  391. #define ERROR_INVALID_EA_NAME                 254
  392. #define ERROR_EA_LIST_INCONSISTENT            255
  393. #define ERROR_EA_LIST_TOO_LONG                256
  394. #define ERROR_NO_META_MATCH                   257
  395. #define ERROR_FINDNOTIFY_TIMEOUT              258
  396. #define ERROR_NO_MORE_ITEMS                   259
  397. #define ERROR_SEARCH_STRUC_REUSED             260
  398. #define ERROR_CHAR_NOT_FOUND                  261
  399. #define ERROR_TOO_MUCH_STACK                  262
  400. #define ERROR_INVALID_ATTR                    263
  401. #define ERROR_INVALID_STARTING_RING           264
  402. #define ERROR_INVALID_DLL_INIT_RING           265
  403. #define ERROR_CANNOT_COPY                     266
  404. #define ERROR_DIRECTORY                       267
  405. #define ERROR_OPLOCKED_FILE                   268
  406. #define ERROR_OPLOCK_THREAD_EXISTS            269
  407. #define ERROR_VOLUME_CHANGED                  270
  408. #define ERROR_FINDNOTIFY_HANDLE_IN_USE        271
  409. #define ERROR_FINDNOTIFY_HANDLE_CLOSED        272
  410. #define ERROR_NOTIFY_OBJECT_REMOVED           273
  411. #define ERROR_ALREADY_SHUTDOWN                274
  412. #define ERROR_EAS_DIDNT_FIT                   275
  413. #define ERROR_EA_FILE_CORRUPT                 276
  414. #define ERROR_EA_TABLE_FULL                   277
  415. #define ERROR_INVALID_EA_HANDLE               278
  416. #define ERROR_NO_CLUSTER                      279
  417. #define ERROR_CREATE_EA_FILE                  280
  418. #define ERROR_CANNOT_OPEN_EA_FILE             281
  419. #define ERROR_EAS_NOT_SUPPORTED               282
  420. #define ERROR_NEED_EAS_FOUND                  283
  421. #define ERROR_DUPLICATE_HANDLE                284
  422. #define ERROR_DUPLICATE_NAME                  285
  423. #define ERROR_EMPTY_MUXWAIT                   286
  424. #define ERROR_MUTEX_OWNED                     287
  425. #define ERROR_NOT_OWNER                       288
  426. #define ERROR_PARAM_TOO_SMALL                 289
  427. #define ERROR_TOO_MANY_HANDLES                290
  428. #define ERROR_TOO_MANY_OPENS                  291
  429. #define ERROR_WRONG_TYPE                      292
  430. #define ERROR_UNUSED_CODE                     293
  431. #define ERROR_THREAD_NOT_TERMINATED           294
  432. #define ERROR_INIT_ROUTINE_FAILED             295
  433. #define ERROR_MODULE_IN_USE                   296
  434. #define ERROR_NOT_ENOUGH_WATCHPOINTS          297
  435. #define ERROR_TOO_MANY_POSTS                  298
  436. #define ERROR_ALREADY_POSTED                  299
  437. #define ERROR_ALREADY_RESET                   300
  438. #define ERROR_SEM_BUSY                        301
  439. #define ERROR_INVALID_PROCID                  303
  440. #define ERROR_INVALID_PDELTA                  304
  441. #define ERROR_NOT_DESCENDANT                  305
  442. #define ERROR_NOT_SESSION_MANAGER             306
  443. #define ERROR_INVALID_PCLASS                  307
  444. #define ERROR_INVALID_SCOPE                   308
  445. #define ERROR_INVALID_THREADID                309
  446. #define ERROR_DOSSUB_SHRINK                   310
  447. #define ERROR_DOSSUB_NOMEM                    311
  448. #define ERROR_DOSSUB_OVERLAP                  312
  449. #define ERROR_DOSSUB_BADSIZE                  313
  450. #define ERROR_DOSSUB_BADFLAG                  314
  451. #define ERROR_DOSSUB_BADSELECTOR              315
  452. #define ERROR_MR_MSG_TOO_LONG                 316
  453. #define ERROR_MR_MID_NOT_FOUND                317
  454. #define ERROR_MR_UN_ACC_MSGF                  318
  455. #define ERROR_MR_INV_MSGF_FORMAT              319
  456. #define ERROR_MR_INV_IVCOUNT                  320
  457. #define ERROR_MR_UN_PERFORM                   321
  458. #define ERROR_TS_WAKEUP                       322
  459. #define ERROR_TS_SEMHANDLE                    323
  460. #define ERROR_TS_NOTIMER                      324
  461. #define ERROR_TS_HANDLE                       326
  462. #define ERROR_TS_DATETIME                     327
  463. #define ERROR_SYS_INTERNAL                    328
  464. #define ERROR_QUE_CURRENT_NAME                329
  465. #define ERROR_QUE_PROC_NOT_OWNED              330
  466. #define ERROR_QUE_PROC_OWNED                  331
  467. #define ERROR_QUE_DUPLICATE                   332
  468. #define ERROR_QUE_ELEMENT_NOT_EXIST           333
  469. #define ERROR_QUE_NO_MEMORY                   334
  470. #define ERROR_QUE_INVALID_NAME                335
  471. #define ERROR_QUE_INVALID_PRIORITY            336
  472. #define ERROR_QUE_INVALID_HANDLE              337
  473. #define ERROR_QUE_LINK_NOT_FOUND              338
  474. #define ERROR_QUE_MEMORY_ERROR                339
  475. #define ERROR_QUE_PREV_AT_END                 340
  476. #define ERROR_QUE_PROC_NO_ACCESS              341
  477. #define ERROR_QUE_EMPTY                       342
  478. #define ERROR_QUE_NAME_NOT_EXIST              343
  479. #define ERROR_QUE_NOT_INITIALIZED             344
  480. #define ERROR_QUE_UNABLE_TO_ACCESS            345
  481. #define ERROR_QUE_UNABLE_TO_ADD               346
  482. #define ERROR_QUE_UNABLE_TO_INIT              347
  483. #define ERROR_VIO_INVALID_MASK                349
  484. #define ERROR_VIO_PTR                         350
  485. #define ERROR_VIO_APTR                        351
  486. #define ERROR_VIO_RPTR                        352
  487. #define ERROR_VIO_CPTR                        353
  488. #define ERROR_VIO_LPTR                        354
  489. #define ERROR_VIO_MODE                        355
  490. #define ERROR_VIO_WIDTH                       356
  491. #define ERROR_VIO_ATTR                        357
  492. #define ERROR_VIO_ROW                         358
  493. #define ERROR_VIO_COL                         359
  494. #define ERROR_VIO_TOPROW                      360
  495. #define ERROR_VIO_BOTROW                      361
  496. #define ERROR_VIO_RIGHTCOL                    362
  497. #define ERROR_VIO_LEFTCOL                     363
  498. #define ERROR_SCS_CALL                        364
  499. #define ERROR_SCS_VALUE                       365
  500. #define ERROR_VIO_WAIT_FLAG                   366
  501. #define ERROR_VIO_UNLOCK                      367
  502. #define ERROR_SGS_NOT_SESSION_MGR             368
  503. #define ERROR_SMG_INVALID_SGID                369
  504. #define ERROR_SMG_INVALID_SESSION_ID          369 /*!*/
  505. #define ERROR_SMG_NOSG                        370
  506. #define ERROR_SMG_NO_SESSIONS                 370 /*!*/
  507. #define ERROR_SMG_GRP_NOT_FOUND               371
  508. #define ERROR_SMG_SESSION_NOT_FOUND           371 /*!*/
  509. #define ERROR_SMG_SET_TITLE                   372
  510. #define ERROR_KBD_PARAMETER                   373
  511. #define ERROR_KBD_NO_DEVICE                   374
  512. #define ERROR_KBD_INVALID_IOWAIT              375
  513. #define ERROR_KBD_INVALID_LENGTH              376
  514. #define ERROR_KBD_INVALID_ECHO_MASK           377
  515. #define ERROR_KBD_INVALID_INPUT_MASK          378
  516. #define ERROR_MON_INVALID_PARMS               379
  517. #define ERROR_MON_INVALID_DEVNAME             380
  518. #define ERROR_MON_INVALID_HANDLE              381
  519. #define ERROR_MON_BUFFER_TOO_SMALL            382
  520. #define ERROR_MON_BUFFER_EMPTY                383
  521. #define ERROR_MON_DATA_TOO_LARGE              384
  522. #define ERROR_MOUSE_NO_DEVICE                 385
  523. #define ERROR_MOUSE_INV_HANDLE                386
  524. #define ERROR_MOUSE_INV_PARMS                 387
  525. #define ERROR_MOUSE_CANT_RESET                388
  526. #define ERROR_MOUSE_DISPLAY_PARMS             389
  527. #define ERROR_MOUSE_INV_MODULE                390
  528. #define ERROR_MOUSE_INV_ENTRY_PT              391
  529. #define ERROR_MOUSE_INV_MASK                  392
  530. #define NO_ERROR_MOUSE_NO_DATA                393
  531. #define NO_ERROR_MOUSE_PTR_DRAWN              394
  532. #define ERROR_INVALID_FREQUENCY               395
  533. #define ERROR_NLS_NO_COUNTRY_FILE             396
  534. #define ERROR_NLS_OPEN_FAILED                 397
  535. #define ERROR_NLS_NO_CTRY_CODE                398
  536. #define ERROR_NLS_TABLE_TRUNCATED             399
  537. #define ERROR_NLS_BAD_TYPE                    400
  538. #define ERROR_NLS_TYPE_NOT_FOUND              401
  539. #define ERROR_VIO_SMG_ONLY                    402
  540. #define ERROR_VIO_INVALID_ASCIIZ              403
  541. #define ERROR_VIO_DEREGISTER                  404
  542. #define ERROR_VIO_NO_POPUP                    405
  543. #define ERROR_VIO_EXISTING_POPUP              406
  544. #define ERROR_KBD_SMG_ONLY                    407
  545. #define ERROR_KBD_INVALID_ASCIIZ              408
  546. #define ERROR_KBD_INVALID_MASK                409
  547. #define ERROR_KBD_REGISTER                    410
  548. #define ERROR_KBD_DEREGISTER                  411
  549. #define ERROR_MOUSE_SMG_ONLY                  412
  550. #define ERROR_MOUSE_INVALID_ASCIIZ            413
  551. #define ERROR_MOUSE_INVALID_MASK              414
  552. #define ERROR_MOUSE_REGISTER                  415
  553. #define ERROR_MOUSE_DEREGISTER                416
  554. #define ERROR_SMG_BAD_ACTION                  417
  555. #define ERROR_SMG_INVALID_CALL                418
  556. #define ERROR_SCS_SG_NOTFOUND                 419
  557. #define ERROR_SCS_NOT_SHELL                   420
  558. #define ERROR_VIO_INVALID_PARMS               421
  559. #define ERROR_VIO_FUNCTION_OWNED              422
  560. #define ERROR_VIO_RETURN                      423
  561. #define ERROR_SCS_INVALID_FUNCTION            424
  562. #define ERROR_SCS_NOT_SESSION_MGR             425
  563. #define ERROR_VIO_REGISTER                    426
  564. #define ERROR_VIO_NO_MODE_THREAD              427
  565. #define ERROR_VIO_NO_SAVE_RESTORE_THD         428
  566. #define ERROR_VIO_IN_BG                       429
  567. #define ERROR_VIO_ILLEGAL_DURING_POPUP        430
  568. #define ERROR_SMG_NOT_BASESHELL               431
  569. #define ERROR_SMG_BAD_STATUSREQ               432
  570. #define ERROR_QUE_INVALID_WAIT                433
  571. #define ERROR_VIO_LOCK                        434
  572. #define ERROR_MOUSE_INVALID_IOWAIT            435
  573. #define ERROR_VIO_INVALID_HANDLE              436
  574. #define ERROR_VIO_ILLEGAL_DURING_LOCK         437
  575. #define ERROR_VIO_INVALID_LENGTH              438
  576. #define ERROR_KBD_INVALID_HANDLE              439
  577. #define ERROR_KBD_NO_MORE_HANDLE              440
  578. #define ERROR_KBD_CANNOT_CREATE_KCB           441
  579. #define ERROR_KBD_CODEPAGE_LOAD_INCOMPL       442
  580. #define ERROR_KBD_INVALID_CODEPAGE_ID         443
  581. #define ERROR_KBD_NO_CODEPAGE_SUPPORT         444
  582. #define ERROR_KBD_FOCUS_REQUIRED              445
  583. #define ERROR_KBD_FOCUS_ALREADY_ACTIVE        446
  584. #define ERROR_KBD_KEYBOARD_BUSY               447
  585. #define ERROR_KBD_INVALID_CODEPAGE            448
  586. #define ERROR_KBD_UNABLE_TO_FOCUS             449
  587. #define ERROR_SMG_SESSION_NON_SELECT          450
  588. #define ERROR_SMG_SESSION_NOT_FOREGRND        451
  589. #define ERROR_SMG_SESSION_NOT_PARENT          452
  590. #define ERROR_SMG_INVALID_START_MODE          453
  591. #define ERROR_SMG_INVALID_RELATED_OPT         454
  592. #define ERROR_SMG_INVALID_BOND_OPTION         455
  593. #define ERROR_SMG_INVALID_SELECT_OPT          456
  594. #define ERROR_SMG_START_IN_BACKGROUND         457
  595. #define ERROR_SMG_INVALID_STOP_OPTION         458
  596. #define ERROR_SMG_BAD_RESERVE                 459
  597. #define ERROR_SMG_PROCESS_NOT_PARENT          460
  598. #define ERROR_SMG_INVALID_DATA_LENGTH         461
  599. #define ERROR_SMG_NOT_BOUND                   462
  600. #define ERROR_SMG_RETRY_SUB_ALLOC             463
  601. #define ERROR_KBD_DETACHED                    464
  602. #define ERROR_VIO_DETACHED                    465
  603. #define ERROR_MOU_DETACHED                    466
  604. #define ERROR_VIO_FONT                        467
  605. #define ERROR_VIO_USER_FONT                   468
  606. #define ERROR_VIO_BAD_CP                      469
  607. #define ERROR_VIO_NO_CP                       470
  608. #define ERROR_VIO_NA_CP                       471
  609. #define ERROR_INVALID_CODE_PAGE               472
  610. #define ERROR_CPLIST_TOO_SMALL                473
  611. #define ERROR_CP_NOT_MOVED                    474
  612. #define ERROR_MODE_SWITCH_INIT                475
  613. #define ERROR_CODE_PAGE_NOT_FOUND             476
  614. #define ERROR_UNEXPECTED_SLOT_RETURNED        477
  615. #define ERROR_SMG_INVALID_TRACE_OPTION        478
  616. #define ERROR_VIO_INTERNAL_RESOURCE           479
  617. #define ERROR_VIO_SHELL_INIT                  480
  618. #define ERROR_SMG_NO_HARD_ERRORS              481
  619. #define ERROR_CP_SWITCH_INCOMPLETE            482
  620. #define ERROR_VIO_TRANSPARENT_POPUP           483
  621. #define ERROR_CRITSEC_OVERFLOW                484
  622. #define ERROR_CRITSEC_UNDERFLOW               485
  623. #define ERROR_VIO_BAD_RESERVE                 486
  624. #define ERROR_INVALID_ADDRESS                 487
  625. #define ERROR_ZERO_SELECTORS_REQUESTED        488
  626. #define ERROR_NOT_ENOUGH_SELECTORS_AVA        489
  627. #define ERROR_INVALID_SELECTOR                490
  628. #define ERROR_SMG_INVALID_PROGRAM_TYPE        491
  629. #define ERROR_SMG_INVALID_PGM_CONTROL         492
  630. #define ERROR_SMG_INVALID_INHERIT_OPT         493
  631. #define ERROR_VIO_EXTENDED_SG                 494
  632. #define ERROR_VIO_NOT_PRES_MGR_SG             495
  633. #define ERROR_VIO_SHIELD_OWNED                496
  634. #define ERROR_VIO_NO_MORE_HANDLES             497
  635. #define ERROR_VIO_SEE_ERROR_LOG               498
  636. #define ERROR_VIO_ASSOCIATED_DC               499
  637. #define ERROR_KBD_NO_CONSOLE                  500
  638. #define ERROR_MOUSE_NO_CONSOLE                501
  639. #define ERROR_MOUSE_INVALID_HANDLE            502
  640. #define ERROR_SMG_INVALID_DEBUG_PARMS         503
  641. #define ERROR_KBD_EXTENDED_SG                 504
  642. #define ERROR_MOU_EXTENDED_SG                 505
  643. #define ERROR_SMG_INVALID_ICON_FILE           506
  644. #define ERROR_TRC_PID_NON_EXISTENT            507
  645. #define ERROR_TRC_COUNT_ACTIVE                508
  646. #define ERROR_TRC_SUSPENDED_BY_COUNT          509
  647. #define ERROR_TRC_COUNT_INACTIVE              510
  648. #define ERROR_TRC_COUNT_REACHED               511
  649. #define ERROR_NO_MC_TRACE                     512
  650. #define ERROR_MC_TRACE                        513
  651. #define ERROR_TRC_COUNT_ZERO                  514
  652. #define ERROR_SMG_TOO_MANY_DDS                515
  653. #define ERROR_SMG_INVALID_NOTIFICATION        516
  654. #define ERROR_LF_INVALID_FUNCTION             517
  655. #define ERROR_LF_NOT_AVAIL                    518
  656. #define ERROR_LF_SUSPENDED                    519
  657. #define ERROR_LF_BUF_TOO_SMALL                520
  658. #define ERROR_LF_BUFFER_CORRUPTED             521
  659. #define ERROR_LF_BUFFER_FULL                  521 /*!*/
  660. #define ERROR_LF_INVALID_DAEMON               522
  661. #define ERROR_LF_INVALID_RECORD               522 /*!*/
  662. #define ERROR_LF_INVALID_TEMPL                523
  663. #define ERROR_LF_INVALID_SERVICE              523 /*!*/
  664. #define ERROR_LF_GENERAL_FAILURE              524
  665. #define ERROR_LF_INVALID_ID                   525
  666. #define ERROR_LF_INVALID_HANDLE               526
  667. #define ERROR_LF_NO_ID_AVAIL                  527
  668. #define ERROR_LF_TEMPLATE_AREA_FULL           528
  669. #define ERROR_LF_ID_IN_USE                    529
  670. #define ERROR_MOU_NOT_INITIALIZED             530
  671. #define ERROR_MOUINITREAL_DONE                531
  672. #define ERROR_DOSSUB_CORRUPTED                532
  673. #define ERROR_MOUSE_CALLER_NOT_SUBSYS         533
  674. #define ERROR_ARITHMETIC_OVERFLOW             534
  675. #define ERROR_TMR_NO_DEVICE                   535
  676. #define ERROR_TMR_INVALID_TIME                536
  677. #define ERROR_PVW_INVALID_ENTITY              537
  678. #define ERROR_PVW_INVALID_ENTITY_TYPE         538
  679. #define ERROR_PVW_INVALID_SPEC                539
  680. #define ERROR_PVW_INVALID_RANGE_TYPE          540
  681. #define ERROR_PVW_INVALID_COUNTER_BLK         541
  682. #define ERROR_PVW_INVALID_TEXT_BLK            542
  683. #define ERROR_PRF_NOT_INITIALIZED             543
  684. #define ERROR_PRF_ALREADY_INITIALIZED         544
  685. #define ERROR_PRF_NOT_STARTED                 545
  686. #define ERROR_PRF_ALREADY_STARTED             546
  687. #define ERROR_PRF_TIMER_OUT_OF_RANGE          547
  688. #define ERROR_PRF_TIMER_RESET                 548
  689. #define ERROR_VDD_LOCK_USEAGE_DENIED          639
  690. #define ERROR_TIMEOUT                         640
  691. #define ERROR_VDM_DOWN                        641
  692. #define ERROR_VDM_LIMIT                       642
  693. #define ERROR_VDD_NOT_FOUND                   643
  694. #define ERROR_INVALID_CALLER                  644
  695. #define ERROR_PID_MISMATCH                    645
  696. #define ERROR_INVALID_VDD_HANDLE              646
  697. #define ERROR_VLPT_NO_SPOOLER                 647
  698. #define ERROR_VCOM_DEVICE_BUSY                648
  699. #define ERROR_VLPT_DEVICE_BUSY                649
  700. #define ERROR_NESTING_TOO_DEEP                650
  701. #define ERROR_VDD_MISSING                     651
  702. #define ERROR_BIDI_INVALID_LENGTH             671
  703. #define ERROR_BIDI_INVALID_INCREMENT          672
  704. #define ERROR_BIDI_INVALID_COMBINATION        673
  705. #define ERROR_BIDI_INVALID_RESERVED           674
  706. #define ERROR_BIDI_INVALID_EFFECT             675
  707. #define ERROR_BIDI_INVALID_CSDREC             676
  708. #define ERROR_BIDI_INVALID_CSDSTATE           677
  709. #define ERROR_BIDI_INVALID_LEVEL              678
  710. #define ERROR_BIDI_INVALID_TYPE_SUPPORT       679
  711. #define ERROR_BIDI_INVALID_ORIENTATION        680
  712. #define ERROR_BIDI_INVALID_NUM_SHAPE          681
  713. #define ERROR_BIDI_INVALID_CSD                682
  714. #define ERROR_BIDI_NO_SUPPORT                 683
  715. #define NO_ERROR_BIDI_RW_INCOMPLETE           684
  716. #define ERROR_IMP_INVALID_PARM                691
  717. #define ERROR_IMP_INVALID_LENGTH              692
  718. #define ERROR_MON_BAD_BUFFER                  730
  719. #define ERROR_MODULE_CORRUPTED                731
  720. #define ERROR_SM_OUTOF_SWAPFILE              1477
  721. #define ERROR_LF_TIMEOUT                     2055
  722. #define ERROR_LF_SUSPEND_SUCCESS             2057
  723. #define ERROR_LF_RESUME_SUCCESS              2058
  724. #define ERROR_LF_REDIRECT_SUCCESS            2059
  725. #define ERROR_LF_REDIRECT_FAILURE            2060
  726. #define ERROR_SWAPPER_NOT_ACTIVE            32768
  727. #define ERROR_INVALID_SWAPID                32769
  728. #define ERROR_IOERR_SWAP_FILE               32770
  729. #define ERROR_SWAP_TABLE_FULL               32771
  730. #define ERROR_SWAP_FILE_FULL                32772
  731. #define ERROR_CANT_INIT_SWAPPER             32773
  732. #define ERROR_SWAPPER_ALREADY_INIT          32774
  733. #define ERROR_PMM_INSUFFICIENT_MEMORY       32775
  734. #define ERROR_PMM_INVALID_FLAGS             32776
  735. #define ERROR_PMM_INVALID_ADDRESS           32777
  736. #define ERROR_PMM_LOCK_FAILED               32778
  737. #define ERROR_PMM_UNLOCK_FAILED             32779
  738. #define ERROR_PMM_MOVE_INCOMPLETE           32780
  739. #define ERROR_UCOM_DRIVE_RENAMED            32781
  740. #define ERROR_UCOM_FILENAME_TRUNCATED       32782
  741. #define ERROR_UCOM_BUFFER_LENGTH            32783
  742. #define ERROR_MON_CHAIN_HANDLE              32784
  743. #define ERROR_MON_NOT_REGISTERED            32785
  744. #define ERROR_SMG_ALREADY_TOP               32786
  745. #define ERROR_PMM_ARENA_MODIFIED            32787
  746. #define ERROR_SMG_PRINTER_OPEN              32788
  747. #define ERROR_PMM_SET_FLAGS_FAILED          32789
  748. #define ERROR_INVALID_DOS_DD                32790
  749. #define ERROR_BLOCKED                       32791
  750. #define ERROR_NOBLOCK                       32792
  751. #define ERROR_INSTANCE_SHARED               32793
  752. #define ERROR_NO_OBJECT                     32794
  753. #define ERROR_PARTIAL_ATTACH                32795
  754. #define ERROR_INCACHE                       32796
  755. #define ERROR_SWAP_IO_PROBLEMS              32797
  756. #define ERROR_CROSSES_OBJECT_BOUNDARY       32798
  757. #define ERROR_LONGLOCK                      32799
  758. #define ERROR_SHORTLOCK                     32800
  759. #define ERROR_UVIRTLOCK                     32801
  760. #define ERROR_ALIASLOCK                     32802
  761. #define ERROR_ALIAS                         32803
  762. #define ERROR_NO_MORE_HANDLES               32804
  763. #define ERROR_SCAN_TERMINATED               32805
  764. #define ERROR_TERMINATOR_NOT_FOUND          32806
  765. #define ERROR_NOT_DIRECT_CHILD              32807
  766. #define ERROR_DELAY_FREE                    32808
  767. #define ERROR_GUARDPAGE                     32809
  768. #define ERROR_SWAPERROR                     32900
  769. #define ERROR_LDRERROR                      32901
  770. #define ERROR_NOMEMORY                      32902
  771. #define ERROR_NOACCESS                      32903
  772. #define ERROR_NO_DLL_TERM                   32904
  773. #define ERROR_CPSIO_CODE_PAGE_INVALID       65026
  774. #define ERROR_CPSIO_NO_SPOOLER              65027
  775. #define ERROR_CPSIO_FONT_ID_INVALID         65028
  776. #define ERROR_CPSIO_INTERNAL_ERROR          65033
  777. #define ERROR_CPSIO_INVALID_PTR_NAME        65034
  778. #define ERROR_CPSIO_NOT_ACTIVE              65037
  779. #define ERROR_CPSIO_PID_FULL                65039
  780. #define ERROR_CPSIO_PID_NOT_FOUND           65040
  781. #define ERROR_CPSIO_READ_CTL_SEQ            65043
  782. #define ERROR_CPSIO_READ_FNT_DEF            65045
  783. #define ERROR_CPSIO_WRITE_ERROR             65047
  784. #define ERROR_CPSIO_WRITE_FULL_ERROR        65048
  785. #define ERROR_CPSIO_WRITE_HANDLE_BAD        65049
  786. #define ERROR_CPSIO_SWIT_LOAD               65074
  787. #define ERROR_CPSIO_INV_COMMAND             65077
  788. #define ERROR_CPSIO_NO_FONT_SWIT            65078
  789. #define ERROR_ENTRY_IS_CALLGATE             65079
  790.  
  791. /* ----------------------------- ERRORS ----------------------------------- */
  792.  
  793. #define ERRACT_RETRY            1
  794. #define ERRACT_DLYRET           2
  795. #define ERRACT_USER             3
  796. #define ERRACT_ABORT            4
  797. #define ERRACT_PANIC            5
  798. #define ERRACT_IGNORE           6
  799. #define ERRACT_INTRET           7
  800.  
  801. #define ERRCLASS_OUTRES         1
  802. #define ERRCLASS_TEMPSIT        2
  803. #define ERRCLASS_AUTH           3
  804. #define ERRCLASS_INTRN          4
  805. #define ERRCLASS_HRDFAIL        5
  806. #define ERRCLASS_SYSFAIL        6
  807. #define ERRCLASS_APPERR         7
  808. #define ERRCLASS_NOTFND         8
  809. #define ERRCLASS_BADFMT         9
  810. #define ERRCLASS_LOCKED         10
  811. #define ERRCLASS_MEDIA          11
  812. #define ERRCLASS_ALREADY        12
  813. #define ERRCLASS_UNK            13
  814. #define ERRCLASS_CANT           14
  815. #define ERRCLASS_TIME           15
  816.  
  817. #define ERRLOC_UNK              1
  818. #define ERRLOC_DISK             2
  819. #define ERRLOC_NET              3
  820. #define ERRLOC_SERDEV           4
  821. #define ERRLOC_MEM              5
  822.  
  823. #define FERR_DISABLEHARDERR     0x0000L
  824. #define FERR_ENABLEHARDERR      0x0001L
  825. #define FERR_ENABLEEXCEPTION    0x0000L
  826. #define FERR_DISABLEEXCEPTION   0x0002L
  827.  
  828. ULONG DosErrClass (ULONG ulCode, PULONG pulClass, PULONG pulAction,
  829.     PULONG pulLocus);
  830. ULONG DosError (ULONG ulError);
  831.  
  832. /* ------------------------- MEMORY MANAGEMENT ---------------------------- */
  833.  
  834. #define PAG_READ                0x0001
  835. #define PAG_WRITE               0x0002
  836. #define PAG_EXECUTE             0x0004
  837. #define PAG_GUARD               0x0008
  838. #define PAG_COMMIT              0x0010
  839. #define OBJ_TILE                0x0040
  840. #define OBJ_PROTECTED           0x0080
  841. #define OBJ_GETTABLE            0x0100
  842. #define OBJ_GIVEABLE            0x0200
  843. #define PAG_DEFAULT             0x0400
  844. #define PAG_SHARED              0x2000
  845. #define PAG_FREE                0x4000
  846.  
  847. #define DOSSUB_INIT             0x0001
  848. #define DOSSUB_GROW             0x0002
  849. #define DOSSUB_SPARSE_OBJ       0x0004
  850. #define DOSSUB_SERIALIZE        0x0008
  851.  
  852. ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize,
  853.     ULONG ulAllocationFlags);
  854. ULONG DosAllocSharedMem (PPVOID pBaseAddress, CONSTPSZ pszName,
  855.     ULONG ulObjectSize, ULONG ulAllocationFlags);
  856. ULONG DosFreeMem (PVOID pBaseAddress);
  857. ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, CONSTPSZ pszSharedMemName,
  858.     ULONG ulAttributeFlags);
  859. ULONG DosGetSharedMem (CONSTPVOID pBaseAddress, PULONG pulAttributeFlags);
  860. ULONG DosGiveSharedMem (CONSTPVOID pBaseAddress, PID idProcessId,
  861.     ULONG ulAttributeFlags);
  862. ULONG DosQueryMem (CONSTPVOID pBaseAddress, PULONG pulRegionSize,
  863.     PULONG pulAllocationFlags);
  864. ULONG DosSetMem (CONSTPVOID pBaseAddress, ULONG ulRegionSize,
  865.     ULONG ulAttributeFlags);
  866. ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize);
  867. ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize);
  868. ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize);
  869. ULONG DosSubUnsetMem (PVOID pOffset);
  870.  
  871. /* --------------------------- FILE SYSTEM -------------------------------- */
  872.  
  873. #define CCHMAXPATH              260
  874. #define CCHMAXPATHCOMP          256
  875.  
  876. #define FILE_NORMAL             0x0000
  877. #define FILE_READONLY           0x0001
  878. #define FILE_HIDDEN             0x0002
  879. #define FILE_SYSTEM             0x0004
  880. #define FILE_DIRECTORY          0x0010
  881. #define FILE_ARCHIVED           0x0020
  882.  
  883. #define FILE_EXISTED            0x0001
  884. #define FILE_CREATED            0x0002
  885. #define FILE_TRUNCATED          0x0003
  886.  
  887. #define FILE_OPEN               0x0001
  888. #define FILE_TRUNCATE           0x0002
  889. #define FILE_CREATE             0x0010
  890.  
  891. #define FILE_BEGIN              0
  892. #define FILE_CURRENT            1
  893. #define FILE_END                2
  894.  
  895. #define OPEN_ACTION_FAIL_IF_EXISTS     0x0000
  896. #define OPEN_ACTION_OPEN_IF_EXISTS     0x0001
  897. #define OPEN_ACTION_REPLACE_IF_EXISTS  0x0002
  898. #define OPEN_ACTION_FAIL_IF_NEW        0x0000
  899. #define OPEN_ACTION_CREATE_IF_NEW      0x0010
  900.  
  901. #define OPEN_ACCESS_READONLY           0x0000
  902. #define OPEN_ACCESS_WRITEONLY          0x0001
  903. #define OPEN_ACCESS_READWRITE          0x0002
  904.  
  905. #define OPEN_SHARE_DENYREADWRITE       0x0010
  906. #define OPEN_SHARE_DENYWRITE           0x0020
  907. #define OPEN_SHARE_DENYREAD            0x0030
  908. #define OPEN_SHARE_DENYNONE            0x0040
  909.  
  910. #define OPEN_FLAGS_NOINHERIT           0x0080
  911. #define OPEN_FLAGS_NO_LOCALITY         0x0000
  912. #define OPEN_FLAGS_SEQUENTIAL          0x0100
  913. #define OPEN_FLAGS_RANDOM              0x0200
  914. #define OPEN_FLAGS_RANDOMSEQUENTIAL    0x0300
  915. #define OPEN_FLAGS_NO_CACHE            0x1000
  916. #define OPEN_FLAGS_FAIL_ON_ERROR       0x2000
  917. #define OPEN_FLAGS_WRITE_THROUGH       0x4000
  918. #define OPEN_FLAGS_DASD                0x8000
  919. #define OPEN_FLAGS_NONSPOOLED         0x40000
  920.  
  921. #define FIL_STANDARD            1
  922. #define FIL_QUERYEASIZE         2
  923. #define FIL_QUERYEASFROMLIST    3
  924. #define FIL_QUERYFULLNAME       5    /* DosQueryPathInfo */
  925.  
  926. #define FSAIL_QUERYNAME         1
  927. #define FSAIL_DEVNUMBER         2
  928. #define FSAIL_DRVNUMBER         3
  929.  
  930. #define FSAT_CHARDEV            1
  931. #define FSAT_PSEUDODEV          2
  932. #define FSAT_LOCALDRV           3
  933. #define FSAT_REMOTEDRV          4
  934.  
  935. #define DCPY_EXISTING           0x0001
  936. #define DCPY_APPEND             0x0002
  937. #define DCPY_FAILEAS            0x0004
  938.  
  939. #define DSPI_WRTTHRU            0x0010
  940.  
  941. #define HDIR_SYSTEM             1
  942. #define HDIR_CREATE             (-1)
  943.  
  944. #define FILE_IGNORE             0x10000
  945.  
  946. #define MUST_HAVE_READONLY      (FILE_READONLY  | (FILE_READONLY  << 8))
  947. #define MUST_HAVE_HIDDEN        (FILE_HIDDEN    | (FILE_HIDDEN    << 8))
  948. #define MUST_HAVE_SYSTEM        (FILE_SYSTEM    | (FILE_SYSTEM    << 8))
  949. #define MUST_HAVE_DIRECTORY     (FILE_DIRECTORY | (FILE_DIRECTORY << 8))
  950. #define MUST_HAVE_ARCHIVED      (FILE_ARCHIVED  | (FILE_ARCHIVED  << 8))
  951.  
  952. #define EAT_BINARY              0xfffe
  953. #define EAT_ASCII               0xfffd
  954. #define EAT_BITMAP              0xfffb
  955. #define EAT_METAFILE            0xfffa
  956. #define EAT_ICON                0xfff9
  957. #define EAT_EA                  0xffee
  958. #define EAT_MVMT                0xffdf
  959. #define EAT_MVST                0xffde
  960. #define EAT_ASN1                0xffdd
  961.  
  962. #define ENUMEA_LEVEL_NO_VALUE   1
  963.  
  964. #define ENUMEA_REFTYPE_FHANDLE  0
  965. #define ENUMEA_REFTYPE_PATH     1
  966. #define ENUMEA_REFTYPE_MAX      ENUMEA_REFTYPE_PATH
  967.  
  968. #define ENUMEA_REFTYPE_FHANDLE  0
  969. #define ENUMEA_REFTYPE_PATH     1
  970.  
  971. #define FHT_DISKFILE            0x0000
  972. #define FHT_CHRDEV              0x0001
  973. #define FHT_PIPE                0x0002
  974.  
  975. #define FHB_DSKREMOTE           0x8000
  976. #define FHB_CHRDEVREMOTE        0x8000
  977. #define FHB_PIPEREMOTE          0x8000
  978.  
  979. #define FS_ATTACH               0
  980. #define FS_DETACH               1
  981. #define FS_SPOOLATTACH          2
  982. #define FS_SPOOLDETACH          3
  983.  
  984. #define FSCTL_HANDLE            1
  985. #define FSCTL_PATHNAME          2
  986. #define FSCTL_FSDNAME           3
  987.  
  988. #define FSCTL_ERROR_INFO        1
  989. #define FSCTL_MAX_EASIZE        2
  990.  
  991. #define FSIL_ALLOC              1
  992. #define FSIL_VOLSER             2
  993.  
  994. #define HANDTYPE_FILE           0x0000
  995. #define HANDTYPE_DEVICE         0x0001
  996. #define HANDTYPE_PIPE           0x0002
  997. #define HANDTYPE_NETWORK        0x8000
  998.  
  999. #define SEARCH_PATH             0x0000
  1000. #define SEARCH_CUR_DIRECTORY    0x0001
  1001. #define SEARCH_ENVIRONMENT      0x0002
  1002. #define SEARCH_IGNORENETERRS    0x0004
  1003.  
  1004. #define FEA_NEEDEA              0x80
  1005.  
  1006. typedef SHANDLE HDIR;
  1007. typedef HDIR *PHDIR;
  1008.  
  1009. typedef struct
  1010. {
  1011.   USHORT twosecs : 5;
  1012.   USHORT minutes : 6;
  1013.   USHORT hours   : 5;
  1014. } FTIME;
  1015. typedef FTIME *PFTIME;
  1016.  
  1017. typedef struct
  1018. {
  1019.   USHORT day   : 5;
  1020.   USHORT month : 4;
  1021.   USHORT year  : 7;
  1022. } FDATE;
  1023. typedef FDATE *PFDATE;
  1024.  
  1025. typedef struct
  1026. {
  1027.   ULONG  idFileSystem;
  1028.   ULONG  cSectorUnit;
  1029.   ULONG  cUnit;
  1030.   ULONG  cUnitAvail;
  1031.   USHORT cbSector;
  1032. } FSALLOCATE;
  1033. typedef FSALLOCATE *PFSALLOCATE;
  1034.  
  1035. typedef struct
  1036. {
  1037.   USHORT cbMaxEASize;
  1038.   ULONG  cbMaxEAListSize;
  1039. } EASIZEBUF;
  1040. typedef EASIZEBUF *PEASIZEBUF;
  1041.  
  1042. typedef struct
  1043. {
  1044.   BYTE   fEA;
  1045.   BYTE   cbName;
  1046.   USHORT cbValue;
  1047. } FEA;
  1048. typedef FEA *PFEA;
  1049.  
  1050. typedef struct
  1051. {
  1052.   ULONG cbList;
  1053.   FEA   list[1];
  1054. } FEALIST;
  1055. typedef FEALIST *PFEALIST;
  1056.  
  1057. typedef struct
  1058. {
  1059.   BYTE cbName;
  1060.   CHAR szName[1];
  1061. } GEA;
  1062. typedef GEA *PGEA;
  1063.  
  1064. typedef struct
  1065. {
  1066.   ULONG cbList;
  1067.   GEA   list[1];
  1068. } GEALIST;
  1069. typedef GEALIST *PGEALIST;
  1070.  
  1071. typedef struct
  1072. {
  1073.   PGEALIST fpGEAList;
  1074.   PFEALIST fpFEAList;
  1075.   ULONG    oError;
  1076. } EAOP;
  1077. typedef EAOP *PEAOP;
  1078.  
  1079. typedef struct
  1080. {
  1081.   ULONG  oNextEntryOffset;
  1082.   BYTE   fEA;
  1083.   BYTE   cbName;
  1084.   USHORT cbValue;
  1085.   CHAR   szName[1];
  1086. } FEA2;
  1087. typedef FEA2 *PFEA2;
  1088.  
  1089. typedef struct
  1090. {
  1091.   ULONG cbList;
  1092.   FEA2  list[1];
  1093. } FEA2LIST;
  1094. typedef FEA2LIST *PFEA2LIST;
  1095.  
  1096. typedef struct
  1097. {
  1098.   ULONG oNextEntryOffset;
  1099.   BYTE  cbName;
  1100.   CHAR  szName[1];
  1101. } GEA2;
  1102. typedef GEA2 *PGEA2;
  1103.  
  1104. typedef struct
  1105. {
  1106.   ULONG cbList;
  1107.   GEA2  list[1];
  1108. } GEA2LIST;
  1109. typedef GEA2LIST *PGEA2LIST;
  1110.  
  1111. typedef struct
  1112. {
  1113.   PGEA2LIST fpGEA2List;
  1114.   PFEA2LIST fpFEA2List;
  1115.   ULONG     oError;
  1116. } EAOP2;
  1117. typedef EAOP2 *PEAOP2;
  1118.  
  1119. typedef struct
  1120. {
  1121.   FDATE  fdateCreation;
  1122.   FTIME  ftimeCreation;
  1123.   FDATE  fdateLastAccess;
  1124.   FTIME  ftimeLastAccess;
  1125.   FDATE  fdateLastWrite;
  1126.   FTIME  ftimeLastWrite;
  1127.   ULONG  cbFile;
  1128.   ULONG  cbFileAlloc;
  1129.   USHORT attrFile;
  1130. } FILESTATUS;
  1131. typedef FILESTATUS *PFILESTATUS;
  1132.  
  1133. typedef struct
  1134. {
  1135.   FDATE  fdateCreation;
  1136.   FTIME  ftimeCreation;
  1137.   FDATE  fdateLastAccess;
  1138.   FTIME  ftimeLastAccess;
  1139.   FDATE  fdateLastWrite;
  1140.   FTIME  ftimeLastWrite;
  1141.   ULONG  cbFile;
  1142.   ULONG  cbFileAlloc;
  1143.   USHORT attrFile;
  1144.   ULONG  cbList;
  1145. } FILESTATUS2;
  1146. typedef FILESTATUS2 *PFILESTATUS2;
  1147.  
  1148. typedef struct
  1149. {
  1150.   FDATE fdateCreation;
  1151.   FTIME ftimeCreation;
  1152.   FDATE fdateLastAccess;
  1153.   FTIME ftimeLastAccess;
  1154.   FDATE fdateLastWrite;
  1155.   FTIME ftimeLastWrite;
  1156.   ULONG cbFile;
  1157.   ULONG cbFileAlloc;
  1158.   ULONG attrFile;
  1159. } FILESTATUS3;
  1160. typedef FILESTATUS3 *PFILESTATUS3;
  1161.  
  1162. typedef struct
  1163. {
  1164.   FDATE fdateCreation;
  1165.   FTIME ftimeCreation;
  1166.   FDATE fdateLastAccess;
  1167.   FTIME ftimeLastAccess;
  1168.   FDATE fdateLastWrite;
  1169.   FTIME ftimeLastWrite;
  1170.   ULONG cbFile;
  1171.   ULONG cbFileAlloc;
  1172.   ULONG attrFile;
  1173.   ULONG cbList;
  1174. } FILESTATUS4;
  1175. typedef FILESTATUS4 *PFILESTATUS4;
  1176.  
  1177. typedef struct
  1178. {
  1179.   USHORT iType;
  1180.   USHORT cbName;
  1181.   UCHAR  szName[1];
  1182.   USHORT cbFSDName;
  1183.   UCHAR  szFSDName[1];
  1184.   USHORT cbFSAData;
  1185.   UCHAR  rgFSAData[1];
  1186. } FSQBUFFER;
  1187. typedef FSQBUFFER *PFSQBUFFER;
  1188.  
  1189. typedef struct
  1190. {
  1191.   USHORT iType;
  1192.   USHORT cbName;
  1193.   USHORT cbFSDName;
  1194.   USHORT cbFSAData;
  1195.   UCHAR  szName[1];
  1196.   UCHAR  szFSDName[1];
  1197.   UCHAR  rgFSAData[1];
  1198. } FSQBUFFER2;
  1199. typedef FSQBUFFER2 *PFSQBUFFER2;
  1200.  
  1201. typedef struct
  1202. {
  1203.   USHORT hNmPipe;
  1204.   ULONG  ulKey;
  1205. } SPOOLATTACH;
  1206. typedef SPOOLATTACH *PSPOOLATTACH;
  1207.  
  1208. typedef struct
  1209. {
  1210.   BYTE cch;
  1211.   CHAR szVolLabel[12];
  1212. } VOLUMELABEL;
  1213. typedef VOLUMELABEL *PVOLUMELABEL;
  1214.  
  1215. typedef struct
  1216. {
  1217.   FDATE fdateCreation;
  1218.   FTIME ftimeCreation;
  1219.   VOLUMELABEL vol;
  1220. } FSINFO;
  1221. typedef FSINFO *PFSINFO;
  1222.  
  1223. typedef struct
  1224. {
  1225.   FDATE  fdateCreation;
  1226.   FTIME  ftimeCreation;
  1227.   FDATE  fdateLastAccess;
  1228.   FTIME  ftimeLastAccess;
  1229.   FDATE  fdateLastWrite;
  1230.   FTIME  ftimeLastWrite;
  1231.   ULONG  cbFile;
  1232.   ULONG  cbFileAlloc;
  1233.   USHORT attrFile;
  1234.   UCHAR  cchName;
  1235.   CHAR   achName[CCHMAXPATHCOMP];
  1236. } FILEFINDBUF;
  1237. typedef FILEFINDBUF *PFILEFINDBUF;
  1238.  
  1239. typedef struct
  1240. {
  1241.   FDATE  fdateCreation;
  1242.   FTIME  ftimeCreation;
  1243.   FDATE  fdateLastAccess;
  1244.   FTIME  ftimeLastAccess;
  1245.   FDATE  fdateLastWrite;
  1246.   FTIME  ftimeLastWrite;
  1247.   ULONG  cbFile;
  1248.   ULONG  cbFileAlloc;
  1249.   USHORT attrFile;
  1250.   ULONG  cbList;
  1251.   UCHAR  cchName;
  1252.   CHAR   achName[CCHMAXPATHCOMP];
  1253. } FILEFINDBUF2;
  1254. typedef FILEFINDBUF2 *PFILEFINDBUF2;
  1255.  
  1256. typedef struct
  1257. {
  1258.   ULONG oNextEntryOffset;
  1259.   FDATE fdateCreation;
  1260.   FTIME ftimeCreation;
  1261.   FDATE fdateLastAccess;
  1262.   FTIME ftimeLastAccess;
  1263.   FDATE fdateLastWrite;
  1264.   FTIME ftimeLastWrite;
  1265.   ULONG cbFile;
  1266.   ULONG cbFileAlloc;
  1267.   ULONG attrFile;
  1268.   UCHAR cchName;
  1269.   CHAR  achName[CCHMAXPATHCOMP];
  1270. } FILEFINDBUF3;
  1271. typedef FILEFINDBUF3 *PFILEFINDBUF3;
  1272.  
  1273. typedef struct
  1274. {
  1275.   ULONG oNextEntryOffset;
  1276.   FDATE fdateCreation;
  1277.   FTIME ftimeCreation;
  1278.   FDATE fdateLastAccess;
  1279.   FTIME ftimeLastAccess;
  1280.   FDATE fdateLastWrite;
  1281.   FTIME ftimeLastWrite;
  1282.   ULONG cbFile;
  1283.   ULONG cbFileAlloc;
  1284.   ULONG attrFile;
  1285.   ULONG cbList;
  1286.   UCHAR cchName;
  1287.   CHAR  achName[CCHMAXPATHCOMP];
  1288. } FILEFINDBUF4;
  1289. typedef FILEFINDBUF4 *PFILEFINDBUF4;
  1290.  
  1291. typedef struct
  1292. {
  1293.   LONG lOffset;
  1294.   LONG lRange;
  1295. } FILELOCK;
  1296. typedef FILELOCK *PFILELOCK;
  1297.  
  1298. typedef struct
  1299. {
  1300.   UCHAR  reserved;
  1301.   UCHAR  cbName;
  1302.   USHORT cbValue;
  1303.   UCHAR  szName[1];
  1304. } DENA1;
  1305. typedef DENA1 *PDENA1;
  1306.  
  1307. typedef FEA2 DENA2;
  1308. typedef PFEA2 PDENA2;
  1309.  
  1310. ULONG DosCancelLockRequest (HFILE hFile, __const__ FILELOCK *pfl);
  1311. ULONG DosClose (HFILE hfFile);
  1312. ULONG DosCopy (CONSTPSZ pszSource, CONSTPSZ pszTarget, ULONG ulOption);
  1313. ULONG DosCreateDir (CONSTPSZ pszDirName, PEAOP2 pEABuf);
  1314. ULONG DosCreatePipe (PHFILE phfReadHandle, PHFILE phfWriteHandle,
  1315.     ULONG ulPipeSize);
  1316. ULONG DosDelete (CONSTPSZ pszFileName);
  1317. ULONG DosDeleteDir (CONSTPSZ pszDirName);
  1318. ULONG DosDupHandle (HFILE hFile, PHFILE phFile);
  1319. ULONG DosEditName (ULONG ulLevel, CONSTPSZ pszSource, CONSTPSZ pszEdit,
  1320.     PBYTE pszTargetBuf, ULONG ulTargetBufLength);
  1321. ULONG DosEnumAttribute (ULONG ulRefType, CONSTPVOID pvFile, ULONG ulEntry,
  1322.     PVOID pvBuf, ULONG ulBufLength, PULONG pulCount, ULONG ulInfoLevel);
  1323. ULONG DosFindClose (HDIR hDir);
  1324. ULONG DosFindFirst (CONSTPSZ pszFileSpec, PHDIR phDir, ULONG flAttribute,
  1325.     PVOID pFindBuf, ULONG ulFindBufLength, PULONG pulFileNames,
  1326.     ULONG ulInfoLevel);
  1327. ULONG DosFindNext (HDIR hDir, PVOID pFindBuf, ULONG ulFindBufLength,
  1328.     PULONG pulFileNames);
  1329. ULONG DosForceDelete (CONSTPSZ pszFileName);
  1330. ULONG DosFSAttach (CONSTPSZ pszDevice, CONSTPSZ pszFilesystem,
  1331.     __const__ VOID *pData, ULONG ulDataLength, ULONG ulFlag);
  1332. ULONG DosFSCtl (PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength,
  1333.     PVOID *pParmList, ULONG ulParmLengthMax, PULONG pulParmLength,
  1334.     ULONG ulFunction, CONSTPSZ pszRouteName, HFILE hFile, ULONG ulMethod);
  1335. ULONG DosMove (CONSTPSZ pszOldName, CONSTPSZ pszNewName);
  1336. ULONG DosOpen (CONSTPSZ pszFileName, PHFILE phfFile, PULONG pulAction,
  1337.     ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
  1338.     PEAOP2 pEABuf);
  1339. ULONG DosQueryCurrentDir (ULONG ulDrive, PBYTE pPath, PULONG pulPathLength);
  1340. ULONG DosQueryCurrentDisk (PULONG pulDrive, PULONG pulLogical);
  1341. ULONG DosQueryFHState (HFILE hFile, PULONG pulMode);
  1342. ULONG DosQueryFileInfo (HFILE hfFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
  1343.     ULONG ulInfoLength);
  1344. ULONG DosQueryFSAttach (CONSTPSZ pszDeviceName, ULONG ulOrdinal,
  1345.     ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb, PULONG pulBufLength);
  1346. ULONG DosQueryFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
  1347.     ULONG ulBufLength);
  1348. ULONG DosQueryHType (HFILE hFile, PULONG pulType, PULONG pulAttr);
  1349. ULONG DosQueryPathInfo (CONSTPSZ pszPathName, ULONG ulInfoLevel,
  1350.     PVOID pInfoBuffer, ULONG ulInfoLength);
  1351. ULONG DosQueryVerify (PBOOL32 pVerify);
  1352. ULONG DosRead (HFILE hfFile, PVOID pBuffer, ULONG ulLength,
  1353.     PULONG pulBytesRead);
  1354. ULONG DosResetBuffer (HFILE hf);
  1355. ULONG DosSearchPath (ULONG ulControl, CONSTPSZ pszPath, CONSTPSZ pszFilename,
  1356.     PBYTE pBuf, ULONG ulBufLength);
  1357. ULONG DosSetCurrentDir (CONSTPSZ pszDir);
  1358. ULONG DosSetDefaultDisk (ULONG ulDrive);
  1359. ULONG DosSetFHState (HFILE hFile, ULONG ulMode);
  1360. ULONG DosSetFileInfo (HFILE hf, ULONG ulInfoLevel, PVOID pInfoBuffer,
  1361.     ULONG ulInfoLength);
  1362. ULONG DosSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
  1363.     __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags);
  1364. ULONG DosSetFilePtr (HFILE hf, LONG ulOffset, ULONG ulOrigin, PULONG ulPos);
  1365. ULONG DosSetFileSize (HFILE hf, ULONG ulSize);
  1366. ULONG DosSetFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
  1367.     ULONG ulBufLength);
  1368. ULONG DosSetMaxFH (ULONG ulCount);
  1369. ULONG DosSetPathInfo (CONSTPSZ pszPathName, ULONG ulInfoLevel,
  1370.     PVOID pInfoBuffer, ULONG ulInfoLength, ULONG ulOptions);
  1371. ULONG DosSetRelMaxFH (PLONG pulReqCount, PULONG pulCurMaxFH);
  1372. ULONG DosSetVerify (BOOL32 f32Verify);
  1373. ULONG DosShutdown (ULONG ulReserved);
  1374. ULONG DosWrite (HFILE hfFile, CONSTPVOID pBuffer, ULONG ulLength,
  1375.     PULONG pulBytesWritten);
  1376.  
  1377. /* ---------------------------- DEVICE I/O -------------------------------- */
  1378.  
  1379. #if defined (INCL_DOSDEVIOCTL)
  1380.  
  1381. #define DEVINFO_PRINTER                0
  1382. #define DEVINFO_RS232                  1
  1383. #define DEVINFO_FLOPPY                 2
  1384. #define DEVINFO_COPROCESSOR            3
  1385. #define DEVINFO_SUBMODEL               4
  1386. #define DEVINFO_MODEL                  5
  1387. #define DEVINFO_ADAPTER                6
  1388.  
  1389. #define INFO_COUNT_PARTITIONABLE_DISKS 1
  1390. #define INFO_GETIOCTLHANDLE            2
  1391. #define INFO_FREEIOCTLHANDLE           3
  1392.  
  1393. #define IOCTL_ASYNC                    0x0001
  1394. #define IOCTL_SCR_AND_PTRDRAW          0x0003
  1395. #define IOCTL_KEYBOARD                 0x0004
  1396. #define IOCTL_PRINTER                  0x0005
  1397. #define IOCTL_LIGHTPEN                 0x0006
  1398. #define IOCTL_POINTINGDEVICE           0x0007
  1399. #define IOCTL_DISK                     0x0008
  1400. #define IOCTL_PHYSICALDISK             0x0009
  1401. #define IOCTL_MONITOR                  0x000a
  1402. #define IOCTL_GENERAL                  0x000b
  1403.  
  1404. #define ASYNC_SETBAUDRATE               0x0041
  1405. #define ASYNC_SETLINECTRL               0x0042
  1406. #define ASYNC_TRANSMITIMM               0x0044
  1407. #define ASYNC_SETBREAKOFF               0x0045
  1408. #define ASYNC_SETMODEMCTRL              0x0046
  1409. #define ASYNC_STOPTRANSMIT              0x0047
  1410. #define ASYNC_STARTTRANSMIT             0x0048
  1411. #define ASYNC_SETBREAKON                0x004b
  1412. #define ASYNC_SETDCBINFO                0x0053
  1413. #define ASYNC_GETBAUDRATE               0x0061
  1414. #define ASYNC_GETLINECTRL               0x0062
  1415. #define ASYNC_GETCOMMSTATUS             0x0064
  1416. #define ASYNC_GETLINESTATUS             0x0065
  1417. #define ASYNC_GETMODEMOUTPUT            0x0066
  1418. #define ASYNC_GETMODEMINPUT             0x0067
  1419. #define ASYNC_GETINQUECOUNT             0x0068
  1420. #define ASYNC_GETOUTQUECOUNT            0x0069
  1421. #define ASYNC_GETCOMMERROR              0x006d
  1422. #define ASYNC_GETCOMMEVENT              0x0072
  1423. #define ASYNC_GETDCBINFO                0x0073
  1424.  
  1425. #define SCR_ALLOCLDT                    0x0070
  1426. #define SCR_DEALLOCLDT                  0x0071
  1427. #define PTR_GETPTRDRAWADDRESS           0x0072
  1428. #define SCR_ALLOCLDTOFF                 0x0075
  1429.  
  1430. #define KBD_SETTRANSTABLE               0x0050
  1431. #define KBD_SETINPUTMODE                0x0051
  1432. #define KBD_SETINTERIMFLAG              0x0052
  1433. #define KBD_SETSHIFTSTATE               0x0053
  1434. #define KBD_SETTYPAMATICRATE            0x0054
  1435. #define KBD_SETFGNDSCREENGRP            0x0055
  1436. #define KBD_SETSESMGRHOTKEY             0x0056
  1437. #define KBD_SETFOCUS                    0x0057
  1438. #define KBD_SETKCB                      0x0058
  1439. #define KBD_SETNLS                      0x005c
  1440. #define KBD_CREATE                      0x005d
  1441. #define KBD_DESTROY                     0x005e
  1442. #define KBD_GETINPUTMODE                0x0071
  1443. #define KBD_GETINTERIMFLAG              0x0072
  1444. #define KBD_GETSHIFTSTATE               0x0073
  1445. #define KBD_READCHAR                    0x0074
  1446. #define KBD_PEEKCHAR                    0x0075
  1447. #define KBD_GETSESMGRHOTKEY             0x0076
  1448. #define KBD_GETKEYBDTYPE                0x0077
  1449. #define KBD_GETCODEPAGEID               0x0078
  1450. #define KBD_XLATESCAN                   0x0079
  1451.  
  1452. #define PRT_QUERYJOBHANDLE              0x0021
  1453. #define PRT_SETFRAMECTL                 0x0042
  1454. #define PRT_SETINFINITERETRY            0x0044
  1455. #define PRT_INITPRINTER                 0x0046
  1456. #define PRT_ACTIVATEFONT                0x0048
  1457. #define PRT_GETFRAMECTL                 0x0062
  1458. #define PRT_GETINFINITERETRY            0x0064
  1459. #define PRT_GETPRINTERSTATUS            0x0066
  1460. #define PRT_QUERYACTIVEFONT             0x0069
  1461. #define PRT_VERIFYFONT                  0x006a
  1462.  
  1463. #define MOU_ALLOWPTRDRAW                0x0050
  1464. #define MOU_UPDATEDISPLAYMODE           0x0051
  1465. #define MOU_SCREENSWITCH                0x0052
  1466. #define MOU_SETSCALEFACTORS             0x0053
  1467. #define MOU_SETEVENTMASK                0x0054
  1468. #define MOU_SETHOTKEYBUTTON             0x0055
  1469. #define MOU_SETPTRSHAPE                 0x0056
  1470. #define MOU_DRAWPTR                     0x0057
  1471. #define MOU_REMOVEPTR                   0x0058
  1472. #define MOU_SETPTRPOS                   0x0059
  1473. #define MOU_SETPROTDRAWADDRESS          0x005a
  1474. #define MOU_SETREALDRAWADDRESS          0x005b
  1475. #define MOU_SETMOUSTATUS                0x005c
  1476. #define MOU_DISPLAYMODECHANGE           0x005d
  1477. #define MOU_GETBUTTONCOUNT              0x0060
  1478. #define MOU_GETMICKEYCOUNT              0x0061
  1479. #define MOU_GETMOUSTATUS                0x0062
  1480. #define MOU_READEVENTQUE                0x0063
  1481. #define MOU_GETQUESTATUS                0x0064
  1482. #define MOU_GETEVENTMASK                0x0065
  1483. #define MOU_GETSCALEFACTORS             0x0066
  1484. #define MOU_GETPTRPOS                   0x0067
  1485. #define MOU_GETPTRSHAPE                 0x0068
  1486. #define MOU_GETHOTKEYBUTTON             0x0069
  1487. #define MOU_VER                         0x006a
  1488.  
  1489. #define DSK_LOCKDRIVE                   0x0000
  1490. #define DSK_UNLOCKDRIVE                 0x0001
  1491. #define DSK_REDETERMINEMEDIA            0x0002
  1492. #define DSK_SETLOGICALMAP               0x0003
  1493. #define DSK_BLOCKREMOVABLE              0x0020
  1494. #define DSK_GETLOGICALMAP               0x0021
  1495. #define DSK_SETDEVICEPARAMS             0x0043
  1496. #define DSK_WRITETRACK                  0x0044
  1497. #define DSK_FORMATVERIFY                0x0045
  1498. #define DSK_GETDEVICEPARAMS             0x0063
  1499. #define DSK_READTRACK                   0x0064
  1500. #define DSK_VERIFYTRACK                 0x0065
  1501.  
  1502. #define PDSK_LOCKPHYSDRIVE              0x0000
  1503. #define PDSK_UNLOCKPHYSDRIVE            0x0001
  1504. #define PDSK_WRITEPHYSTRACK             0x0044
  1505. #define PDSK_GETPHYSDEVICEPARAMS        0x0063
  1506. #define PDSK_READPHYSTRACK              0x0064
  1507. #define PDSK_VERIFYPHYSTRACK            0x0065
  1508.  
  1509. #define MON_REGISTERMONITOR             0x0040
  1510.  
  1511. #define DEV_FLUSHINPUT                  0x0001
  1512. #define DEV_FLUSHOUTPUT                 0x0002
  1513. #define DEV_QUERYMONSUPPORT             0x0060
  1514.  
  1515. #define RX_QUE_OVERRUN                  0x0001
  1516. #define RX_HARDWARE_OVERRUN             0x0002
  1517. #define PARITY_ERROR                    0x0004
  1518. #define FRAMING_ERROR                   0x0008
  1519.  
  1520. #define CHAR_RECEIVED                   0x0001
  1521. #define LAST_CHAR_SENT                  0x0004
  1522. #define CTS_CHANGED                     0x0008
  1523. #define DSR_CHANGED                     0x0010
  1524. #define DCD_CHANGED                     0x0020
  1525. #define BREAK_DETECTED                  0x0040
  1526. #define ERROR_OCCURRED                  0x0080
  1527. #define RI_DETECTED                     0x0100
  1528.  
  1529. #define TX_WAITING_FOR_CTS              0x0001
  1530. #define TX_WAITING_FOR_DSR              0x0002
  1531. #define TX_WAITING_FOR_DCD              0x0004
  1532. #define TX_WAITING_FOR_XON              0x0008
  1533. #define TX_WAITING_TO_SEND_XON          0x0010
  1534. #define TX_WAITING_WHILE_BREAK_ON       0x0020
  1535. #define TX_WAITING_TO_SEND_IMM          0x0040
  1536. #define RX_WAITING_FOR_DSR              0x0080
  1537.  
  1538. #define WRITE_REQUEST_QUEUED            0x0001
  1539. #define DATA_IN_TX_QUE                  0x0002
  1540. #define HARDWARE_TRANSMITTING           0x0004
  1541. #define CHAR_READY_TO_SEND_IMM          0x0008
  1542. #define WAITING_TO_SEND_XON             0x0010
  1543. #define WAITING_TO_SEND_XOFF            0x0020
  1544.  
  1545. #define CTS_ON                          0x10
  1546. #define DSR_ON                          0x20
  1547. #define RI_ON                           0x40
  1548. #define DCD_ON                          0x80
  1549.  
  1550. #define MODE_DTR_CONTROL                0x01
  1551. #define MODE_DTR_HANDSHAKE              0x02
  1552. #define MODE_CTS_HANDSHAKE              0x08
  1553. #define MODE_DSR_HANDSHAKE              0x10
  1554. #define MODE_DCD_HANDSHAKE              0x20
  1555. #define MODE_DSR_SENSITIVITY            0x40
  1556.  
  1557. #define MODE_AUTO_TRANSMIT              0x01
  1558. #define MODE_AUTO_RECEIVE               0x02
  1559. #define MODE_ERROR_CHAR                 0x04
  1560. #define MODE_NULL_STRIPPING             0x08
  1561. #define MODE_BREAK_CHAR                 0x10
  1562. #define MODE_RTS_CONTROL                0x40
  1563. #define MODE_RTS_HANDSHAKE              0x80
  1564. #define MODE_TRANSMIT_TOGGLE            0xc0
  1565.  
  1566. #define MODE_NO_WRITE_TIMEOUT           0x01
  1567. #define MODE_READ_TIMEOUT               0x02
  1568. #define MODE_WAIT_READ_TIMEOUT          0x04
  1569. #define MODE_NOWAIT_READ_TIMEOUT        0x06
  1570.  
  1571. #define DTR_ON                          0x01
  1572. #define RTS_ON                          0x02
  1573.  
  1574. #define DTR_OFF                         0xfe
  1575. #define RTS_OFF                         0xfd
  1576.  
  1577. #define ASCII_MODE                      0x00
  1578. #define BINARY_MODE                     0x80
  1579.  
  1580. #define CONVERSION_REQUEST              0x20
  1581. #define INTERIM_CHAR                    0x80
  1582.  
  1583. #define HOTKEY_MAX_COUNT                0x0000
  1584. #define HOTKEY_CURRENT_COUNT            0x0001
  1585.  
  1586. #define KBD_DATA_RECEIVED               0x0001
  1587. #define KBD_DATA_BINARY                 0x8000
  1588.  
  1589. #define KBD_READ_WAIT                   0x0000
  1590. #define KBD_READ_NOWAIT                 0x8000
  1591.  
  1592. #define SHIFT_REPORT_MODE               0x01
  1593.  
  1594.  
  1595. #define RIGHTSHIFT                      0x0001
  1596. #define LEFTSHIFT                       0x0002
  1597. #define CONTROL                         0x0004
  1598. #define ALT                             0x0008
  1599. #define SCROLLLOCK_ON                   0x0010
  1600. #define NUMLOCK_ON                      0x0020
  1601. #define CAPSLOCK_ON                     0x0040
  1602. #define INSERT_ON                       0x0080
  1603. #define LEFTCONTROL                     0x0100
  1604. #define LEFTALT                         0x0200
  1605. #define RIGHTCONTROL                    0x0400
  1606. #define RIGHTALT                        0x0800
  1607. #define SCROLLLOCK                      0x1000
  1608. #define NUMLOCK                         0x2000
  1609. #define CAPSLOCK                        0x4000
  1610. #define SYSREQ                          0x8000
  1611.  
  1612. #define PRINTER_TIMEOUT                 0x0001
  1613. #define PRINTER_IO_ERROR                0x0008
  1614. #define PRINTER_SELECTED                0x0010
  1615. #define PRINTER_OUT_OF_PAPER            0x0020
  1616. #define PRINTER_ACKNOWLEDGED            0x0040
  1617. #define PRINTER_NOT_BUSY                0x0080
  1618.  
  1619. #define MOUSE_MOTION                    0x0001
  1620. #define MOUSE_MOTION_WITH_BN1_DOWN      0x0002
  1621. #define MOUSE_BN1_DOWN                  0x0004
  1622. #define MOUSE_MOTION_WITH_BN2_DOWN      0x0008
  1623. #define MOUSE_BN2_DOWN                  0x0010
  1624. #define MOUSE_MOTION_WITH_BN3_DOWN      0x0020
  1625. #define MOUSE_BN3_DOWN                  0x0040
  1626.  
  1627. #define MHK_BUTTON1                     0x0001
  1628. #define MHK_BUTTON2                     0x0002
  1629. #define MHK_BUTTON3                     0x0004
  1630.  
  1631. #define MOU_NOWAIT                      0x0000
  1632. #define MOU_WAIT                        0x0001
  1633.  
  1634. #define MHK_NO_HOTKEY                   0x0000
  1635.  
  1636. #define MOUSE_QUEUEBUSY                 0x0001
  1637. #define MOUSE_BLOCKREAD                 0x0002
  1638. #define MOUSE_FLUSH                     0x0004
  1639. #define MOUSE_UNSUPPORTED_MODE          0x0008
  1640. #define MOUSE_DISABLED                  0x0100
  1641. #define MOUSE_MICKEYS                   0x0200
  1642.  
  1643. #define BUILD_BPB_FROM_MEDIUM           0x00
  1644. #define REPLACE_BPB_FOR_DEVICE          0x01
  1645. #define REPLACE_BPB_FOR_MEDIUM          0x02
  1646.  
  1647. #define DEVTYPE_48TPI                   0x0000
  1648. #define DEVTYPE_96TPI                   0x0001
  1649. #define DEVTYPE_35                      0x0002
  1650. #define DEVTYPE_8SD                     0x0003
  1651. #define DEVTYPE_8DD                     0x0004
  1652. #define DEVTYPE_FIXED                   0x0005
  1653. #define DEVTYPE_TAPE                    0x0006
  1654. #define DEVTYPE_UNKNOWN                 0x0007
  1655.  
  1656. typedef struct
  1657. {
  1658.   USHORT usWriteTimeout;
  1659.   USHORT usReadTimeout;
  1660.   BYTE   fbCtlHndShake;
  1661.   BYTE   fbFlowReplace;
  1662.   BYTE   fbTimeout;
  1663.   BYTE   bErrorReplacementChar;
  1664.   BYTE   bBreakReplacementChar;
  1665.   BYTE   bXONChar;
  1666.   BYTE   bXOFFChar;
  1667. } DCBINFO;
  1668. typedef DCBINFO *PDCBINFO;
  1669.  
  1670. typedef struct
  1671. {
  1672.   BYTE bDataBits;
  1673.   BYTE bParity;
  1674.   BYTE bStopBits;
  1675.   BYTE fTransBreak;
  1676. } LINECONTROL;
  1677. typedef LINECONTROL *PLINECONTROL;
  1678.  
  1679. typedef struct
  1680. {
  1681.   BYTE fbModemOn;
  1682.   BYTE fbModemOff;
  1683. } MODEMSTATUS;
  1684. typedef MODEMSTATUS *PMODEMSTATUS;
  1685.  
  1686. typedef struct
  1687. {
  1688.   USHORT usType;
  1689.   USHORT reserved1;
  1690.   USHORT reserved2;
  1691. } KBDTYPE;
  1692. typedef KBDTYPE *PKBDTYPE;
  1693.  
  1694. typedef struct
  1695. {
  1696.   USHORT usDelay;
  1697.   USHORT usRate;
  1698. } RATEDELAY;
  1699. typedef RATEDELAY *PRATEDELAY;
  1700.  
  1701. typedef struct
  1702. {
  1703.   PBYTE  pbTransTable;
  1704.   USHORT idCodePage;
  1705.   USHORT idTable;
  1706. } CODEPAGEINFO;
  1707. typedef *PCODEPAGEINFO;
  1708.  
  1709. typedef struct
  1710. {
  1711.   USHORT idCodePage;
  1712.   USHORT Reserved;
  1713. } CPID;
  1714. typedef CPID *PCPID;
  1715.  
  1716. typedef struct
  1717. {
  1718.   USHORT fsState;
  1719.   BYTE   fNLS;
  1720. } SHIFTSTATE;
  1721. typedef SHIFTSTATE *PSHIFTSTATE;
  1722.  
  1723. typedef struct
  1724. {
  1725.   USHORT fsHotKey;
  1726.   UCHAR  uchScancodeMake;
  1727.   UCHAR  uchScancodeBreak;
  1728.   USHORT idHotKey;
  1729. } HOTKEY;
  1730. typedef HOTKEY *PHOTKEY;
  1731.  
  1732. typedef struct
  1733. {
  1734.   USHORT usReturnCode;
  1735.   PFN    pfnDraw;
  1736.   PCH    pchDataSeg;
  1737. } PTRDRAWFUNCTION;
  1738. typedef PTRDRAWFUNCTION *PPTRDRAWFUNCTION;
  1739.  
  1740. typedef struct
  1741. {
  1742.   USHORT          reserved;
  1743.   PTRDRAWFUNCTION ptrdfnc;
  1744. } PTRDRAWADDRESS;
  1745. typedef PTRDRAWADDRESS *PPTRDRAWADDRESS;
  1746.  
  1747. typedef struct
  1748. {
  1749.   USHORT cb;
  1750.   USHORT usConfig;
  1751.   USHORT usFlag;
  1752. } PTRDRAWDATA;
  1753. typedef PTRDRAWDATA *PPTRDRAWDATA;
  1754.  
  1755. typedef struct
  1756. {
  1757.   BYTE   bCommand;
  1758.   USHORT usHead;
  1759.   USHORT usCylinder;
  1760.   USHORT usFirstSector;
  1761.   USHORT cSectors;
  1762.   struct
  1763.     {
  1764.       USHORT usSectorNumber;
  1765.       USHORT usSectorSize;
  1766.     } TrackTable[1];
  1767. } TRACKLAYOUT;
  1768. typedef TRACKLAYOUT *PTRACKLAYOUT;
  1769.  
  1770. typedef struct
  1771. {
  1772.   BYTE   bCommand;
  1773.   USHORT usHead;
  1774.   USHORT usCylinder;
  1775.   USHORT usReserved;
  1776.   USHORT cSectors;
  1777.   struct
  1778.     {
  1779.       BYTE bCylinder;
  1780.       BYTE bHead;
  1781.       BYTE idSector;
  1782.       BYTE bBytesSector;
  1783.     } FormatTable[1];
  1784. } TRACKFORMAT;
  1785. typedef TRACKFORMAT *PTRACKFORMAT;
  1786.  
  1787. typedef struct
  1788. {
  1789.   USHORT usBytesPerSector;
  1790.   BYTE   bSectorsPerCluster;
  1791.   USHORT usReservedSectors;
  1792.   BYTE   cFATs;
  1793.   USHORT cRootEntries;
  1794.   USHORT cSectors;
  1795.   BYTE   bMedia;
  1796.   USHORT usSectorsPerFAT;
  1797.   USHORT usSectorsPerTrack;
  1798.   USHORT cHeads;
  1799.   ULONG  cHiddenSectors;
  1800.   ULONG  cLargeSectors;
  1801.   BYTE   abReserved[6];
  1802.   USHORT cCylinders;
  1803.   BYTE   bDeviceType;
  1804.   USHORT fsDeviceAttr;
  1805. } BIOSPARAMETERBLOCK;
  1806. typedef BIOSPARAMETERBLOCK *PBIOSPARAMETERBLOCK;
  1807.  
  1808. typedef struct
  1809. {
  1810.   USHORT reserved1;
  1811.   USHORT cCylinders;
  1812.   USHORT cHeads;
  1813.   USHORT cSectorsPerTrack;
  1814.   USHORT reserved2;
  1815.   USHORT reserved3;
  1816.   USHORT reserved4;
  1817.   USHORT reserved5;
  1818. } DEVICEPARAMETERBLOCK;
  1819. typedef DEVICEPARAMETERBLOCK *PDEVICEPARAMETERBLOCK;
  1820.  
  1821. typedef struct
  1822. {
  1823.   USHORT fPosition;
  1824.   USHORT index;
  1825.   ULONG  pbInBuf;
  1826.   USHORT offOutBuf;
  1827. } MONITORPOSITION;
  1828. typedef MONITORPOSITION *PMONITORPOSITION;
  1829.  
  1830. typedef struct
  1831. {
  1832.   BYTE bCharsPerLine;
  1833.   BYTE bLinesPerInch;
  1834. } FRAME;
  1835. typedef FRAME *PFRAME;
  1836.  
  1837. typedef struct
  1838. {
  1839.   PULONG pulPhysAddr;
  1840.   USHORT cb;
  1841. } LDTADDRINFO;
  1842. typedef LDTADDRINFO *PLDTADDRINFO;
  1843.  
  1844. typedef struct
  1845. {
  1846.   USHORT idScreenGrp;
  1847.   USHORT fTerminate;
  1848. } SCREENGROUP;
  1849. typedef SCREENGROUP *PSCREENGROUP;
  1850.  
  1851. typedef struct
  1852. {
  1853.   USHORT cch;
  1854.   USHORT cb;
  1855. } RXQUEUE;
  1856. typedef RXQUEUE *PRXQUEUE;
  1857.  
  1858.  
  1859. ULONG DosDevConfig (PVOID pInfo, ULONG ulItem);
  1860. ULONG DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction,
  1861.     PVOID pParams, ULONG ulParamsLengthMax, PULONG pulParamsLength,
  1862.     PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength);
  1863. ULONG DosPhysicalDisk (ULONG ulFunction, PVOID pBuffer, ULONG ulBufferLength,
  1864.     PVOID pParams, ULONG ulParamsLength);
  1865.  
  1866. #endif /* INCL_DOSDEVIOCTL */
  1867.  
  1868. /* -------------------- NATIONAL LANGUAGE SUPPORT ------------------------- */
  1869.  
  1870. typedef struct
  1871. {
  1872.   ULONG country;
  1873.   ULONG codepage;
  1874. } COUNTRYCODE;
  1875. typedef COUNTRYCODE *PCOUNTRYCODE;
  1876.  
  1877. typedef struct
  1878. {
  1879.   ULONG  country;
  1880.   ULONG  codepage;
  1881.   ULONG  fsDateFmt;
  1882.   CHAR   szCurrency[5];
  1883.   CHAR   szThousandsSeparator[2];
  1884.   CHAR   szDecimal[2];
  1885.   CHAR   szDateSeparator[2];
  1886.   CHAR   szTimeSeparator[2];
  1887.   UCHAR  fsCurrencyFmt;
  1888.   UCHAR  cDecimalPlace;
  1889.   UCHAR  fsTimeFmt;
  1890.   USHORT abReserved1[2];
  1891.   CHAR   szDataSeparator[2];
  1892.   USHORT abReserved2[5];
  1893. } COUNTRYINFO;
  1894. typedef COUNTRYINFO *PCOUNTRYINFO;
  1895.  
  1896. ULONG DosMapCase (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
  1897.     PCHAR pchString);
  1898. ULONG DosQueryCollate (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
  1899.     PCHAR pchBuffer, PULONG pulDataLength);
  1900. ULONG DosQueryCp (ULONG ulLength, PULONG pCodePageList, PULONG pDataLength);
  1901. ULONG DosQueryCtryInfo (ULONG ulLength, PCOUNTRYCODE pCountryCode,
  1902.     PCOUNTRYINFO pCountryInfo, PULONG pulDataLength);
  1903. ULONG DosQueryDBCSEnv (ULONG ulLength, PCOUNTRYCODE pCountryCode, PCHAR pBuf);
  1904. ULONG DosSetProcessCp (ULONG ulCodePage);
  1905.  
  1906. /* -------------------------- DYNAMIC LINKING ----------------------------- */
  1907.  
  1908. #if defined (INCL_DOSMODULEMGR)
  1909.  
  1910. #define PT_16BIT                0
  1911. #define PT_32BIT                1
  1912.  
  1913.  
  1914. ULONG DosFreeModule (HMODULE hmod);
  1915. ULONG DosLoadModule (PSZ pszObject, ULONG uObjectLen, CONSTPSZ pszModule,
  1916.     PHMODULE phmod);
  1917. ULONG DosQueryModuleHandle (CONSTPSZ pszModname, PHMODULE phmod);
  1918. ULONG DosQueryModuleName (HMODULE hmod, ULONG ulNameLength, PCHAR pNameBuf);
  1919. ULONG DosQueryProcAddr (HMODULE hmod, ULONG ulOrdinal, CONSTPSZ pszProcName,
  1920.     PPFN pProcAddr);
  1921. ULONG DosQueryProcType (HMODULE hmod, ULONG ulOrdinal, CONSTPSZ pszProcName,
  1922.      PULONG pulProcType);
  1923.  
  1924. #endif /* INCL_DOSMODULEMGR */
  1925.  
  1926. /* ----------------------------- RESOURCES -------------------------------- */
  1927.  
  1928. #if defined (INCL_DOSRESOURCES) || !defined (INCL_NOCOMMON)
  1929.  
  1930. #define RT_POINTER              1
  1931. #define RT_BITMAP               2
  1932. #define RT_MENU                 3
  1933. #define RT_DIALOG               4
  1934. #define RT_STRING               5
  1935. #define RT_FONTDIR              6
  1936. #define RT_FONT                 7
  1937. #define RT_ACCELTABLE           8
  1938. #define RT_RCDATA               9
  1939. #define RT_MESSAGE              10
  1940. #define RT_DLGINCLUDE           11
  1941. #define RT_VKEYTBL              12
  1942. #define RT_KEYTBL               13
  1943. #define RT_CHARTBL              14
  1944. #define RT_DISPLAYINFO          15
  1945. #define RT_FKASHORT             16
  1946. #define RT_FKALONG              17
  1947. #define RT_HELPTABLE            18
  1948. #define RT_HELPSUBTABLE         19
  1949. #define RT_FDDIR                20
  1950. #define RT_FD                   21
  1951. #define RT_MAX                  22
  1952.  
  1953. #define RF_ORDINALID            0x80000000L
  1954.  
  1955. #endif
  1956.  
  1957. #if defined (INCL_DOSRESOURCES)
  1958.  
  1959. ULONG DosFreeResource (PVOID pResAddr);
  1960. ULONG DosGetResource (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
  1961.     PPVOID pOffset);
  1962. ULONG DosQueryResourceSize (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
  1963.     PULONG pulSize);
  1964.  
  1965. #endif /* INCL_DOSRESOURCES */
  1966.  
  1967. /* -------------------------------- TASKS --------------------------------- */
  1968.  
  1969. #define DCWA_PROCESS            0
  1970. #define DCWA_PROCESSTREE        1
  1971.  
  1972. #define DCWW_WAIT               0
  1973. #define DCWW_NOWAIT             1
  1974.  
  1975. #define DKP_PROCESSTREE         0
  1976. #define DKP_PROCESS             1
  1977.  
  1978. #define EXEC_SYNC               0
  1979. #define EXEC_ASYNC              1
  1980. #define EXEC_ASYNCRESULT        2
  1981. #define EXEC_TRACE              3
  1982. #define EXEC_BACKGROUND         4
  1983. #define EXEC_LOAD               5
  1984. #define EXEC_ASYNCRESULTDB      6
  1985.  
  1986. #define EXIT_THREAD             0
  1987. #define EXIT_PROCESS            1
  1988.  
  1989. #define EXLST_ADD               1
  1990. #define EXLST_REMOVE            2
  1991. #define EXLST_EXIT              3
  1992.  
  1993. #define PRTYC_NOCHANGE          0
  1994. #define PRTYC_IDLETIME          1
  1995. #define PRTYC_REGULAR           2
  1996. #define PRTYC_TIMECRITICAL      3
  1997. #define PRTYC_FOREGROUNDSERVER  4
  1998.  
  1999. #define PRTYD_MINIMUM           (-31)
  2000. #define PRTYD_MAXIMUM           31
  2001.  
  2002. #define PRTYS_PROCESS           0
  2003. #define PRTYS_PROCESSTREE       1
  2004. #define PRTYS_THREAD            2
  2005.  
  2006. #define TC_EXIT                 0
  2007. #define TC_HARDERROR            1
  2008. #define TC_TRAP                 2
  2009. #define TC_KILLPROCESS          3
  2010. #define TC_EXCEPTION            4
  2011.  
  2012. typedef struct
  2013. {
  2014.   ULONG codeTerminate;
  2015.   ULONG codeResult;
  2016. } RESULTCODES;
  2017. typedef RESULTCODES *PRESULTCODES;
  2018.  
  2019. typedef struct
  2020. {
  2021.   ULONG  tib2_ultid;
  2022.   ULONG  tib2_ulpri;
  2023.   ULONG  tib2_version;
  2024.   USHORT tib2_usMCCount;
  2025.   USHORT tib2_fMCForceFlag;
  2026. } TIB2;
  2027. typedef TIB2 *PTIB2;
  2028.  
  2029. typedef struct
  2030. {
  2031.   PVOID tib_pexchain;
  2032.   PVOID tib_pstack;
  2033.   PVOID tib_pstacklimit;
  2034.   PTIB2 tib_ptib2;
  2035.   ULONG tib_version;
  2036.   ULONG tib_ordinal;
  2037. } TIB;
  2038. typedef TIB *PTIB;
  2039.  
  2040. typedef struct
  2041. {
  2042.   ULONG pib_ulpid;
  2043.   ULONG pib_ulppid;
  2044.   ULONG pib_hmte;
  2045.   PCHAR pib_pchcmd;
  2046.   PCHAR pib_pchenv;
  2047.   ULONG pib_flstatus;
  2048.   ULONG pib_ultype;
  2049. } PIB;
  2050. typedef PIB *PPIB;
  2051.  
  2052. typedef VOID (*PFNTHREAD)(ULONG ulThreadArg);
  2053. typedef VOID (*PFNEXITLIST)(ULONG ulArg);
  2054.  
  2055. ULONG DosBeep (ULONG ulFrequency, ULONG ulDuration);
  2056. ULONG DosCreateThread (PTID ptidThreadID, PFNTHREAD pfnThreadAddr,
  2057.     ULONG ulThreadArg, ULONG ulFlags, ULONG ulStackSize);
  2058. ULONG DosEnterCritSec (VOID);
  2059. ULONG DosExecPgm (PCHAR pObjname, LONG lObjnameLength, ULONG ulFlagS,
  2060.     CONSTPSZ pszArg, CONSTPSZ pszEnv, PRESULTCODES pReturnCodes,
  2061.     CONSTPSZ pszName);
  2062. VOID __volatile__ DosExit (ULONG ulAction, ULONG ulResult);
  2063. ULONG DosExitCritSec (VOID);
  2064. ULONG DosExitList (ULONG ulOrder, PFNEXITLIST pfn);
  2065. ULONG DosGetInfoBlocks (PTIB *ptib, PPIB *ppib);
  2066. ULONG DosKillProcess (ULONG ulAction, PID pid);
  2067. ULONG DosKillThread (TID tid);
  2068. ULONG DosResumeThread (TID tid);
  2069. ULONG DosSetPriority (ULONG ulScope, ULONG ulClass, LONG lDelta, ULONG ulID);
  2070. ULONG DosSleep (ULONG ulInterval);
  2071. ULONG DosSuspendThread (TID tid);
  2072. ULONG DosWaitChild (ULONG ulAction, ULONG ulWait, PRESULTCODES pReturnCodes,
  2073.     PPID ppidOut, PID pidIn);
  2074. ULONG DosWaitThread (PTID ptid, ULONG ulWait);
  2075.  
  2076. /* ------------------------------ SESSIONS -------------------------------- */
  2077.  
  2078. #define SSF_RELATED_INDEPENDENT 0
  2079. #define SSF_RELATED_CHILD       1
  2080.  
  2081. #define SSF_FGBG_FORE           0
  2082. #define SSF_FGBG_BACK           1
  2083.  
  2084. #define SSF_TRACEOPT_NONE       0
  2085. #define SSF_TRACEOPT_TRACE      1
  2086. #define SSF_TRACEOPT_TRACEALL   2
  2087.  
  2088. #define SSF_INHERTOPT_SHELL     0
  2089. #define SSF_INHERTOPT_PARENT    1
  2090.  
  2091. #define SSF_TYPE_DEFAULT        0
  2092. #define SSF_TYPE_FULLSCREEN     1
  2093. #define SSF_TYPE_WINDOWABLEVIO  2
  2094. #define SSF_TYPE_PM             3
  2095. #define SSF_TYPE_VDM            4
  2096. #define SSF_TYPE_GROUP          5
  2097. #define SSF_TYPE_DLL            6
  2098. #define SSF_TYPE_WINDOWEDVDM    7
  2099. #define SSF_TYPE_PDD            8
  2100. #define SSF_TYPE_VDD            9
  2101.  
  2102. #define SSF_CONTROL_VISIBLE     0x0000
  2103. #define SSF_CONTROL_INVISIBLE   0x0001
  2104. #define SSF_CONTROL_MAXIMIZE    0x0002
  2105. #define SSF_CONTROL_MINIMIZE    0x0004
  2106. #define SSF_CONTROL_NOAUTOCLOSE 0x0008
  2107. #define SSF_CONTROL_SETPOS      0x8000
  2108.  
  2109. #define SET_SESSION_UNCHANGED          0
  2110. #define SET_SESSION_SELECTABLE         1
  2111. #define SET_SESSION_NON_SELECTABLE     2
  2112. #define SET_SESSION_BOND               1
  2113. #define SET_SESSION_NO_BOND            2
  2114.  
  2115. #define STOP_SESSION_SPECIFIED         0
  2116. #define STOP_SESSION_ALL               1
  2117.  
  2118. #define FAPPTYP_NOTSPEC         0x0000
  2119. #define FAPPTYP_NOTWINDOWCOMPAT 0x0001
  2120. #define FAPPTYP_WINDOWCOMPAT    0x0002
  2121. #define FAPPTYP_WINDOWAPI       0x0003
  2122. #define FAPPTYP_BOUND           0x0008
  2123. #define FAPPTYP_DLL             0x0010
  2124. #define FAPPTYP_DOS             0x0020
  2125. #define FAPPTYP_PHYSDRV         0x0040
  2126. #define FAPPTYP_VIRTDRV         0x0080
  2127. #define FAPPTYP_PROTDLL         0x0100
  2128. #define FAPPTYP_WINDOWSREAL     0x0200
  2129. #define FAPPTYP_WINDOWSPROT     0x0400
  2130. #define FAPPTYP_32BIT           0x4000
  2131. #define FAPPTYP_EXETYPE         0x0003
  2132. #define FAPPTYP_RESERVED        (~(FAPPTYP_WINDOWAPI | FAPPTYP_BOUND | \
  2133.                                    FAPPTYP_DLL | FAPPTYP_DOS | \
  2134.                                    FAPPTYP_PHYSDRV | FAPPTYP_VIRTDRV | \
  2135.                                    FAPPTYP_PROTDLL | FAPPTYP_32BIT))
  2136.  
  2137. typedef struct
  2138. {
  2139.   USHORT Length;
  2140.   USHORT Related;
  2141.   USHORT FgBg;
  2142.   USHORT TraceOpt;
  2143.   PSZ    PgmTitle;
  2144.   PSZ    PgmName;
  2145.   PBYTE  PgmInputs;
  2146.   PBYTE  TermQ;
  2147.   PBYTE  Environment;
  2148.   USHORT InheritOpt;
  2149.   USHORT SessionType;
  2150.   PSZ    IconFile;
  2151.   ULONG  PgmHandle;
  2152.   USHORT PgmControl;
  2153.   USHORT InitXPos;
  2154.   USHORT InitYPos;
  2155.   USHORT InitXSize;
  2156.   USHORT InitYSize;
  2157.   USHORT Reserved;
  2158.   PSZ    ObjectBuffer;
  2159.   ULONG  ObjectBuffLen;
  2160. } STARTDATA;
  2161. typedef STARTDATA *PSTARTDATA;
  2162.  
  2163. typedef struct
  2164. {
  2165.   USHORT Length;
  2166.   USHORT SelectInd;
  2167.   USHORT BondInd;
  2168. } STATUSDATA;
  2169. typedef STATUSDATA *PSTATUSDATA;
  2170.  
  2171. ULONG DosQueryAppType (PSZ pszName, PULONG pulFlags);
  2172. ULONG DosSelectSession (ULONG ulIDSession);
  2173. ULONG DosSetSession (ULONG ulIDSession, PSTATUSDATA psd);
  2174. ULONG DosStartSession (PSTARTDATA psd, PULONG pulIDSession, PPID ppid);
  2175. ULONG DosStopSession (ULONG ulScope, ULONG ulIDSession);
  2176.  
  2177. /* ----------------------------- SEMAPHORES ------------------------------- */
  2178.  
  2179. #define SEM_INDEFINITE_WAIT     (-1L)
  2180. #define SEM_IMMEDIATE_RETURN    0L
  2181.  
  2182. #define DC_SEM_SHARED           0x01
  2183. #define DCMW_WAIT_ANY           0x02
  2184. #define DCMW_WAIT_ALL           0x04
  2185.  
  2186. typedef ULONG HEV;
  2187. typedef HEV *PHEV;
  2188.  
  2189. ULONG DosCloseEventSem (HEV hev);
  2190. ULONG DosCreateEventSem (CONSTPSZ pszName, PHEV phev, ULONG ulAttr,
  2191.     BOOL32 fState);
  2192. ULONG DosOpenEventSem (CONSTPSZ pszName, PHEV phev);
  2193. ULONG DosPostEventSem (HEV hev);
  2194. ULONG DosQueryEventSem (HEV hev, PULONG pulCount);
  2195. ULONG DosResetEventSem (HEV hev, PULONG pulCount);
  2196. ULONG DosWaitEventSem (HEV hev, ULONG ulTimeout);
  2197.  
  2198. typedef ULONG HMTX;
  2199. typedef HMTX *PHMTX;
  2200.  
  2201. ULONG DosCloseMutexSem (HMTX hmtx);
  2202. ULONG DosCreateMutexSem (CONSTPSZ pszName, PHMTX phmtx, ULONG ulAttr,
  2203.     BOOL32 fState);
  2204. ULONG DosOpenMutexSem (CONSTPSZ pszName, PHMTX phmtx);
  2205. ULONG DosQueryMutexSem (HMTX hmtx, PPID ppid, PTID ptid, PULONG pulCount);
  2206. ULONG DosReleaseMutexSem (HMTX hmtx);
  2207. ULONG DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
  2208.  
  2209. typedef ULONG HMUX;
  2210. typedef HMUX *PHMUX;
  2211.  
  2212. typedef VOID *HSEM;
  2213. typedef HSEM *PHSEM;
  2214.  
  2215. typedef struct
  2216. {
  2217.   HSEM  hsemCur;
  2218.   ULONG ulUser;
  2219. } SEMRECORD;
  2220. typedef SEMRECORD *PSEMRECORD;
  2221.  
  2222. ULONG DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec);
  2223. ULONG DosCloseMuxWaitSem (HMUX hmux);
  2224. ULONG DosCreateMuxWaitSem (CONSTPSZ pszName, PHMUX phmux, ULONG ulcSemRec,
  2225.     PSEMRECORD pSemRec, ULONG ulAttr);
  2226. ULONG DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem);
  2227. ULONG DosOpenMuxWaitSem (CONSTPSZ pszName, PHMUX phmux);
  2228. ULONG DosQueryMuxWaitSem (HMUX hmux, PULONG pulcSemRec, PSEMRECORD pSemRec,
  2229.     PULONG pulAttr);
  2230. ULONG DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
  2231.  
  2232. /* ---------------------------- NAMED PIPES ------------------------------- */
  2233.  
  2234. #define NP_INDEFINITE_WAIT      (-1)
  2235. #define NP_DEFAULT_WAIT         0
  2236.  
  2237. #define NP_STATE_DISCONNECTED   1
  2238. #define NP_STATE_LISTENING      2
  2239. #define NP_STATE_CONNECTED      3
  2240. #define NP_STATE_CLOSING        4
  2241.  
  2242. #define NP_ACCESS_INBOUND       0x0000
  2243. #define NP_ACCESS_OUTBOUND      0x0001
  2244. #define NP_ACCESS_DUPLEX        0x0002
  2245. #define NP_INHERIT              0x0000
  2246. #define NP_NOINHERIT            0x0080
  2247. #define NP_WRITEBEHIND          0x0000
  2248. #define NP_NOWRITEBEHIND        0x4000
  2249.  
  2250. #define NP_READMODE_BYTE        0x0000
  2251. #define NP_READMODE_MESSAGE     0x0100
  2252. #define NP_TYPE_BYTE            0x0000
  2253. #define NP_TYPE_MESSAGE         0x0400
  2254. #define NP_END_CLIENT           0x0000
  2255. #define NP_END_SERVER           0x4000
  2256. #define NP_WAIT                 0x0000
  2257. #define NP_NOWAIT               0x8000
  2258. #define NP_UNLIMITED_INSTANCES  0x00ff
  2259.  
  2260. #define NPSS_EOI                0
  2261. #define NPSS_RDATA              1
  2262. #define NPSS_WSPACE             2
  2263. #define NPSS_CLOSE              3
  2264.  
  2265. #define NPSS_WAIT               0x0001
  2266.  
  2267. typedef struct
  2268. {
  2269.   USHORT cbpipe;
  2270.   USHORT cbmessage;
  2271. } AVAILDATA;
  2272. typedef AVAILDATA *PAVAILDATA;
  2273.  
  2274. typedef struct
  2275. {
  2276.   USHORT cbOut;
  2277.   USHORT cbIn;
  2278.   BYTE   cbMaxInst;
  2279.   BYTE   cbCurInst;
  2280.   BYTE   cbName;
  2281.   CHAR   szName[1];
  2282. } PIPEINFO;
  2283. typedef PIPEINFO *PPIPEINFO;
  2284.  
  2285. typedef struct
  2286. {
  2287.   BYTE   fStatus;
  2288.   BYTE   fFlag;
  2289.   USHORT usKey;
  2290.   USHORT usAvail;
  2291. } PIPESEMSTATE;
  2292. typedef PIPESEMSTATE *PPIPESEMSTATE;
  2293.  
  2294. ULONG DosCallNPipe (CONSTPSZ pszName, PVOID pInbuf, ULONG ulInbufLength,
  2295.     PVOID pOutbuf, ULONG ulOutbufSize, PULONG pulActualLength,
  2296.     ULONG ulTimeout);
  2297. ULONG DosConnectNPipe (HPIPE hpipe);
  2298. ULONG DosCreateNPipe (CONSTPSZ pszName, PHPIPE phpipe, ULONG ulOpenMode,
  2299.     ULONG ulPipeMode, ULONG ulInbufLength, ULONG ulOutbufLength,
  2300.     ULONG ulTimeout);
  2301. ULONG DosDisConnectNPipe (HPIPE hpipe);
  2302. ULONG DosPeekNPipe (HPIPE hpipe, PVOID pBuf, ULONG ulBufLength,
  2303.     PULONG pulActualLength, PAVAILDATA pAvail, PULONG pulState);
  2304. ULONG DosQueryNPHState (HPIPE hpipe, PULONG pulState);
  2305. ULONG DosQueryNPipeInfo (HPIPE hpipe, ULONG ulInfoLevel, PVOID pBuf,
  2306.     ULONG ulBufLength);
  2307. ULONG DosQueryNPipeSemState (HSEM hsem, PPIPESEMSTATE pState,
  2308.     ULONG ulBufLength);
  2309. ULONG DosSetNPHState (HPIPE hpipe, ULONG ulState);
  2310. ULONG DosSetNPipeSem (HPIPE hpipe, HSEM hsem, ULONG ulKey);
  2311. ULONG DosTransactNPipe (HPIPE hpipe, PVOID pOutbuf, ULONG ulOutbufLength,
  2312.     PVOID pInbuf, ULONG ulInbufLength, PULONG pulBytesRead);
  2313. ULONG DosWaitNPipe (CONSTPSZ pszName, ULONG ulTimeout);
  2314.  
  2315. /* ------------------------------- QUEUES --------------------------------- */
  2316.  
  2317. #define QUE_FIFO                        0x0000
  2318. #define QUE_LIFO                        0x0001
  2319. #define QUE_PRIORITY                    0x0002
  2320. #define QUE_NOCONVERT_ADDRESS           0x0000
  2321. #define QUE_CONVERT_ADDRESS             0x0004
  2322.  
  2323. typedef struct
  2324. {
  2325.   PID   pid;
  2326.   ULONG ulData;
  2327. } REQUESTDATA;
  2328. typedef REQUESTDATA *PREQUESTDATA;
  2329.  
  2330. ULONG DosCloseQueue (HQUEUE hq);
  2331. ULONG DosCreateQueue (PHQUEUE phq, ULONG ulPriority, CONSTPSZ pszName);
  2332. ULONG DosOpenQueue (PPID ppid, PHQUEUE phq, CONSTPSZ pszName);
  2333. ULONG DosPeekQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
  2334.     PPVOID pDataAddress, PULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
  2335.     HEV hsem);
  2336. ULONG DosPurgeQueue (HQUEUE hq);
  2337. ULONG DosQueryQueue (HQUEUE hq, PULONG pulCount);
  2338. ULONG DosReadQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
  2339.     PPVOID pDataAddress, ULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
  2340.     HEV hsem);
  2341. ULONG DosWriteQueue (HQUEUE hq, ULONG ulRequest, ULONG ulDataLength,
  2342.     PVOID pData, ULONG ulPriority);
  2343.  
  2344. /* --------------------------- EXCEPTIONS --------------------------------- */
  2345.  
  2346. #define CONTEXT_CONTROL                 0x0001
  2347. #define CONTEXT_INTEGER                 0x0002
  2348. #define CONTEXT_SEGMENTS                0x0004
  2349. #define CONTEXT_FLOATING_POINT          0x0008
  2350. #define CONTEXT_FULL                    (CONTEXT_CONTROL | CONTEXT_INTEGER | \
  2351.                                   CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT)
  2352.  
  2353. #define EH_NONCONTINUABLE               0x0001
  2354. #define EH_UNWINDING                    0x0002
  2355. #define EH_EXIT_UNWIND                  0x0004
  2356. #define EH_STACK_INVALID                0x0008
  2357. #define EH_NESTED_CALL                  0x0010
  2358.  
  2359. #define SIG_UNSETFOCUS                  0
  2360. #define SIG_SETFOCUS                    1
  2361.  
  2362. #define UNWIND_ALL                      0
  2363.  
  2364. #define XCPT_CONTINUE_SEARCH            0x00000000
  2365. #define XCPT_CONTINUE_EXECUTION         0xffffffff
  2366. #define XCPT_CONTINUE_STOP              0x00716668
  2367.  
  2368. #define XCPT_SIGNAL_INTR                1
  2369. #define XCPT_SIGNAL_KILLPROC            3
  2370. #define XCPT_SIGNAL_BREAK               4
  2371.  
  2372. #define XCPT_FATAL_EXCEPTION            0xc0000000
  2373. #define XCPT_SEVERITY_CODE              0xc0000000
  2374. #define XCPT_CUSTOMER_CODE              0x20000000
  2375. #define XCPT_FACILITY_CODE              0x1fff0000
  2376. #define XCPT_EXCEPTION_CODE             0x0000ffff
  2377.  
  2378. #define XCPT_UNKNOWN_ACCESS             0x00000000
  2379. #define XCPT_READ_ACCESS                0x00000001
  2380. #define XCPT_WRITE_ACCESS               0x00000002
  2381. #define XCPT_EXECUTE_ACCESS             0x00000004
  2382. #define XCPT_SPACE_ACCESS               0x00000008
  2383. #define XCPT_LIMIT_ACCESS               0x00000010
  2384. #define XCPT_DATA_UNKNOWN               0xffffffff
  2385.  
  2386. #define XCPT_GUARD_PAGE_VIOLATION       0x80000001
  2387. #define XCPT_UNABLE_TO_GROW_STACK       0x80010001
  2388. #define XCPT_ACCESS_VIOLATION           0xc0000005
  2389. #define XCPT_IN_PAGE_ERROR              0xc0000006
  2390. #define XCPT_ILLEGAL_INSTRUCTION        0xc000001c
  2391. #define XCPT_INVALID_LOCK_SEQUENCE      0xc000001d
  2392. #define XCPT_NONCONTINUABLE_EXCEPTION   0xc0000024
  2393. #define XCPT_INVALID_DISPOSITION        0xc0000025
  2394. #define XCPT_UNWIND                     0xc0000026
  2395. #define XCPT_BAD_STACK                  0xc0000027
  2396. #define XCPT_INVALID_UNWIND_TARGET      0xc0000028
  2397. #define XCPT_ARRAY_BOUNDS_EXCEEDED      0xc0000093
  2398. #define XCPT_FLOAT_DENORMAL_OPERAND     0xc0000094
  2399. #define XCPT_FLOAT_DIVIDE_BY_ZERO       0xc0000095
  2400. #define XCPT_FLOAT_INEXACT_RESULT       0xc0000096
  2401. #define XCPT_FLOAT_INVALID_OPERATION    0xc0000097
  2402. #define XCPT_FLOAT_OVERFLOW             0xc0000098
  2403. #define XCPT_FLOAT_STACK_CHECK          0xc0000099
  2404. #define XCPT_FLOAT_UNDERFLOW            0xc000009a
  2405. #define XCPT_INTEGER_DIVIDE_BY_ZERO     0xc000009b
  2406. #define XCPT_INTEGER_OVERFLOW           0xc000009c
  2407. #define XCPT_PRIVILEGED_INSTRUCTION     0xc000009d
  2408. #define XCPT_DATATYPE_MISALIGNMENT      0xc000009e
  2409. #define XCPT_BREAKPOINT                 0xc000009f
  2410. #define XCPT_SINGLE_STEP                0xc00000a0
  2411. #define XCPT_PROCESS_TERMINATE          0xc0010001
  2412. #define XCPT_ASYNC_PROCESS_TERMINATE    0xc0010002
  2413. #define XCPT_SIGNAL                     0xc0010003
  2414.  
  2415. typedef struct
  2416. {
  2417.   ULONG  losig;
  2418.   ULONG  hisig;
  2419.   USHORT signexp;
  2420. } FPREG;
  2421. typedef FPREG *PFPREG;
  2422.  
  2423. typedef struct
  2424. {
  2425.   ULONG ContextFlags;
  2426.   ULONG ctx_env[7];
  2427.   FPREG ctx_stack[8];
  2428.   ULONG ctx_SegGs;
  2429.   ULONG ctx_SegFs;
  2430.   ULONG ctx_SegEs;
  2431.   ULONG ctx_SegDs;
  2432.   ULONG ctx_RegEdi;
  2433.   ULONG ctx_RegEsi;
  2434.   ULONG ctx_RegEax;
  2435.   ULONG ctx_RegEbx;
  2436.   ULONG ctx_RegEcx;
  2437.   ULONG ctx_RegEdx;
  2438.   ULONG ctx_RegEbp;
  2439.   ULONG ctx_RegEip;
  2440.   ULONG ctx_SegCs;
  2441.   ULONG ctx_EFlags;
  2442.   ULONG ctx_RegEsp;
  2443.   ULONG ctx_SegSs;
  2444. } CONTEXTRECORD;
  2445. typedef CONTEXTRECORD *PCONTEXTRECORD;
  2446.  
  2447. #define EXCEPTION_MAXIMUM_PARAMETERS 4
  2448.  
  2449. typedef struct _EXCEPTIONREPORTRECORD
  2450. {
  2451.   ULONG                           ExceptionNum;
  2452.   ULONG                           fHandlerFlags;
  2453.   struct _EXCEPTIONREPORTRECORD * NestedExceptionReportRecord;
  2454.   PVOID                           ExceptionAddress;
  2455.   ULONG                           cParameters;
  2456.   ULONG                           ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS];
  2457. } EXCEPTIONREPORTRECORD;
  2458. typedef EXCEPTIONREPORTRECORD *PEXCEPTIONREPORTRECORD;
  2459.  
  2460. struct _EXCEPTIONREGISTRATIONRECORD;
  2461.  
  2462. typedef ULONG (*ERR)(PEXCEPTIONREPORTRECORD pReport,
  2463.                      struct _EXCEPTIONREGISTRATIONRECORD *pRegistration,
  2464.                      PCONTEXTRECORD pContext, PVOID pWhatever);
  2465.  
  2466. typedef struct _EXCEPTIONREGISTRATIONRECORD
  2467. {
  2468.   struct _EXCEPTIONREGISTRATIONRECORD * __volatile__ prev_structure;
  2469.   ERR __volatile__                                   ExceptionHandler;
  2470. } EXCEPTIONREGISTRATIONRECORD;
  2471. typedef EXCEPTIONREGISTRATIONRECORD *PEXCEPTIONREGISTRATIONRECORD;
  2472.  
  2473. #define END_OF_CHAIN            ((PEXCEPTIONREGISTRATIONRECORD)(-1))
  2474.  
  2475. ULONG DosAcknowledgeSignalException (ULONG ulSignal);
  2476. ULONG DosEnterMustComplete (PULONG pulNesting);
  2477. ULONG DosExitMustComplete (PULONG pulNesting);
  2478. ULONG DosRaiseException (PEXCEPTIONREPORTRECORD pXRepRec);
  2479. ULONG DosSendSignalException (PID pid, ULONG ulSignal);
  2480. ULONG DosSetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
  2481. ULONG DosSetSignalExceptionFocus (BOOL32 flag, PULONG pulTimes);
  2482. ULONG DosUnsetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
  2483. ULONG DosUnwindException (PEXCEPTIONREGISTRATIONRECORD pXRegRec,
  2484.     PVOID pJumpThere, PEXCEPTIONREPORTRECORD pXRepRec);
  2485.  
  2486. /* --------------------------- INFORMATION -------------------------------- */
  2487.  
  2488. #define QSV_MAX_PATH_LENGTH             1
  2489. #define QSV_MAX_TEXT_SESSIONS           2
  2490. #define QSV_MAX_PM_SESSIONS             3
  2491. #define QSV_MAX_VDM_SESSIONS            4
  2492. #define QSV_BOOT_DRIVE                  5
  2493. #define QSV_DYN_PRI_VARIATION           6
  2494. #define QSV_MAX_WAIT                    7
  2495. #define QSV_MIN_SLICE                   8
  2496. #define QSV_MAX_SLICE                   9
  2497. #define QSV_PAGE_SIZE                   10
  2498. #define QSV_VERSION_MAJOR               11
  2499. #define QSV_VERSION_MINOR               12
  2500. #define QSV_VERSION_REVISION            13
  2501. #define QSV_MS_COUNT                    14
  2502. #define QSV_TIME_LOW                    15
  2503. #define QSV_TIME_HIGH                   16
  2504. #define QSV_TOTPHYSMEM                  17
  2505. #define QSV_TOTRESMEM                   18
  2506. #define QSV_TOTAVAILMEM                 19
  2507. #define QSV_MAXPRMEM                    20
  2508. #define QSV_MAXSHMEM                    21
  2509. #define QSV_TIMER_INTERVAL              22
  2510. #define QSV_MAX_COMP_LENGTH             23
  2511. #define QSV_MAX                         QSV_MAX_COMP_LENGTH
  2512.  
  2513. ULONG DosQuerySysInfo (ULONG ulStart, ULONG ulLast, PVOID pBuf,
  2514.     ULONG ulBufLength);
  2515. ULONG DosScanEnv (CONSTPSZ pszName, PSZ *pszValue);
  2516.  
  2517. /* ---------------------------- TIMERS ------------------------------------ */
  2518.  
  2519. typedef LHANDLE HTIMER;
  2520. typedef HTIMER  *PHTIMER;
  2521.  
  2522. typedef struct
  2523. {
  2524.   UCHAR  hours;
  2525.   UCHAR  minutes;
  2526.   UCHAR  seconds;
  2527.   UCHAR  hundredths;
  2528.   UCHAR  day;
  2529.   UCHAR  month;
  2530.   USHORT year;
  2531.   SHORT  timezone;
  2532.   UCHAR  weekday;
  2533. } DATETIME;
  2534. typedef DATETIME *PDATETIME;
  2535.  
  2536. typedef struct
  2537. {
  2538.   ULONG ulLo;
  2539.   ULONG ulHi;
  2540. } QWORD;
  2541. typedef QWORD *PQWORD;
  2542.  
  2543. ULONG DosAsyncTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
  2544. ULONG DosGetDateTime (PDATETIME pdt);
  2545. ULONG DosSetDateTime (__const__ DATETIME *pdt);
  2546. ULONG DosStartTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
  2547. ULONG DosStopTimer (HTIMER htimer);
  2548. ULONG DosTmrQueryFreq (PULONG pulTmrFreq);
  2549. ULONG DosTmrQueryTime (PQWORD pqwTmrTime);
  2550.  
  2551. /* ---------------------- VIRTUAL DOS MACHINES----------------------------- */
  2552.  
  2553. typedef LHANDLE HVDD;
  2554. typedef HVDD *PHVDD;
  2555.  
  2556. typedef USHORT SGID;
  2557.  
  2558. ULONG DosCloseVDD (HVDD hvdd);
  2559. ULONG DosOpenVDD (CONSTPSZ pszVDD, PHVDD phvdd);
  2560. ULONG DosQueryDOSProperty (SGID sgidSesssionID, CONSTPSZ pszName,
  2561.     ULONG ulBufferLength, PSZ pBuffer);
  2562. ULONG DosRequestVDD (HVDD hvdd, SGID sgidSessionID, ULONG ulCommand,
  2563.     ULONG ulInputBufferLength, PVOID pInputBuffer,
  2564.     ULONG ulOutputBufferLength, PVOID pOutputBuffer);
  2565. ULONG DosSetDOSProperty (SGID sgidSessionID, PSZ pszName,
  2566.     ULONG ulLength, PSZ pch);
  2567.  
  2568. /* --------------------------- DEBUGGING ---------------------------------- */
  2569.  
  2570. #define DBG_C_Null                      0
  2571. #define DBG_C_ReadMem                   1
  2572. #define DBG_C_ReadMem_I                 1
  2573. #define DBG_C_ReadMem_D                 2
  2574. #define DBG_C_ReadReg                   3
  2575. #define DBG_C_WriteMem                  4
  2576. #define DBG_C_WriteMem_I                4
  2577. #define DBG_C_WriteMem_D                5
  2578. #define DBG_C_WriteReg                  6
  2579. #define DBG_C_Go                        7
  2580. #define DBG_C_Term                      8
  2581. #define DBG_C_SStep                     9
  2582. #define DBG_C_Stop                      10
  2583. #define DBG_C_Freeze                    11
  2584. #define DBG_C_Resume                    12
  2585. #define DBG_C_NumToAddr                 13
  2586. #define DBG_C_ReadCoRegs                14
  2587. #define DBG_C_WriteCoRegs               15
  2588. #define DBG_C_ThrdStat                  17
  2589. #define DBG_C_MapROAlias                18
  2590. #define DBG_C_MapRWAlias                19
  2591. #define DBG_C_UnMapAlias                20
  2592. #define DBG_C_Connect                   21
  2593. #define DBG_C_ReadMemBuf                22
  2594. #define DBG_C_WriteMemBuf               23
  2595. #define DBG_C_SetWatch                  24
  2596. #define DBG_C_ClearWatch                25
  2597. #define DBG_C_RangeStep                 26
  2598. #define DBG_C_Continue                  27
  2599. #define DBG_C_AddrToObject              28
  2600. #define DBG_C_XchngOpcode               29
  2601. #define DBG_C_LinToSel                  30
  2602. #define DBG_C_SelToLin                  31
  2603.  
  2604. #define DBG_N_SUCCESS                   0
  2605. #define DBG_N_ERROR                     (-1)
  2606. #define DBG_N_ProcTerm                  (-6)
  2607. #define DBG_N_Exception                 (-7)
  2608. #define DBG_N_ModuleLoad                (-8)
  2609. #define DBG_N_CoError                   (-9)
  2610. #define DBG_N_ThreadTerm                (-10)
  2611. #define DBG_N_AsyncStop                 (-11)
  2612. #define DBG_N_NewProc                   (-12)
  2613. #define DBG_N_AliasFree                 (-13)
  2614. #define DBG_N_Watchpoint                (-14)
  2615. #define DBG_N_ThreadCreate              (-15)
  2616. #define DBG_N_ModuleFree                (-16)
  2617. #define DBG_N_RangeStep                 (-17)
  2618.  
  2619. #define DBG_D_Thawed                    0
  2620. #define DBG_D_Frozen                    1
  2621.  
  2622. #define DBG_T_Runnable                  0
  2623. #define DBG_T_Suspended                 1
  2624. #define DBG_T_Blocked                   2
  2625. #define DBG_T_CritSec                   3
  2626.  
  2627. #define DBG_L_386                       1
  2628.  
  2629. #define DBG_CO_387                      1
  2630.  
  2631. #define DBG_O_OBJMTE                    0x10000000
  2632.  
  2633. #define DBG_W_Global                    0x00000001
  2634. #define DBG_W_Local                     0x00000002
  2635. #define DBG_W_Execute                   0x00010000
  2636. #define DBG_W_Write                     0x00020000
  2637. #define DBG_W_ReadWrite                 0x00040000
  2638.  
  2639. typedef struct
  2640. {
  2641.   ULONG  ulPid;
  2642.   ULONG  ulTid;
  2643.   LONG   lCmd;
  2644.   LONG   lValue;
  2645.   ULONG  ulAddr;
  2646.   ULONG  ulBuffer;
  2647.   ULONG  ulLen;
  2648.   ULONG  ulIndex;
  2649.   ULONG  ulMTE;
  2650.   ULONG  ulEAX;
  2651.   ULONG  ulECX;
  2652.   ULONG  ulEDX;
  2653.   ULONG  ulEBX;
  2654.   ULONG  ulESP;
  2655.   ULONG  ulEBP;
  2656.   ULONG  ulESI;
  2657.   ULONG  ulEDI;
  2658.   ULONG  ulEFlags;
  2659.   ULONG  ulEIP;
  2660.   ULONG  ulCSLim;
  2661.   ULONG  ulCSBase;
  2662.   UCHAR  ucCSAcc;
  2663.   UCHAR  ucCSAtr;
  2664.   USHORT usCS;
  2665.   ULONG  ulDSLim;
  2666.   ULONG  ulDSBase;
  2667.   UCHAR  ucDSAcc;
  2668.   UCHAR  ucDSAtr;
  2669.   USHORT usDS;
  2670.   ULONG  ulESLim;
  2671.   ULONG  ulESBase;
  2672.   UCHAR  ucESAcc;
  2673.   UCHAR  ucESAtr;
  2674.   USHORT usES;
  2675.   ULONG  ulFSLim;
  2676.   ULONG  ulFSBase;
  2677.   UCHAR  ucFSAcc;
  2678.   UCHAR  ucFSAtr;
  2679.   USHORT usFS;
  2680.   ULONG  ulGSLim;
  2681.   ULONG  ulGSBase;
  2682.   UCHAR  ucGSAcc;
  2683.   UCHAR  ucGSAtr;
  2684.   USHORT usGS;
  2685.   ULONG  ulSSLim;
  2686.   ULONG  ulSSBase;
  2687.   UCHAR  ucSSAcc;
  2688.   UCHAR  ucSSAtr;
  2689.   USHORT usSS;
  2690. } DEBUGBUFFER;
  2691. typedef DEBUGBUFFER *PDEBUGBUFFER;
  2692.  
  2693. ULONG DosDebug (PDEBUGBUFFER pDebugBuffer);
  2694.  
  2695. /* ---------------------------- MESSAGES ---------------------------------- */
  2696.  
  2697. ULONG DosGetMessage (PCHAR *pTable, ULONG ulTableEntries,
  2698.     PCHAR pBuffer, ULONG ulBufferLengthMax, ULONG ulMsgnNumber,
  2699.     CONSTPSZ pszFile, PULONG pulBufferLength);
  2700. ULONG DosInsertMessage (PCHAR *pTable, ULONG ulCount, CONSTPSZ pszMsg,
  2701.     ULONG ulMsgLength, PCHAR pBuffer, ULONG ulBufferLengthMax,
  2702.     PULONG pulBufferLength);
  2703. ULONG DosPutMessage (HFILE hfile, ULONG ulMessageLength, PCHAR pMessage);
  2704. ULONG DosQueryMessageCP (PCHAR pBuffer, ULONG ulBufferLengthMax,
  2705.     CONSTPSZ pszFilename, PULONG pulBufferLength);
  2706.  
  2707.  
  2708. /* ---------------------------- REXX -------------------------------------- */
  2709.  
  2710. #define RXAUTOBUFLEN                    256
  2711.  
  2712. typedef struct
  2713. {
  2714.   ULONG strlength;
  2715.   PCH   strptr;
  2716. } RXSTRING;
  2717. typedef RXSTRING *PRXSTRING;
  2718.  
  2719. typedef struct
  2720. {
  2721.   PSZ  sysexit_name;
  2722.   LONG sysexit_code;
  2723. } RXSYSEXIT;
  2724. typedef RXSYSEXIT *PRXSYSEXIT;
  2725.  
  2726. #define RXNULLSTRING(r)         ((r).strptr == (PCH)0)
  2727. #define RXZEROLENSTRING(r)      ((r).strptr != (PCH)0 && (r).strlength == 0)
  2728. #define RXVALIDSTRING(r)        ((r).strptr != (PCH)0 && (r).strlength != 0)
  2729. #define RXSTRLEN(r)             (RXNULLSTRING(r) ? 0 : (r).strlength)
  2730. #define RXSTRPTR(r)             (r).strptr
  2731. #define MAKERXSTRING(r,p,l) \
  2732.     ((r).strptr = (PCH)p, (r).strlength = (ULONG)l)
  2733.  
  2734.  
  2735. /* ---------------------------- FONTS ------------------------------------- */
  2736.  
  2737. #define FM_TYPE_FIXED                   0x0001
  2738. #define FM_TYPE_LICENSED                0x0002
  2739. #define FM_TYPE_KERNING                 0x0004
  2740. #define FM_TYPE_DBCS                    0x0010
  2741. #define FM_TYPE_MBCS                    0x0018
  2742. #define FM_TYPE_64K                     0x8000
  2743. #define FM_TYPE_ATOMS                   0x4000
  2744. #define FM_TYPE_FAMTRUNC                0x2000
  2745. #define FM_TYPE_FACETRUNC               0x1000
  2746.  
  2747. #define FM_DEFN_OUTLINE                 0x0001
  2748. #define FM_DEFN_IFI                     0x0002
  2749. #define FM_DEFN_WIN                     0x0004
  2750. #define FM_DEFN_GENERIC                 0x8000
  2751.  
  2752. #define FM_SEL_ITALIC                   0x0001
  2753. #define FM_SEL_UNDERSCORE               0x0002
  2754. #define FM_SEL_NEGATIVE                 0x0004
  2755. #define FM_SEL_OUTLINE                  0x0008
  2756. #define FM_SEL_STRIKEOUT                0x0010
  2757. #define FM_SEL_BOLD                     0x0020
  2758. #define FM_SEL_ISO9241_TESTED           0x0040
  2759.  
  2760. #define FM_CAP_NOMIX                    0x0001
  2761.  
  2762. #define FM_ISO_9518_640                 0x01
  2763. #define FM_ISO_9515_640                 0x02
  2764. #define FM_ISO_9515_1024                0x04
  2765. #define FM_ISO_9517_640                 0x08
  2766. #define FM_ISO_9517_1024                0x10
  2767.  
  2768. #define FACESIZE 32
  2769.  
  2770. typedef struct
  2771. {
  2772.   BYTE bFamilyType;
  2773.   BYTE bSerifStyle;
  2774.   BYTE bWeight;
  2775.   BYTE bProportion;
  2776.   BYTE bContrast;
  2777.   BYTE bStrokeVariation;
  2778.   BYTE bArmStyle;
  2779.   BYTE bLetterform;
  2780.   BYTE bMidline;
  2781.   BYTE bXHeight;
  2782.   BYTE fbPassedISO;
  2783.   BYTE fbFailedISO;
  2784. } PANOSE;
  2785.  
  2786. typedef struct
  2787. {
  2788.   CHAR   szFamilyname[FACESIZE];
  2789.   CHAR   szFacename[FACESIZE];
  2790.   USHORT idRegistry;
  2791.   USHORT usCodePage;
  2792.   LONG   lEmHeight;
  2793.   LONG   lXHeight;
  2794.   LONG   lMaxAscender;
  2795.   LONG   lMaxDescender;
  2796.   LONG   lLowerCaseAscent;
  2797.   LONG   lLowerCaseDescent;
  2798.   LONG   lInternalLeading;
  2799.   LONG   lExternalLeading;
  2800.   LONG   lAveCharWidth;
  2801.   LONG   lMaxCharInc;
  2802.   LONG   lEmInc;
  2803.   LONG   lMaxBaselineExt;
  2804.   SHORT  sCharSlope;
  2805.   SHORT  sInlineDir;
  2806.   SHORT  sCharRot;
  2807.   USHORT usWeightClass;
  2808.   USHORT sWidthClass;
  2809.   SHORT  sXDeviceRes;
  2810.   SHORT  sYDeviceRes;
  2811.   SHORT  sFirstChar;
  2812.   SHORT  sLastChar;
  2813.   SHORT  sDefaultChar;
  2814.   SHORT  sBreakChar;
  2815.   SHORT  sNominalPointSize;
  2816.   SHORT  sMinimumPointSize;
  2817.   SHORT  sMaximumPointSize;
  2818.   USHORT fsType;
  2819.   USHORT fsDefn;
  2820.   USHORT fsSelection;
  2821.   USHORT fsCapabilities;
  2822.   LONG   lSubscriptXSize;
  2823.   LONG   lSubscriptYSize;
  2824.   LONG   lSubscriptXOffset;
  2825.   LONG   lSubscriptYOffset;
  2826.   LONG   lSuperscriptXSize;
  2827.   LONG   lSuperscriptYSize;
  2828.   LONG   lSuperscriptXOffset;
  2829.   LONG   lSuperscriptYOffset;
  2830.   LONG   lUnderscoreSize;
  2831.   LONG   lUnderscorePosition;
  2832.   LONG   lStrikeoutSize;
  2833.   LONG   lStrikeoutPosition;
  2834.   SHORT  sKerningPairs;
  2835.   SHORT  sFamilyClass;
  2836.   LONG   lMatch;
  2837.   LONG   FamilyNameAtom;
  2838.   LONG   FaceNameAtom;
  2839.   PANOSE panose;
  2840. } FONTMETRICS;
  2841. typedef FONTMETRICS *PFONTMETRICS;
  2842.  
  2843. typedef struct
  2844. {
  2845.   USHORT usRecordLength;
  2846.   USHORT fsSelection;
  2847.   LONG   lMatch;
  2848.   CHAR   szFacename[FACESIZE];
  2849.   USHORT idRegistry;
  2850.   USHORT usCodePage;
  2851.   LONG   lMaxBaselineExt;
  2852.   LONG   lAveCharWidth;
  2853.   USHORT fsType;
  2854.   USHORT fsFontUse;
  2855. } FATTRS;
  2856. typedef FATTRS *PFATTRS;
  2857.  
  2858. /* ----------------------- PRESENTATION MANAGER --------------------------- */
  2859.  
  2860. #define WM_NULL                         0x0000
  2861. #define WM_CREATE                       0x0001
  2862. #define WM_DESTROY                      0x0002
  2863. #define WM_ENABLE                       0x0004
  2864. #define WM_SHOW                         0x0005
  2865. #define WM_MOVE                         0x0006
  2866. #define WM_SIZE                         0x0007
  2867. #define WM_ADJUSTWINDOWPOS              0x0008
  2868. #define WM_CALCVALIDRECTS               0x0009
  2869. #define WM_SETWINDOWPARAMS              0x000a
  2870. #define WM_QUERYWINDOWPARAMS            0x000b
  2871. #define WM_HITTEST                      0x000c
  2872. #define WM_ACTIVATE                     0x000d
  2873. #define WM_SETFOCUS                     0x000f
  2874. #define WM_SETSELECTION                 0x0010
  2875. #define WM_PPAINT                       0x0011
  2876. #define WM_PSETFOCUS                    0x0012
  2877. #define WM_PSYSCOLORCHANGE              0x0013
  2878. #define WM_PSIZE                        0x0014
  2879. #define WM_PACTIVATE                    0x0015
  2880. #define WM_PCONTROL                     0x0016
  2881. #define WM_COMMAND                      0x0020
  2882. #define WM_SYSCOMMAND                   0x0021
  2883. #define WM_HELP                         0x0022
  2884. #define WM_PAINT                        0x0023
  2885. #define WM_TIMER                        0x0024
  2886. #define WM_SEM1                         0x0025
  2887. #define WM_SEM2                         0x0026
  2888. #define WM_SEM3                         0x0027
  2889. #define WM_SEM4                         0x0028
  2890. #define WM_CLOSE                        0x0029
  2891. #define WM_QUIT                         0x002a
  2892. #define WM_SYSCOLORCHANGE               0x002b
  2893. #define WM_SYSVALUECHANGED              0x002d
  2894. #define WM_APPTERMINATENOTIFY           0x002e
  2895. #define WM_PRESPARAMCHANGED             0x002f
  2896. #define WM_CONTROL                      0x0030
  2897. #define WM_VSCROLL                      0x0031
  2898. #define WM_HSCROLL                      0x0032
  2899. #define WM_INITMENU                     0x0033
  2900. #define WM_MENUSELECT                   0x0034
  2901. #define WM_MENUEND                      0x0035
  2902. #define WM_DRAWITEM                     0x0036
  2903. #define WM_MEASUREITEM                  0x0037
  2904. #define WM_CONTROLPOINTER               0x0038
  2905. #define WM_QUERYDLGCODE                 0x003a
  2906. #define WM_INITDLG                      0x003b
  2907. #define WM_SUBSTITUTESTRING             0x003c
  2908. #define WM_MATCHMNEMONIC                0x003d
  2909. #define WM_SAVEAPPLICATION              0x003e
  2910. #define WM_FLASHWINDOW                  0x0040
  2911. #define WM_FORMATFRAME                  0x0041
  2912. #define WM_UPDATEFRAME                  0x0042
  2913. #define WM_FOCUSCHANGE                  0x0043
  2914. #define WM_SETBORDERSIZE                0x0044
  2915. #define WM_TRACKFRAME                   0x0045
  2916. #define WM_MINMAXFRAME                  0x0046
  2917. #define WM_SETICON                      0x0047
  2918. #define WM_QUERYICON                    0x0048
  2919. #define WM_SETACCELTABLE                0x0049
  2920. #define WM_QUERYACCELTABLE              0x004a
  2921. #define WM_TRANSLATEACCEL               0x004b
  2922. #define WM_QUERYTRACKINFO               0x004c
  2923. #define WM_QUERYBORDERSIZE              0x004d
  2924. #define WM_NEXTMENU                     0x004e
  2925. #define WM_ERASEBACKGROUND              0x004f
  2926. #define WM_QUERYFRAMEINFO               0x0050
  2927. #define WM_QUERYFOCUSCHAIN              0x0051
  2928. #define WM_OWNERPOSCHANGE               0x0052
  2929. #define WM_CALCFRAMERECT                0x0053
  2930. #define WM_WINDOWPOSCHANGED             0x0055
  2931. #define WM_ADJUSTFRAMEPOS               0x0056
  2932. #define WM_QUERYFRAMECTLCOUNT           0x0059
  2933. #define WM_QUERYHELPINFO                0x005b
  2934. #define WM_SETHELPINFO                  0x005c
  2935. #define WM_ERROR                        0x005d
  2936. #define WM_REALIZEPALETTE               0x005e
  2937. #define WM_RENDERFMT                    0x0060
  2938. #define WM_RENDERALLFMTS                0x0061
  2939. #define WM_DESTROYCLIPBOARD             0x0062
  2940. #define WM_PAINTCLIPBOARD               0x0063
  2941. #define WM_SIZECLIPBOARD                0x0064
  2942. #define WM_HSCROLLCLIPBOARD             0x0065
  2943. #define WM_VSCROLLCLIPBOARD             0x0066
  2944. #define WM_DRAWCLIPBOARD                0x0067
  2945.  
  2946. #define WM_MOUSEFIRST                   0x0070
  2947. #define WM_MOUSEMOVE                    0x0070
  2948. #define WM_BUTTONCLICKFIRST             0x0071
  2949. #define WM_BUTTON1DOWN                  0x0071
  2950. #define WM_BUTTON1UP                    0x0072
  2951. #define WM_BUTTON1DBLCLK                0x0073
  2952. #define WM_BUTTON2DOWN                  0x0074
  2953. #define WM_BUTTON2UP                    0x0075
  2954. #define WM_BUTTON2DBLCLK                0x0076
  2955. #define WM_BUTTON3DOWN                  0x0077
  2956. #define WM_BUTTON3UP                    0x0078
  2957. #define WM_BUTTON3DBLCLK                0x0079
  2958. #define WM_BUTTONCLICKLAST              0x0079
  2959. #define WM_MOUSELAST                    0x0079
  2960.  
  2961. #define WM_CHAR                         0x007a
  2962. #define WM_VIOCHAR                      0x007b
  2963. #define WM_JOURNALNOTIFY                0x007c
  2964.  
  2965. #define WM_DDE_FIRST                    0x00a0
  2966. #define WM_DDE_INITIATE                 0x00a0
  2967. #define WM_DDE_REQUEST                  0x00a1
  2968. #define WM_DDE_ACK                      0x00a2
  2969. #define WM_DDE_DATA                     0x00a3
  2970. #define WM_DDE_ADVISE                   0x00a4
  2971. #define WM_DDE_UNADVISE                 0x00a5
  2972. #define WM_DDE_POKE                     0x00a6
  2973. #define WM_DDE_EXECUTE                  0x00a7
  2974. #define WM_DDE_TERMINATE                0x00a8
  2975. #define WM_DDE_INITIATEACK              0x00a9
  2976. #define WM_DDE_LAST                     0x00af
  2977.  
  2978. #define WM_DBCSFIRST                    0x00b0
  2979. #define WM_QUERYCONVERTPOS              0x00b0
  2980. #define WM_DBCSLAST                     0x00cf
  2981.  
  2982. #define WM_EXTMOUSEFIRST                0x0410
  2983. #define WM_CHORD                        0x0410
  2984. #define WM_BUTTON1MOTIONSTART           0x0411
  2985. #define WM_BUTTON1MOTIONEND             0x0412
  2986. #define WM_BUTTON1CLICK                 0x0413
  2987. #define WM_BUTTON2MOTIONSTART           0x0414
  2988. #define WM_BUTTON2MOTIONEND             0x0415
  2989. #define WM_BUTTON2CLICK                 0x0416
  2990. #define WM_BUTTON3MOTIONSTART           0x0417
  2991. #define WM_BUTTON3MOTIONEND             0x0418
  2992. #define WM_BUTTON3CLICK                 0x0419
  2993. #define WM_EXTMOUSELAST                 0x0419
  2994.  
  2995. #define WM_MOUSETRANSLATEFIRST          0x0420
  2996. #define WM_BEGINDRAG                    0x0420
  2997. #define WM_ENDDRAG                      0x0421
  2998. #define WM_SINGLESELECT                 0x0422
  2999. #define WM_OPEN                         0x0423
  3000. #define WM_CONTEXTMENU                  0x0424
  3001. #define WM_CONTEXTHELP                  0x0425
  3002. #define WM_TEXTEDIT                     0x0426
  3003. #define WM_BEGINSELECT                  0x0427
  3004. #define WM_ENDSELECT                    0x0428
  3005. #define WM_MOUSETRANSLATELAST           0x0428
  3006.  
  3007. #define WM_HELPBASE                     0x0f00
  3008. #define WM_HELPTOP                      0x0fff
  3009.  
  3010. #define WM_USER                         0x1000
  3011.  
  3012. #define BM_CLICK                        0x0120
  3013. #define BM_QUERYCHECKINDEX              0x0121
  3014. #define BM_QUERYHILITE                  0x0122
  3015. #define BM_SETHILITE                    0x0123
  3016. #define BM_QUERYCHECK                   0x0124
  3017. #define BM_SETCHECK                     0x0125
  3018. #define BM_SETDEFAULT                   0x0126
  3019.  
  3020. #define SBM_SETSCROLLBAR                0x01a0
  3021. #define SBM_SETPOS                      0x01a1
  3022. #define SBM_QUERYPOS                    0x01a2
  3023. #define SBM_QUERYRANGE                  0x01a3
  3024. #define SBM_SETTHUMBSIZE                0x01a6
  3025.  
  3026. #define TBM_SETHILITE                   0x01e3
  3027. #define TBM_QUERYHILITE                 0x01e4
  3028.  
  3029. #define BN_CLICKED                      1
  3030. #define BN_DBLCLICKED                   2
  3031. #define BN_PAINT                        3
  3032.  
  3033. #define SB_LINEUP                       1
  3034. #define SB_LINEDOWN                     2
  3035. #define SB_LINELEFT                     1
  3036. #define SB_LINERIGHT                    2
  3037. #define SB_PAGEUP                       3
  3038. #define SB_PAGEDOWN                     4
  3039. #define SB_PAGELEFT                     3
  3040. #define SB_PAGERIGHT                    4
  3041. #define SB_SLIDERTRACK                  5
  3042. #define SB_SLIDERPOSITION               6
  3043. #define SB_ENDSCROLL                    7
  3044.  
  3045. #define PM_NOREMOVE                     0x0000
  3046. #define PM_REMOVE                       0x0001
  3047.  
  3048. #define WC_FRAME                        ((PSZ)0xffff0001)
  3049. #define WC_COMBOBOX                     ((PSZ)0xffff0002)
  3050. #define WC_BUTTON                       ((PSZ)0xffff0003)
  3051. #define WC_MENU                         ((PSZ)0xffff0004)
  3052. #define WC_STATIC                       ((PSZ)0xffff0005)
  3053. #define WC_ENTRYFIELD                   ((PSZ)0xffff0006)
  3054. #define WC_LISTBOX                      ((PSZ)0xffff0007)
  3055. #define WC_SCROLLBAR                    ((PSZ)0xffff0008)
  3056. #define WC_TITLEBAR                     ((PSZ)0xffff0009)
  3057. #define WC_MLE                          ((PSZ)0xffff000a)
  3058. #define WC_APPSTAT                      ((PSZ)0xffff0010)
  3059. #define WC_KBDSTAT                      ((PSZ)0xffff0011)
  3060. #define WC_PECIC                        ((PSZ)0xffff0012)
  3061. #define WC_DBE_KKPOPUP                  ((PSZ)0xffff0013)
  3062. #define WC_SPINBUTTON                   ((PSZ)0xffff0020)
  3063. #define WC_CONTAINER                    ((PSZ)0xffff0025)
  3064. #define WC_SLIDER                       ((PSZ)0xffff0026)
  3065. #define WC_VALUESET                     ((PSZ)0xffff0027)
  3066. #define WC_NOTEBOOK                     ((PSZ)0xffff0028)
  3067.  
  3068. #define WS_VISIBLE                      0x80000000
  3069. #define WS_DISABLED                     0x40000000
  3070. #define WS_CLIPCHILDREN                 0x20000000
  3071. #define WS_CLIPSIBLINGS                 0x10000000
  3072. #define WS_PARENTCLIP                   0x08000000
  3073. #define WS_SAVEBITS                     0x04000000
  3074. #define WS_SYNCPAINT                    0x02000000
  3075. #define WS_MINIMIZED                    0x01000000
  3076. #define WS_MAXIMIZED                    0x00800000
  3077. #define WS_ANIMATE                      0x00400000
  3078. #define WS_GROUP                        0x00010000
  3079. #define WS_TABSTOP                      0x00020000
  3080. #define WS_MULTISELECT                  0x00040000
  3081.  
  3082. #define CS_MOVENOTIFY                   0x00000001
  3083. #define CS_SIZEREDRAW                   0x00000004
  3084. #define CS_HITTEST                      0x00000008
  3085. #define CS_PUBLIC                       0x00000010
  3086. #define CS_FRAME                        0x00000020
  3087. #define CS_CLIPCHILDREN                 0x20000000
  3088. #define CS_CLIPSIBLINGS                 0x10000000
  3089. #define CS_PARENTCLIP                   0x08000000
  3090. #define CS_SAVEBITS                     0x04000000
  3091. #define CS_SYNCPAINT                    0x02000000
  3092.  
  3093. #define FCF_TITLEBAR                    0x00000001
  3094. #define FCF_SYSMENU                     0x00000002
  3095. #define FCF_MENU                        0x00000004
  3096. #define FCF_SIZEBORDER                  0x00000008
  3097. #define FCF_MINBUTTON                   0x00000010
  3098. #define FCF_MAXBUTTON                   0x00000020
  3099. #define FCF_MINMAX                      (FCF_MINBUTTON|FCF_MAXBUTTON)
  3100. #define FCF_VERTSCROLL                  0x00000040
  3101. #define FCF_HORZSCROLL                  0x00000080
  3102. #define FCF_DLGBORDER                   0x00000100
  3103. #define FCF_BORDER                      0x00000200
  3104. #define FCF_SHELLPOSITION               0x00000400
  3105. #define FCF_TASKLIST                    0x00000800
  3106. #define FCF_NOBYTEALIGN                 0x00001000
  3107. #define FCF_NOMOVEWITHOWNER             0x00002000
  3108. #define FCF_ICON                        0x00004000
  3109. #define FCF_ACCELTABLE                  0x00008000
  3110. #define FCF_SYSMODAL                    0x00010000
  3111. #define FCF_SCREENALIGN                 0x00020000
  3112. #define FCF_MOUSEALIGN                  0x00040000
  3113. #define FCF_PALETTE_NORMAL              0x00080000
  3114. #define FCF_PALETTE_HELP                0x00100000
  3115. #define FCF_PALETTE_POPUPODD            0x00200000
  3116. #define FCF_PALETTE_POPUPEVEN           0x00400000
  3117. #define FCF_HIDEBUTTON                  0x01000000
  3118. #define FCF_HIDEMAX                     0x01000020
  3119. #define FCF_AUTOICON                    0x40000000
  3120. #define FCF_DBE_APPSTAT                 0x80000000
  3121.  
  3122. #define FCF_STANDARD                    0x0000cc3f
  3123.  
  3124. #define FS_ICON                         0x00000001
  3125. #define FS_ACCELTABLE                   0x00000002
  3126. #define FS_SHELLPOSITION                0x00000004
  3127. #define FS_TASKLIST                     0x00000008
  3128. #define FS_NOBYTEALIGN                  0x00000010
  3129. #define FS_NOMOVEWITHOWNER              0x00000020
  3130. #define FS_SYSMODAL                     0x00000040
  3131. #define FS_DLGBORDER                    0x00000080
  3132. #define FS_BORDER                       0x00000100
  3133. #define FS_SCREENALIGN                  0x00000200
  3134. #define FS_MOUSEALIGN                   0x00000400
  3135. #define FS_SIZEBORDER                   0x00000800
  3136. #define FS_AUTOICON                     0x00001000
  3137. #define FS_DBE_APPSTAT                  0x00008000
  3138.  
  3139. #define FS_STANDARD                     0x0000000f
  3140.  
  3141. #define FF_FLASHWINDOW                  0x0001
  3142. #define FF_ACTIVE                       0x0002
  3143. #define FF_FLASHHILITE                  0x0004
  3144. #define FF_OWNERHIDDEN                  0x0008
  3145. #define FF_DLGDISMISSED                 0x0010
  3146. #define FF_OWNERDISABLED                0x0020
  3147. #define FF_SELECTED                     0x0040
  3148. #define FF_NOACTIVATESWP                0x0080
  3149.  
  3150. #define FI_FRAME                        0x00000001
  3151. #define FI_OWNERHIDE                    0x00000002
  3152. #define FI_ACTIVATEOK                   0x00000004
  3153. #define FI_NOMOVEWITHOWNER              0x00000008
  3154.  
  3155. #define FID_SYSMENU                     0x8002
  3156. #define FID_TITLEBAR                    0x8003
  3157. #define FID_MINMAX                      0x8004
  3158. #define FID_MENU                        0x8005
  3159. #define FID_VERTSCROLL                  0x8006
  3160. #define FID_HORZSCROLL                  0x8007
  3161. #define FID_CLIENT                      0x8008
  3162. #define FID_DBE_APPSTAT                 0x8010
  3163. #define FID_DBE_KBDSTAT                 0x8011
  3164. #define FID_DBE_PECIC                   0x8012
  3165. #define FID_DBE_KKPOPUP                 0x8013
  3166.  
  3167. #define SC_SIZE                         0x8000
  3168. #define SC_MOVE                         0x8001
  3169. #define SC_MINIMIZE                     0x8002
  3170. #define SC_MAXIMIZE                     0x8003
  3171. #define SC_CLOSE                        0x8004
  3172. #define SC_NEXT                         0x8005
  3173. #define SC_APPMENU                      0x8006
  3174. #define SC_SYSMENU                      0x8007
  3175. #define SC_RESTORE                      0x8008
  3176. #define SC_NEXTFRAME                    0x8009
  3177. #define SC_NEXTWINDOW                   0x8010
  3178. #define SC_TASKMANAGER                  0x8011
  3179. #define SC_HELPKEYS                     0x8012
  3180. #define SC_HELPINDEX                    0x8013
  3181. #define SC_HELPEXTENDED                 0x8014
  3182. #define SC_SWITCHPANELIDS               0x8015
  3183. #define SC_DBE_FIRST                    0x8018
  3184. #define SC_DBE_LAST                     0x801f
  3185. #define SC_BEGINDRAG                    0x8020
  3186. #define SC_ENDDRAG                      0x8021
  3187. #define SC_SELECT                       0x8022
  3188. #define SC_OPEN                         0x8023
  3189. #define SC_CONTEXTMENU                  0x8024
  3190. #define SC_CONTEXTHELP                  0x8025
  3191. #define SC_TEXTEDIT                     0x8026
  3192. #define SC_BEGINSELECT                  0x8027
  3193. #define SC_ENDSELECT                    0x8028
  3194. #define SC_WINDOW                       0x8029
  3195. #define SC_HIDE                         0x802a
  3196.  
  3197. #define DLGC_ENTRYFIELD                 0x0001
  3198. #define DLGC_BUTTON                     0x0002
  3199. #define DLGC_RADIOBUTTON                0x0004
  3200. #define DLGC_STATIC                     0x0008
  3201. #define DLGC_DEFAULT                    0x0010
  3202. #define DLGC_PUSHBUTTON                 0x0020
  3203. #define DLGC_CHECKBOX                   0x0040
  3204. #define DLGC_SCROLLBAR                  0x0080
  3205. #define DLGC_MENU                       0x0100
  3206. #define DLGC_TABONCLICK                 0x0200
  3207. #define DLGC_MLE                        0x0400
  3208.  
  3209. #define PSF_LOCKWINDOWUPDATE            0x0001
  3210. #define PSF_CLIPUPWARDS                 0x0002
  3211. #define PSF_CLIPDOWNWARDS               0x0004
  3212. #define PSF_CLIPSIBLINGS                0x0008
  3213. #define PSF_CLIPCHILDREN                0x0010
  3214. #define PSF_PARENTCLIP                  0x0020
  3215.  
  3216. #define SW_SCROLLCHILDREN               0x0001
  3217. #define SW_INVALIDATERGN                0x0002
  3218.  
  3219. #define PU_POSITIONONITEM               0x0001
  3220. #define PU_HCONSTRAIN                   0x0002
  3221. #define PU_VCONSTRAIN                   0x0004
  3222. #define PU_NONE                         0x0000
  3223. #define PU_MOUSEBUTTON1DOWN             0x0008
  3224. #define PU_MOUSEBUTTON2DOWN             0x0010
  3225. #define PU_MOUSEBUTTON3DOWN             0x0018
  3226. #define PU_SELECTITEM                   0x0020
  3227. #define PU_MOUSEBUTTON1                 0x0040
  3228. #define PU_MOUSEBUTTON2                 0x0080
  3229. #define PU_MOUSEBUTTON3                 0x0100
  3230. #define PU_KEYBOARD                     0x0200
  3231.  
  3232. #define QCP_CONVERT                     0x0001
  3233. #define QCP_NOCONVERT                   0x0000
  3234.  
  3235. #define SDT_DESTROY                     0x0001
  3236. #define SDT_NOBKGND                     0x0002
  3237. #define SDT_TILE                        0x0004
  3238. #define SDT_SCALE                       0x0008
  3239. #define SDT_PATTERN                     0x0010
  3240. #define SDT_CENTER                      0x0020
  3241. #define SDT_RETAIN                      0x0040
  3242. #define SDT_LOADFILE                    0x0080
  3243.  
  3244. #define ES_LEFT                         0x0000
  3245. #define ES_CENTER                       0x0001
  3246. #define ES_RIGHT                        0x0002
  3247. #define ES_AUTOSCROLL                   0x0004
  3248. #define ES_MARGIN                       0x0008
  3249. #define ES_AUTOTAB                      0x0010
  3250. #define ES_READONLY                     0x0020
  3251. #define ES_COMMAND                      0x0040
  3252. #define ES_UNREADABLE                   0x0080
  3253. #define ES_AUTOSIZE                     0x0200
  3254.  
  3255. #define ES_ANY                          0x0000
  3256. #define ES_SBCS                         0x1000
  3257. #define ES_DBCS                         0x2000
  3258. #define ES_MIXED                        0x3000
  3259.  
  3260. #define CBS_SIMPLE                      0x0001
  3261. #define CBS_DROPDOWN                    0x0002
  3262. #define CBS_DROPDOWNLIST                0x0004
  3263. #define CBS_COMPATIBLE                  0x0008
  3264.  
  3265. #define CBID_LIST                       0x029a
  3266. #define CBID_EDIT                       0x029b
  3267.  
  3268. #define CBM_SHOWLIST                    0x0170
  3269. #define CBM_HILITE                      0x0171
  3270. #define CBM_ISLISTSHOWING               0x0172
  3271.  
  3272. #define CBN_EFCHANGE                    1
  3273. #define CBN_EFSCROLL                    2
  3274. #define CBN_MEMERROR                    3
  3275. #define CBN_LBSELECT                    4
  3276. #define CBN_LBSCROLL                    5
  3277. #define CBN_SHOWLIST                    6
  3278. #define CBN_ENTER                       7
  3279.  
  3280. #define EM_QUERYCHANGED                 0x0140
  3281. #define EM_QUERYSEL                     0x0141
  3282. #define EM_SETSEL                       0x0142
  3283. #define EM_SETTEXTLIMIT                 0x0143
  3284. #define EM_CUT                          0x0144
  3285. #define EM_COPY                         0x0145
  3286. #define EM_CLEAR                        0x0146
  3287. #define EM_PASTE                        0x0147
  3288. #define EM_QUERYFIRSTCHAR               0x0148
  3289. #define EM_SETFIRSTCHAR                 0x0149
  3290. #define EM_QUERYREADONLY                0x014a
  3291. #define EM_SETREADONLY                  0x014b
  3292. #define EM_SETINSERTMODE                0x014c
  3293.  
  3294. #define EN_SETFOCUS                     0x0001
  3295. #define EN_KILLFOCUS                    0x0002
  3296. #define EN_CHANGE                       0x0004
  3297. #define EN_SCROLL                       0x0008
  3298. #define EN_MEMERROR                     0x0010
  3299. #define EN_OVERFLOW                     0x0020
  3300. #define EN_INSERTMODETOGGLE             0x0040
  3301.  
  3302. #define LS_MULTIPLESEL                  0x0001
  3303. #define LS_OWNERDRAW                    0x0002
  3304. #define LS_NOADJUSTPOS                  0x0004
  3305. #define LS_HORZSCROLL                   0x0008
  3306. #define LS_EXTENDEDSEL                  0x0010
  3307.  
  3308. #define LN_SELECT                       1
  3309. #define LN_SETFOCUS                     2
  3310. #define LN_KILLFOCUS                    3
  3311. #define LN_SCROLL                       4
  3312. #define LN_ENTER                        5
  3313.  
  3314. #define LM_QUERYITEMCOUNT               0x0160
  3315. #define LM_INSERTITEM                   0x0161
  3316. #define LM_SETTOPINDEX                  0x0162
  3317. #define LM_DELETEITEM                   0x0163
  3318. #define LM_SELECTITEM                   0x0164
  3319. #define LM_QUERYSELECTION               0x0165
  3320. #define LM_SETITEMTEXT                  0x0166
  3321. #define LM_QUERYITEMTEXTLENGTH          0x0167
  3322. #define LM_QUERYITEMTEXT                0x0168
  3323. #define LM_SETITEMHANDLE                0x0169
  3324. #define LM_QUERYITEMHANDLE              0x016a
  3325. #define LM_SEARCHSTRING                 0x016b
  3326. #define LM_SETITEMHEIGHT                0x016c
  3327. #define LM_QUERYTOPINDEX                0x016d
  3328. #define LM_DELETEALL                    0x016e
  3329.  
  3330. #define LIT_CURSOR                      (-4)
  3331. #define LIT_ERROR                       (-3)
  3332. #define LIT_MEMERROR                    (-2)
  3333. #define LIT_NONE                        (-1)
  3334. #define LIT_FIRST                       (-1)
  3335.  
  3336. #define LIT_END                         (-1)
  3337. #define LIT_SORTASCENDING               (-2)
  3338. #define LIT_SORTDESCENDING              (-3)
  3339.  
  3340. #define LSS_SUBSTRING                   0x0001
  3341. #define LSS_PREFIX                      0x0002
  3342. #define LSS_CASESENSITIVE               0x0004
  3343.  
  3344. #define BDS_HILITED                     0x0100
  3345. #define BDS_DISABLED                    0x0200
  3346. #define BDS_DEFAULT                     0x0400
  3347.  
  3348. #define MB_OK                           0x0000
  3349. #define MB_OKCANCEL                     0x0001
  3350. #define MB_RETRYCANCEL                  0x0002
  3351. #define MB_ABORTRETRYIGNORE             0x0003
  3352. #define MB_YESNO                        0x0004
  3353. #define MB_YESNOCANCEL                  0x0005
  3354. #define MB_CANCEL                       0x0006
  3355. #define MB_ENTER                        0x0007
  3356. #define MB_ENTERCANCEL                  0x0008
  3357.  
  3358. #define MB_NOICON                       0x0000
  3359. #define MB_CUANOTIFICATION              0x0000
  3360. #define MB_ICONQUESTION                 0x0010
  3361. #define MB_ICONEXCLAMATION              0x0020
  3362. #define MB_CUAWARNING                   0x0020
  3363. #define MB_ICONASTERISK                 0x0030
  3364. #define MB_ICONHAND                     0x0040
  3365. #define MB_CUACRITICAL                  0x0040
  3366. #define MB_QUERY                        MB_ICONQUESTION
  3367. #define MB_WARNING                      MB_CUAWARNING
  3368. #define MB_INFORMATION                  MB_ICONASTERISK
  3369. #define MB_CRITICAL                     MB_CUACRITICAL
  3370. #define MB_ERROR                        MB_CRITICAL
  3371.  
  3372. #define MB_DEFBUTTON1                   0x0000
  3373. #define MB_DEFBUTTON2                   0x0100
  3374. #define MB_DEFBUTTON3                   0x0200
  3375.  
  3376. #define MB_APPLMODAL                    0x0000
  3377. #define MB_SYSTEMMODAL                  0x1000
  3378. #define MB_HELP                         0x2000
  3379. #define MB_MOVEABLE                     0x4000
  3380.  
  3381. #define MBID_OK                         1
  3382. #define MBID_CANCEL                     2
  3383. #define MBID_ABORT                      3
  3384. #define MBID_RETRY                      4
  3385. #define MBID_IGNORE                     5
  3386. #define MBID_YES                        6
  3387. #define MBID_NO                         7
  3388. #define MBID_HELP                       8
  3389. #define MBID_ENTER                      9
  3390. #define MBID_ERROR                      0xffff
  3391.  
  3392. #define MS_ACTIONBAR                    0x0001
  3393. #define MS_TITLEBUTTON                  0x0002
  3394. #define MS_VERTICALFLIP                 0x0004
  3395. #define MS_CONDITIONALCASCADE           0x0040
  3396.  
  3397. #define MM_INSERTITEM                   0x0180
  3398. #define MM_DELETEITEM                   0x0181
  3399. #define MM_QUERYITEM                    0x0182
  3400. #define MM_SETITEM                      0x0183
  3401. #define MM_QUERYITEMCOUNT               0x0184
  3402. #define MM_STARTMENUMODE                0x0185
  3403. #define MM_ENDMENUMODE                  0x0186
  3404. #define MM_REMOVEITEM                   0x0188
  3405. #define MM_SELECTITEM                   0x0189
  3406. #define MM_QUERYSELITEMID               0x018a
  3407. #define MM_QUERYITEMTEXT                0x018b
  3408. #define MM_QUERYITEMTEXTLENGTH          0x018c
  3409. #define MM_SETITEMHANDLE                0x018d
  3410. #define MM_SETITEMTEXT                  0x018e
  3411. #define MM_ITEMPOSITIONFROMID           0x018f
  3412. #define MM_ITEMIDFROMPOSITION           0x0190
  3413. #define MM_QUERYITEMATTR                0x0191
  3414. #define MM_SETITEMATTR                  0x0192
  3415. #define MM_ISITEMVALID                  0x0193
  3416. #define MM_QUERYITEMRECT                0x0194
  3417.  
  3418. #define MM_QUERYDEFAULTITEMID           0x0431
  3419. #define MM_SETDEFAULTITEMID             0x0432
  3420.  
  3421. #define MIT_END                         (-1)
  3422. #define MIT_NONE                        (-1)
  3423. #define MIT_MEMERROR                    (-1)
  3424. #define MIT_ERROR                       (-1)
  3425. #define MIT_FIRST                       (-2)
  3426. #define MIT_LAST                        (-3)
  3427.  
  3428. #define MID_NONE                        (-1)
  3429. #define MID_ERROR                       (-1)
  3430.  
  3431. #define MIA_NODISMISS                   0x0020
  3432. #define MIA_FRAMED                      0x1000
  3433. #define MIA_CHECKED                     0x2000
  3434. #define MIA_DISABLED                    0x4000
  3435. #define MIA_HILITED                     0x8000
  3436.  
  3437. #define MIS_TEXT                        0x0001
  3438. #define MIS_BITMAP                      0x0002
  3439. #define MIS_SEPARATOR                   0x0004
  3440. #define MIS_OWNERDRAW                   0x0008
  3441. #define MIS_SUBMENU                     0x0010
  3442. #define MIS_MULTMENU                    0x0020
  3443. #define MIS_SYSCOMMAND                  0x0040
  3444. #define MIS_HELP                        0x0080
  3445. #define MIS_STATIC                      0x0100
  3446. #define MIS_BUTTONSEPARATOR             0x0200
  3447. #define MIS_BREAK                       0x0400
  3448. #define MIS_BREAKSEPARATOR              0x0800
  3449. #define MIS_GROUP                       0x1000
  3450. #define MIS_SINGLE                      0x2000
  3451.  
  3452. #define SBS_HORZ                        0
  3453. #define SBS_VERT                        1
  3454. #define SBS_THUMBSIZE                   2
  3455. #define SBS_AUTOTRACK                   4
  3456. #define SBS_AUTOSIZE                    0x2000
  3457.  
  3458. #define HT_NORMAL                       0
  3459. #define HT_TRANSPARENT                  (-1)
  3460. #define HT_DISCARD                      (-2)
  3461. #define HT_ERROR                        (-3)
  3462.  
  3463. #define DID_OK                          1
  3464. #define DID_CANCEL                      2
  3465. #define DID_ERROR                       0xffff
  3466.  
  3467. #define CVR_ALIGNLEFT                   0x0001
  3468. #define CVR_ALIGNBOTTOM                 0x0002
  3469. #define CVR_ALIGNRIGHT                  0x0004
  3470. #define CVR_ALIGNTOP                    0x0008
  3471. #define CVR_REDRAW                      0x0010
  3472.  
  3473. #define RUM_IN                          1
  3474. #define RUM_OUT                         2
  3475. #define RUM_INOUT                       3
  3476.  
  3477. #define SMD_DELAYED                     0x0001
  3478. #define SMD_IMMEDIATE                   0x0002
  3479.  
  3480. #define SSM_SYNCHRONOUS                 0x0001
  3481. #define SSM_ASYNCHRONOUS                0x0002
  3482. #define SSM_MIXED                       0x0003
  3483.  
  3484. #define JRN_QUEUESTATUS                 0x0001
  3485. #define JRN_PHYSKEYSTATE                0x0002
  3486.  
  3487. #define DB_PATCOPY                      0x0000
  3488. #define DB_PATINVERT                    0x0001
  3489. #define DB_DESTINVERT                   0x0002
  3490. #define DB_AREAMIXMODE                  0x0003
  3491.  
  3492. #define DB_ROP                          0x0007
  3493. #define DB_INTERIOR                     0x0008
  3494. #define DB_AREAATTRS                    0x0010
  3495. #define DB_STANDARD                     0x0100
  3496. #define DB_DLGBORDER                    0x0200
  3497.  
  3498. #define DBM_NORMAL                      0x0000
  3499. #define DBM_INVERT                      0x0001
  3500. #define DBM_HALFTONE                    0x0002
  3501. #define DBM_STRETCH                     0x0004
  3502. #define DBM_IMAGEATTRS                  0x0008
  3503.  
  3504. #define BMSG_POST                       0x0000
  3505. #define BMSG_SEND                       0x0001
  3506. #define BMSG_POSTQUEUE                  0x0002
  3507. #define BMSG_DESCENDANTS                0x0004
  3508. #define BMSG_FRAMEONLY                  0x0008
  3509.  
  3510. #define SMIM_ALL                        0x0eff
  3511. #define SMI_NOINTEREST                  0x0001
  3512. #define SMI_INTEREST                    0x0002
  3513. #define SMI_RESET                       0x0004
  3514. #define SMI_AUTODISPATCH                0x0008
  3515.  
  3516. #define WPM_TEXT                        0x0001
  3517. #define WPM_CTLDATA                     0x0002
  3518. #define WPM_PRESPARAMS                  0x0004
  3519. #define WPM_CCHTEXT                     0x0008
  3520. #define WPM_CBCTLDATA                   0x0010
  3521. #define WPM_CBPRESPARAMS                0x0020
  3522.  
  3523. #define QS_KEY                          0x0001
  3524. #define QS_MOUSEBUTTON                  0x0002
  3525. #define QS_MOUSEMOVE                    0x0004
  3526. #define QS_MOUSE                        0x0006
  3527. #define QS_TIMER                        0x0008
  3528. #define QS_PAINT                        0x0010
  3529. #define QS_POSTMSG                      0x0020
  3530. #define QS_SEM1                         0x0040
  3531. #define QS_SEM2                         0x0080
  3532. #define QS_SEM3                         0x0100
  3533. #define QS_SEM4                         0x0200
  3534. #define QS_SENDMSG                      0x0400
  3535.  
  3536. #define CBD_BITS                        0
  3537. #define CBD_COMPRESSION                 1
  3538. #define CBD_DECOMPRESSION               2
  3539.  
  3540. #define CBD_COLOR_CONVERSION            0x0001
  3541.  
  3542. #define BCA_UNCOMP                      0
  3543. #define BCA_RLE8                        1
  3544. #define BCA_RLE4                        2
  3545. #define BCA_HUFFMAN1D                   3
  3546. #define BCA_RLE24                       4
  3547.  
  3548. #define BRU_METRIC                      0
  3549.  
  3550. #define BRA_BOTTOMUP                    0
  3551.  
  3552. #define BRH_NOTHALFTONED                0
  3553. #define BRH_ERRORDIFFUSION              1
  3554. #define BRH_PANDA                       2
  3555. #define BRH_SUPERCIRCLE                 3
  3556.  
  3557. #define BCE_PALETTE                     (-1)
  3558. #define BCE_RGB                         0
  3559.  
  3560. #define BFT_ICON                        0x4349
  3561. #define BFT_BMAP                        0x4d42
  3562. #define BFT_POINTER                     0x5450
  3563. #define BFT_COLORICON                   0x4943
  3564. #define BFT_COLORPOINTER                0x5043
  3565. #define BFT_BITMAPARRAY                 0x4142
  3566.  
  3567. #define DT_LEFT                         0x0000
  3568. #define DT_QUERYEXTENT                  0x0002
  3569. #define DT_UNDERSCORE                   0x0010
  3570. #define DT_STRIKEOUT                    0x0020
  3571. #define DT_TEXTATTRS                    0x0040
  3572. #define DT_EXTERNALLEADING              0x0080
  3573. #define DT_CENTER                       0x0100
  3574. #define DT_RIGHT                        0x0200
  3575. #define DT_TOP                          0x0000
  3576. #define DT_VCENTER                      0x0400
  3577. #define DT_BOTTOM                       0x0800
  3578. #define DT_HALFTONE                     0x1000
  3579. #define DT_MNEMONIC                     0x2000
  3580. #define DT_WORDBREAK                    0x4000
  3581. #define DT_ERASERECT                    0x8000
  3582.  
  3583. #define QW_NEXT                         0
  3584. #define QW_PREV                         1
  3585. #define QW_TOP                          2
  3586. #define QW_BOTTOM                       3
  3587. #define QW_OWNER                        4
  3588. #define QW_PARENT                       5
  3589. #define QW_NEXTTOP                      6
  3590. #define QW_PREVTOP                      7
  3591. #define QW_FRAMEOWNER                   8
  3592.  
  3593. #define SWP_SIZE                        0x0001
  3594. #define SWP_MOVE                        0x0002
  3595. #define SWP_ZORDER                      0x0004
  3596. #define SWP_SHOW                        0x0008
  3597. #define SWP_HIDE                        0x0010
  3598. #define SWP_NOREDRAW                    0x0020
  3599. #define SWP_NOADJUST                    0x0040
  3600. #define SWP_ACTIVATE                    0x0080
  3601. #define SWP_DEACTIVATE                  0x0100
  3602. #define SWP_EXTSTATECHANGE              0x0200
  3603. #define SWP_MINIMIZE                    0x0400
  3604. #define SWP_MAXIMIZE                    0x0800
  3605. #define SWP_RESTORE                     0x1000
  3606. #define SWP_FOCUSACTIVATE               0x2000
  3607. #define SWP_FOCUSDEACTIVATE             0x4000
  3608. #define SWP_NOAUTOCLOSE                 0x8000
  3609.  
  3610. #define AWP_MINIMIZED                   0x00010000
  3611. #define AWP_MAXIMIZED                   0x00020000
  3612. #define AWP_RESTORED                    0x00040000
  3613. #define AWP_ACTIVATE                    0x00080000
  3614. #define AWP_DEACTIVATE                  0x00100000
  3615.  
  3616. #define CMDSRC_OTHER                    0
  3617. #define CMDSRC_PUSHBUTTON               1
  3618. #define CMDSRC_MENU                     2
  3619. #define CMDSRC_ACCELERATOR              3
  3620. #define CMDSRC_FONTDLG                  4
  3621. #define CMDSRC_FILEDLG                  5
  3622. #define CMDSRC_PRINTDLG                 6
  3623. #define CMDSRC_COLORDLG                 7
  3624.  
  3625. #define KC_NONE                         0x0000
  3626. #define KC_CHAR                         0x0001
  3627. #define KC_VIRTUALKEY                   0x0002
  3628. #define KC_SCANCODE                     0x0004
  3629. #define KC_SHIFT                        0x0008
  3630. #define KC_CTRL                         0x0010
  3631. #define KC_ALT                          0x0020
  3632. #define KC_KEYUP                        0x0040
  3633. #define KC_PREVDOWN                     0x0080
  3634. #define KC_LONEKEY                      0x0100
  3635. #define KC_DEADKEY                      0x0200
  3636. #define KC_COMPOSITE                    0x0400
  3637. #define KC_INVALIDCOMP                  0x0800
  3638. #define KC_TOGGLE                       0x1000
  3639. #define KC_INVALIDCHAR                  0x2000
  3640. #define KC_DBCSRSRVD1                   0x4000
  3641. #define KC_DBCSRSRVD2                   0x8000
  3642.  
  3643. #define VK_BUTTON1                      0x0001
  3644. #define VK_BUTTON2                      0x0002
  3645. #define VK_BUTTON3                      0x0003
  3646. #define VK_BREAK                        0x0004
  3647. #define VK_BACKSPACE                    0x0005
  3648. #define VK_TAB                          0x0006
  3649. #define VK_BACKTAB                      0x0007
  3650. #define VK_NEWLINE                      0x0008
  3651. #define VK_SHIFT                        0x0009
  3652. #define VK_CTRL                         0x000a
  3653. #define VK_ALT                          0x000b
  3654. #define VK_ALTGRAF                      0x000c
  3655. #define VK_PAUSE                        0x000d
  3656. #define VK_CAPSLOCK                     0x000e
  3657. #define VK_ESC                          0x000f
  3658. #define VK_SPACE                        0x0010
  3659. #define VK_PAGEUP                       0x0011
  3660. #define VK_PAGEDOWN                     0x0012
  3661. #define VK_END                          0x0013
  3662. #define VK_HOME                         0x0014
  3663. #define VK_LEFT                         0x0015
  3664. #define VK_UP                           0x0016
  3665. #define VK_RIGHT                        0x0017
  3666. #define VK_DOWN                         0x0018
  3667. #define VK_PRINTSCRN                    0x0019
  3668. #define VK_INSERT                       0x001a
  3669. #define VK_DELETE                       0x001b
  3670. #define VK_SCRLLOCK                     0x001c
  3671. #define VK_NUMLOCK                      0x001d
  3672. #define VK_ENTER                        0x001e
  3673. #define VK_SYSRQ                        0x001f
  3674. #define VK_F1                           0x0020
  3675. #define VK_F2                           0x0021
  3676. #define VK_F3                           0x0022
  3677. #define VK_F4                           0x0023
  3678. #define VK_F5                           0x0024
  3679. #define VK_F6                           0x0025
  3680. #define VK_F7                           0x0026
  3681. #define VK_F8                           0x0027
  3682. #define VK_F9                           0x0028
  3683. #define VK_F10                          0x0029
  3684. #define VK_F11                          0x002a
  3685. #define VK_F12                          0x002b
  3686. #define VK_F13                          0x002c
  3687. #define VK_F14                          0x002d
  3688. #define VK_F15                          0x002e
  3689. #define VK_F16                          0x002f
  3690. #define VK_F17                          0x0030
  3691. #define VK_F18                          0x0031
  3692. #define VK_F19                          0x0032
  3693. #define VK_F20                          0x0033
  3694. #define VK_F21                          0x0034
  3695. #define VK_F22                          0x0035
  3696. #define VK_F23                          0x0036
  3697. #define VK_F24                          0x0037
  3698. #define VK_ENDDRAG                      0x0038
  3699.  
  3700. #define VK_MENU                         VK_F10
  3701.  
  3702. #define VK_DBCSFIRST                    0x0080
  3703. #define VK_DBCSLAST                     0x00ff
  3704.  
  3705. #define VK_USERFIRST                    0x0100
  3706. #define VK_USERLAST                     0x01ff
  3707.  
  3708. #define INP_NONE                        0x0000
  3709. #define INP_KBD                         0x0001
  3710. #define INP_MULT                        0x0002
  3711. #define INP_RES2                        0x0004
  3712. #define INP_SHIFT                       0x0008
  3713. #define INP_CTRL                        0x0010
  3714. #define INP_ALT                         0x0020
  3715. #define INP_RES3                        0x0040
  3716. #define INP_RES4                        0x0080
  3717. #define INP_IGNORE                      0xffff
  3718.  
  3719. #define HWND_DESKTOP                    ((HWND)1)
  3720. #define HWND_OBJECT                     ((HWND)2)
  3721. #define HWND_TOP                        ((HWND)3)
  3722. #define HWND_BOTTOM                     ((HWND)4)
  3723. #define HWND_THREADCAPTURE              ((HWND)5)
  3724.  
  3725. #define FC_NOSETFOCUS                   0x0001
  3726. #define FC_NOBRINGTOTOP                 0x0001 /*!*/
  3727. #define FC_NOLOSEFOCUS                  0x0002
  3728. #define FC_NOBRINGTOPFIRSTWINDOW        0x0002 /*!*/
  3729. #define FC_NOSETACTIVE                  0x0004
  3730. #define FC_NOLOSEACTIVE                 0x0008
  3731. #define FC_NOSETSELECTION               0x0010
  3732. #define FC_NOLOSESELECTION              0x0020
  3733.  
  3734. #define AF_CHAR                         0x0001
  3735. #define AF_VIRTUALKEY                   0x0002
  3736. #define AF_SCANCODE                     0x0004
  3737. #define AF_SHIFT                        0x0008
  3738. #define AF_CONTROL                      0x0010
  3739. #define AF_ALT                          0x0020
  3740. #define AF_LONEKEY                      0x0040
  3741. #define AF_SYSCOMMAND                   0x0100
  3742. #define AF_HELP                         0x0200
  3743.  
  3744. #define EAF_DEFAULTOWNER                0x0001
  3745. #define EAF_UNCHANGEABLE                0x0002
  3746. #define EAF_REUSEICON                   0x0004
  3747.  
  3748. #define TF_LEFT                         0x0001
  3749. #define TF_TOP                          0x0002
  3750. #define TF_RIGHT                        0x0004
  3751. #define TF_BOTTOM                       0x0008
  3752. #define TF_SETPOINTERPOS                0x0010
  3753. #define TF_GRID                         0x0020
  3754. #define TF_STANDARD                     0x0040
  3755. #define TF_ALLINBOUNDARY                0x0080
  3756. #define TF_VALIDATETRACKRECT            0x0100
  3757. #define TF_PARTINBOUNDARY               0x0200
  3758.  
  3759. #define TF_MOVE                         0x000f
  3760.  
  3761. #define QFC_NEXTINCHAIN                 0x0001
  3762. #define QFC_ACTIVE                      0x0002
  3763. #define QFC_FRAME                       0x0003
  3764. #define QFC_SELECTACTIVE                0x0004
  3765. #define QFC_PARTOFCHAIN                 0x0005
  3766.  
  3767. #define QPF_NOINHERIT                   0x0001
  3768. #define QPF_ID1COLORINDEX               0x0002
  3769. #define QPF_ID2COLORINDEX               0x0004
  3770. #define QPF_PURERGBCOLOR                0x0008
  3771. #define QPF_VALIDFLAGS                  0x000f
  3772.  
  3773. #define QV_OS2                          0x0000
  3774. #define QV_CMS                          0x0001
  3775. #define QV_TSO                          0x0002
  3776. #define QV_TSOBATCH                     0x0003
  3777. #define QV_OS400                        0x0004
  3778.  
  3779. #define QWS_USER                        0
  3780. #define QWS_ID                          (-1)
  3781. #define QWS_MIN                         (-1)
  3782.  
  3783. #define QWL_USER                        0
  3784. #define QWL_STYLE                       (-2)
  3785. #define QWP_PFNWP                       (-3)
  3786. #define QWL_HMQ                         (-4)
  3787. #define QWL_RESERVED                    (-5)
  3788. #define QWL_MIN                         (-6)
  3789.  
  3790. #define QWL_HHEAP                       0x0004
  3791. #define QWL_HWNDFOCUSSAVE               0x0018
  3792. #define QWL_DEFBUTTON                   0x0040
  3793. #define QWL_PSSCBLK                     0x0048
  3794. #define QWL_PFEPBLK                     0x004c
  3795. #define QWL_PSTATBLK                    0x0050
  3796.  
  3797. #define QWS_FLAGS                       0x0008
  3798. #define QWS_RESULT                      0x000a
  3799. #define QWS_XRESTORE                    0x000c
  3800. #define QWS_YRESTORE                    0x000e
  3801. #define QWS_CXRESTORE                   0x0010
  3802. #define QWS_CYRESTORE                   0x0012
  3803. #define QWS_XMINIMIZE                   0x0014
  3804. #define QWS_YMINIMIZE                   0x0016
  3805.  
  3806. #define SV_SWAPBUTTON                   0
  3807. #define SV_DBLCLKTIME                   1
  3808. #define SV_CXDBLCLK                     2
  3809. #define SV_CYDBLCLK                     3
  3810. #define SV_CXSIZEBORDER                 4
  3811. #define SV_CYSIZEBORDER                 5
  3812. #define SV_ALARM                        6
  3813. #define SV_CURSORRATE                   9
  3814. #define SV_FIRSTSCROLLRATE              10
  3815. #define SV_SCROLLRATE                   11
  3816. #define SV_NUMBEREDLISTS                12
  3817. #define SV_WARNINGFREQ                  13
  3818. #define SV_NOTEFREQ                     14
  3819. #define SV_ERRORFREQ                    15
  3820. #define SV_WARNINGDURATION              16
  3821. #define SV_NOTEDURATION                 17
  3822. #define SV_ERRORDURATION                18
  3823. #define SV_CXSCREEN                     20
  3824. #define SV_CYSCREEN                     21
  3825. #define SV_CXVSCROLL                    22
  3826. #define SV_CYHSCROLL                    23
  3827. #define SV_CYVSCROLLARROW               24
  3828. #define SV_CXHSCROLLARROW               25
  3829. #define SV_CXBORDER                     26
  3830. #define SV_CYBORDER                     27
  3831. #define SV_CXDLGFRAME                   28
  3832. #define SV_CYDLGFRAME                   29
  3833. #define SV_CYTITLEBAR                   30
  3834. #define SV_CYVSLIDER                    31
  3835. #define SV_CXHSLIDER                    32
  3836. #define SV_CXMINMAXBUTTON               33
  3837. #define SV_CYMINMAXBUTTON               34
  3838. #define SV_CYMENU                       35
  3839. #define SV_CXFULLSCREEN                 36
  3840. #define SV_CYFULLSCREEN                 37
  3841. #define SV_CXICON                       38
  3842. #define SV_CYICON                       39
  3843. #define SV_CXPOINTER                    40
  3844. #define SV_CYPOINTER                    41
  3845. #define SV_DEBUG                        42
  3846. #define SV_CMOUSEBUTTONS                43
  3847. #define SV_CPOINTERBUTTONS              43
  3848. #define SV_POINTERLEVEL                 44
  3849. #define SV_CURSORLEVEL                  45
  3850. #define SV_TRACKRECTLEVEL               46
  3851. #define SV_CTIMERS                      47
  3852. #define SV_MOUSEPRESENT                 48
  3853. #define SV_CXBYTEALIGN                  49
  3854. #define SV_CXALIGN                      49
  3855. #define SV_CYBYTEALIGN                  50
  3856. #define SV_CYALIGN                      50
  3857. #define SV_EXTRAKEYBEEP                 57
  3858. #define SV_SETLIGHTS                    58
  3859. #define SV_INSERTMODE                   59
  3860. #define SV_MENUROLLDOWNDELAY            64
  3861. #define SV_MENUROLLUPDELAY              65
  3862. #define SV_ALTMNEMONIC                  66
  3863. #define SV_TASKLISTMOUSEACCESS          67
  3864. #define SV_CXICONTEXTWIDTH              68
  3865. #define SV_CICONTEXTLINES               69
  3866. #define SV_CHORDTIME                    70
  3867. #define SV_CXCHORD                      71
  3868. #define SV_CYCHORD                      72
  3869. #define SV_CXMOTION                     73
  3870. #define SV_CYMOTION                     74
  3871. #define SV_BEGINDRAG                    75
  3872. #define SV_ENDDRAG                      76
  3873. #define SV_SINGLESELECT                 77
  3874. #define SV_OPEN                         78
  3875. #define SV_CONTEXTMENU                  79
  3876. #define SV_CONTEXTHELP                  80
  3877. #define SV_TEXTEDIT                     81
  3878. #define SV_BEGINSELECT                  82
  3879. #define SV_ENDSELECT                    83
  3880. #define SV_BEGINDRAGKB                  84
  3881. #define SV_ENDDRAGKB                    85
  3882. #define SV_SELECTKB                     86
  3883. #define SV_OPENKB                       87
  3884. #define SV_CONTEXTMENUKB                88
  3885. #define SV_CONTEXTHELPKB                89
  3886. #define SV_TEXTEDITKB                   90
  3887. #define SV_BEGINSELECTKB                91
  3888. #define SV_ENDSELECTKB                  92
  3889. #define SV_ANIMATION                    93
  3890. #define SV_ANIMATIONSPEED               94
  3891. #define SV_MONOICONS                    95
  3892. #define SV_KBDALTERED                   96
  3893. #define SV_PRINTSCREEN                  97
  3894. #define SV_CSYSVALUES                   98
  3895.  
  3896. #define SYSCLR_SHADOWHILITEBGND         (-50)
  3897. #define SYSCLR_SHADOWHILITEFGND         (-49)
  3898. #define SYSCLR_SHADOWTEXT               (-48)
  3899. #define SYSCLR_ENTRYFIELD               (-47)
  3900. #define SYSCLR_MENUDISABLEDTEXT         (-46)
  3901. #define SYSCLR_MENUHILITE               (-45)
  3902. #define SYSCLR_MENUHILITEBGND           (-44)
  3903. #define SYSCLR_PAGEBACKGROUND           (-43)
  3904. #define SYSCLR_FIELDBACKGROUND          (-42)
  3905. #define SYSCLR_BUTTONLIGHT              (-41)
  3906. #define SYSCLR_BUTTONMIDDLE             (-40)
  3907. #define SYSCLR_BUTTONDARK               (-39)
  3908. #define SYSCLR_BUTTONDEFAULT            (-38)
  3909. #define SYSCLR_TITLEBOTTOM              (-37)
  3910. #define SYSCLR_SHADOW                   (-36)
  3911. #define SYSCLR_ICONTEXT                 (-35)
  3912. #define SYSCLR_DIALOGBACKGROUND         (-34)
  3913. #define SYSCLR_HILITEFOREGROUND         (-33)
  3914. #define SYSCLR_HILITEBACKGROUND         (-32)
  3915. #define SYSCLR_INACTIVETITLETEXTBGND    (-31)
  3916. #define SYSCLR_ACTIVETITLETEXTBGND      (-30)
  3917. #define SYSCLR_INACTIVETITLETEXT        (-29)
  3918. #define SYSCLR_ACTIVETITLETEXT          (-28)
  3919. #define SYSCLR_OUTPUTTEXT               (-27)
  3920. #define SYSCLR_WINDOWSTATICTEXT         (-26)
  3921. #define SYSCLR_SCROLLBAR                (-25)
  3922. #define SYSCLR_BACKGROUND               (-24)
  3923. #define SYSCLR_ACTIVETITLE              (-23)
  3924. #define SYSCLR_INACTIVETITLE            (-22)
  3925. #define SYSCLR_MENU                     (-21)
  3926. #define SYSCLR_WINDOW                   (-20)
  3927. #define SYSCLR_WINDOWFRAME              (-19)
  3928. #define SYSCLR_MENUTEXT                 (-18)
  3929. #define SYSCLR_WINDOWTEXT               (-17)
  3930. #define SYSCLR_TITLETEXT                (-16)
  3931. #define SYSCLR_ACTIVEBORDER             (-15)
  3932. #define SYSCLR_INACTIVEBORDER           (-14)
  3933. #define SYSCLR_APPWORKSPACE             (-13)
  3934. #define SYSCLR_HELPBACKGROUND           (-12)
  3935. #define SYSCLR_HELPTEXT                 (-11)
  3936. #define SYSCLR_HELPHILITE               (-10)
  3937.  
  3938. #define SYSCLR_CSYSCOLORS               41
  3939.  
  3940. #define TID_CURSOR                      0xffff
  3941. #define TID_SCROLL                      0xfffe
  3942. #define TID_FLASHWINDOW                 0xfffd
  3943. #define TID_USERMAX                     0x7fff
  3944.  
  3945. #define WA_WARNING                      0
  3946. #define WA_NOTE                         1
  3947. #define WA_ERROR                        2
  3948. #define WA_CWINALARMS                   3
  3949.  
  3950. #define EDI_FIRSTTABITEM                0
  3951. #define EDI_LASTTABITEM                 1
  3952. #define EDI_NEXTTABITEM                 2
  3953. #define EDI_PREVTABITEM                 3
  3954. #define EDI_FIRSTGROUPITEM              4
  3955. #define EDI_LASTGROUPITEM               5
  3956. #define EDI_NEXTGROUPITEM               6
  3957. #define EDI_PREVGROUPITEM               7
  3958.  
  3959. #define SS_TEXT                         0x0001
  3960. #define SS_GROUPBOX                     0x0002
  3961. #define SS_ICON                         0x0003
  3962. #define SS_BITMAP                       0x0004
  3963. #define SS_FGNDRECT                     0x0005
  3964. #define SS_HALFTONERECT                 0x0006
  3965. #define SS_BKGNDRECT                    0x0007
  3966. #define SS_FGNDFRAME                    0x0008
  3967. #define SS_HALFTONEFRAME                0x0009
  3968. #define SS_BKGNDFRAME                   0x000a
  3969. #define SS_SYSICON                      0x000b
  3970. #define SS_AUTOSIZE                     0x0040
  3971.  
  3972. #define SM_SETHANDLE                    0x0100
  3973. #define SM_QUERYHANDLE                  0x0101
  3974.  
  3975. #define BS_PUSHBUTTON                   0
  3976. #define BS_CHECKBOX                     1
  3977. #define BS_AUTOCHECKBOX                 2
  3978. #define BS_RADIOBUTTON                  3
  3979. #define BS_AUTORADIOBUTTON              4
  3980. #define BS_3STATE                       5
  3981. #define BS_AUTO3STATE                   6
  3982. #define BS_USERBUTTON                   7
  3983.  
  3984. #define BS_PRIMARYSTYLES                0x000f
  3985. #define BS_BITMAP                       0x0040
  3986. #define BS_ICON                         0x0080
  3987. #define BS_HELP                         0x0100
  3988. #define BS_SYSCOMMAND                   0x0200
  3989. #define BS_DEFAULT                      0x0400
  3990. #define BS_NOPOINTERFOCUS               0x0800
  3991. #define BS_NOBORDER                     0x1000
  3992. #define BS_NOCURSORSELECT               0x2000
  3993. #define BS_AUTOSIZE                     0x4000
  3994.  
  3995. #define WCS_ERROR                       0
  3996. #define WCS_EQ                          1
  3997. #define WCS_LT                          2
  3998. #define WCS_GT                          3
  3999.  
  4000. #define PP_FOREGROUNDCOLOR              1
  4001. #define PP_FOREGROUNDCOLORINDEX         2
  4002. #define PP_BACKGROUNDCOLOR              3
  4003. #define PP_BACKGROUNDCOLORINDEX         4
  4004. #define PP_HILITEFOREGROUNDCOLOR        5
  4005. #define PP_HILITEFOREGROUNDCOLORINDEX   6
  4006. #define PP_HILITEBACKGROUNDCOLOR        7
  4007. #define PP_HILITEBACKGROUNDCOLORINDEX   8
  4008. #define PP_DISABLEDFOREGROUNDCOLOR      9
  4009. #define PP_DISABLEDFOREGROUNDCOLORINDEX 10
  4010. #define PP_DISABLEDBACKGROUNDCOLOR      11
  4011. #define PP_DISABLEDBACKGROUNDCOLORINDEX 12
  4012. #define PP_BORDERCOLOR                  13
  4013. #define PP_BORDERCOLORINDEX             14
  4014. #define PP_FONTNAMESIZE                 15
  4015. #define PP_FONTHANDLE                   16
  4016. #define PP_RESERVED                     17
  4017. #define PP_ACTIVECOLOR                  18
  4018. #define PP_ACTIVECOLORINDEX             19
  4019. #define PP_INACTIVECOLOR                20
  4020. #define PP_INACTIVECOLORINDEX           21
  4021. #define PP_ACTIVETEXTFGNDCOLOR          22
  4022. #define PP_ACTIVETEXTFGNDCOLORINDEX     23
  4023. #define PP_ACTIVETEXTBGNDCOLOR          24
  4024. #define PP_ACTIVETEXTBGNDCOLORINDEX     25
  4025. #define PP_INACTIVETEXTFGNDCOLOR        26
  4026. #define PP_INACTIVETEXTFGNDCOLORINDEX   27
  4027. #define PP_INACTIVETEXTBGNDCOLOR        28
  4028. #define PP_INACTIVETEXTBGNDCOLORINDEX   29
  4029. #define PP_SHADOW                       30
  4030. #define PP_MENUFOREGROUNDCOLOR          31
  4031. #define PP_MENUFOREGROUNDCOLORINDEX     32
  4032. #define PP_MENUBACKGROUNDCOLOR          33
  4033. #define PP_MENUBACKGROUNDCOLORINDEX     34
  4034. #define PP_MENUHILITEFGNDCOLOR          35
  4035. #define PP_MENUHILITEFGNDCOLORINDEX     36
  4036. #define PP_MENUHILITEBGNDCOLOR          37
  4037. #define PP_MENUHILITEBGNDCOLORINDEX     38
  4038. #define PP_MENUDISABLEDFGNDCOLOR        39
  4039. #define PP_MENUDISABLEDFGNDCOLORINDEX   40
  4040. #define PP_MENUDISABLEDBGNDCOLOR        41
  4041. #define PP_MENUDISABLEDBGNDCOLORINDEX   42
  4042. #define PP_USER                         0x8000
  4043.  
  4044. #define DTYP_USER                       16384
  4045.  
  4046. #define DTYP_CTL_ARRAY                  1
  4047. #define DTYP_CTL_PARRAY                 (-1)
  4048. #define DTYP_CTL_OFFSET                 2
  4049. #define DTYP_CTL_LENGTH                 3
  4050.  
  4051. #define DTYP_ACCEL                      28
  4052. #define DTYP_ACCELTABLE                 29
  4053. #define DTYP_ARCPARAMS                  38
  4054. #define DTYP_AREABUNDLE                 139
  4055. #define DTYP_ATOM                       90
  4056. #define DTYP_BITMAPINFO                 60
  4057. #define DTYP_BITMAPINFOHEADER           61
  4058. #define DTYP_BITMAPINFO2                170
  4059. #define DTYP_BITMAPINFOHEADER2          171
  4060. #define DTYP_BIT16                      20
  4061. #define DTYP_BIT32                      21
  4062. #define DTYP_BIT8                       19
  4063. #define DTYP_BOOL                       18
  4064. #define DTYP_BTNCDATA                   35
  4065. #define DTYP_BYTE                       13
  4066. #define DTYP_CATCHBUF                   141
  4067. #define DTYP_CHAR                       15
  4068. #define DTYP_CHARBUNDLE                 135
  4069. #define DTYP_CLASSINFO                  95
  4070. #define DTYP_COUNT2                     93
  4071. #define DTYP_COUNT2B                    70
  4072. #define DTYP_COUNT2CH                   82
  4073. #define DTYP_COUNT4                     152
  4074. #define DTYP_COUNT4B                    42
  4075. #define DTYP_CPID                       57
  4076. #define DTYP_CREATESTRUCT               98
  4077. #define DTYP_CURSORINFO                 34
  4078. #define DTYP_DEVOPENSTRUC               124
  4079. #define DTYP_DLGTEMPLATE                96
  4080. #define DTYP_DLGTITEM                   97
  4081. #define DTYP_ENTRYFDATA                 127
  4082. #define DTYP_ERRORID                    45
  4083. #define DTYP_FATTRS                     75
  4084. #define DTYP_FFDESCS                    142
  4085. #define DTYP_FIXED                      99
  4086. #define DTYP_FONTMETRICS                74
  4087. #define DTYP_FRAMECDATA                 144
  4088. #define DTYP_GRADIENTL                  48
  4089. #define DTYP_HAB                        10
  4090. #define DTYP_HACCEL                     30
  4091. #define DTYP_HAPP                       146
  4092. #define DTYP_HATOMTBL                   91
  4093. #define DTYP_HBITMAP                    62
  4094. #define DTYP_HCINFO                     46
  4095. #define DTYP_HDC                        132
  4096. #define DTYP_HENUM                      117
  4097. #define DTYP_HHEAP                      109
  4098. #define DTYP_HINI                       53
  4099. #define DTYP_HLIB                       147
  4100. #define DTYP_HMF                        85
  4101. #define DTYP_HMQ                        86
  4102. #define DTYP_HPOINTER                   106
  4103. #define DTYP_HPROGRAM                   131
  4104. #define DTYP_HPS                        12
  4105. #define DTYP_HRGN                       116
  4106. #define DTYP_HSEM                       140
  4107. #define DTYP_HSPL                       32
  4108. #define DTYP_HSWITCH                    66
  4109. #define DTYP_HVPS                       58
  4110. #define DTYP_HWND                       11
  4111. #define DTYP_IDENTITY                   133
  4112. #define DTYP_IDENTITY4                  169
  4113. #define DTYP_IMAGEBUNDLE                136
  4114. #define DTYP_INDEX2                     81
  4115. #define DTYP_IPT                        155
  4116. #define DTYP_KERNINGPAIRS               118
  4117. #define DTYP_LENGTH2                    68
  4118. #define DTYP_LENGTH4                    69
  4119. #define DTYP_LINEBUNDLE                 137
  4120. #define DTYP_LONG                       25
  4121. #define DTYP_MARKERBUNDLE               138
  4122. #define DTYP_MATRIXLF                   113
  4123. #define DTYP_MLECTLDATA                 161
  4124. #define DTYP_MLEMARGSTRUCT              157
  4125. #define DTYP_MLEOVERFLOW                158
  4126. #define DTYP_OFFSET2B                   112
  4127. #define DTYP_OWNERITEM                  154
  4128. #define DTYP_PID                        92
  4129. #define DTYP_PIX                        156
  4130. #define DTYP_POINTERINFO                105
  4131. #define DTYP_POINTL                     77
  4132. #define DTYP_PROGCATEGORY               129
  4133. #define DTYP_PROGRAMENTRY               128
  4134. #define DTYP_PROGTYPE                   130
  4135. #define DTYP_PROPERTY2                  88
  4136. #define DTYP_PROPERTY4                  89
  4137. #define DTYP_QMSG                       87
  4138. #define DTYP_RECTL                      121
  4139. #define DTYP_RESID                      125
  4140. #define DTYP_RGB                        111
  4141. #define DTYP_RGNRECT                    115
  4142. #define DTYP_SBCDATA                    159
  4143. #define DTYP_SEGOFF                     126
  4144. #define DTYP_SHORT                      23
  4145. #define DTYP_SIZEF                      101
  4146. #define DTYP_SIZEL                      102
  4147. #define DTYP_STRL                       17
  4148. #define DTYP_STR16                      40
  4149. #define DTYP_STR32                      37
  4150. #define DTYP_STR64                      47
  4151. #define DTYP_STR8                       33
  4152. #define DTYP_SWBLOCK                    63
  4153. #define DTYP_SWCNTRL                    64
  4154. #define DTYP_SWENTRY                    65
  4155. #define DTYP_SWP                        31
  4156. #define DTYP_TID                        104
  4157. #define DTYP_TIME                       107
  4158. #define DTYP_TRACKINFO                  73
  4159. #define DTYP_UCHAR                      22
  4160. #define DTYP_ULONG                      26
  4161. #define DTYP_USERBUTTON                 36
  4162. #define DTYP_USHORT                     24
  4163. #define DTYP_WIDTH4                     108
  4164. #define DTYP_WNDPARAMS                  83
  4165. #define DTYP_WNDPROC                    84
  4166. #define DTYP_WPOINT                     59
  4167. #define DTYP_WRECT                      55
  4168. #define DTYP_XYWINSIZE                  52
  4169.  
  4170. #define DTYP_PACCEL                     (-28)
  4171. #define DTYP_PACCELTABLE                (-29)
  4172. #define DTYP_PARCPARAMS                 (-38)
  4173. #define DTYP_PAREABUNDLE                (-139)
  4174. #define DTYP_PATOM                      (-90)
  4175. #define DTYP_PBITMAPINFO                (-60)
  4176. #define DTYP_PBITMAPINFOHEADER          (-61)
  4177. #define DTYP_PBITMAPINFO2               (-170)
  4178. #define DTYP_PBITMAPINFOHEADER2         (-171)
  4179. #define DTYP_PBIT16                     (-20)
  4180. #define DTYP_PBIT32                     (-21)
  4181. #define DTYP_PBIT8                      (-19)
  4182. #define DTYP_PBOOL                      (-18)
  4183. #define DTYP_PBTNCDATA                  (-35)
  4184. #define DTYP_PBYTE                      (-13)
  4185. #define DTYP_PCATCHBUF                  (-141)
  4186. #define DTYP_PCHAR                      (-15)
  4187. #define DTYP_PCHARBUNDLE                (-135)
  4188. #define DTYP_PCLASSINFO                 (-95)
  4189. #define DTYP_PCOUNT2                    (-93)
  4190. #define DTYP_PCOUNT2B                   (-70)
  4191. #define DTYP_PCOUNT2CH                  (-82)
  4192. #define DTYP_PCOUNT4                    (-152)
  4193. #define DTYP_PCOUNT4B                   (-42)
  4194. #define DTYP_PCPID                      (-57)
  4195. #define DTYP_PCREATESTRUCT              (-98)
  4196. #define DTYP_PCURSORINFO                (-34)
  4197. #define DTYP_PDEVOPENSTRUC              (-124)
  4198. #define DTYP_PDLGTEMPLATE               (-96)
  4199. #define DTYP_PDLGTITEM                  (-97)
  4200. #define DTYP_PENTRYFDATA                (-127)
  4201. #define DTYP_PERRORID                   (-45)
  4202. #define DTYP_PFATTRS                    (-75)
  4203. #define DTYP_PFFDESCS                   (-142)
  4204. #define DTYP_PFIXED                     (-99)
  4205. #define DTYP_PFONTMETRICS               (-74)
  4206. #define DTYP_PFRAMECDATA                (-144)
  4207. #define DTYP_PGRADIENTL                 (-48)
  4208. #define DTYP_PHAB                       (-10)
  4209. #define DTYP_PHACCEL                    (-30)
  4210. #define DTYP_PHAPP                      (-146)
  4211. #define DTYP_PHATOMTBL                  (-91)
  4212. #define DTYP_PHBITMAP                   (-62)
  4213. #define DTYP_PHCINFO                    (-46)
  4214. #define DTYP_PHDC                       (-132)
  4215. #define DTYP_PHENUM                     (-117)
  4216. #define DTYP_PHHEAP                     (-109)
  4217. #define DTYP_PHINI                      (-53)
  4218. #define DTYP_PHLIB                      (-147)
  4219. #define DTYP_PHMF                       (-85)
  4220. #define DTYP_PHMQ                       (-86)
  4221. #define DTYP_PHPOINTER                  (-106)
  4222. #define DTYP_PHPROGRAM                  (-131)
  4223. #define DTYP_PHPS                       (-12)
  4224. #define DTYP_PHRGN                      (-116)
  4225. #define DTYP_PHSEM                      (-140)
  4226. #define DTYP_PHSPL                      (-32)
  4227. #define DTYP_PHSWITCH                   (-66)
  4228. #define DTYP_PHVPS                      (-58)
  4229. #define DTYP_PHWND                      (-11)
  4230. #define DTYP_PIDENTITY                  (-133)
  4231. #define DTYP_PIDENTITY4                 (-169)
  4232. #define DTYP_PIMAGEBUNDLE               (-136)
  4233. #define DTYP_PINDEX2                    (-81)
  4234. #define DTYP_PIPT                       (-155)
  4235. #define DTYP_PKERNINGPAIRS              (-118)
  4236. #define DTYP_PLENGTH2                   (-68)
  4237. #define DTYP_PLENGTH4                   (-69)
  4238. #define DTYP_PLINEBUNDLE                (-137)
  4239. #define DTYP_PLONG                      (-25)
  4240. #define DTYP_PMARKERBUNDLE              (-138)
  4241. #define DTYP_PMATRIXLF                  (-113)
  4242. #define DTYP_PMLECTLDATA                (-161)
  4243. #define DTYP_PMLEMARGSTRUCT             (-157)
  4244. #define DTYP_PMLEOVERFLOW               (-158)
  4245. #define DTYP_POFFSET2B                  (-112)
  4246. #define DTYP_POWNERITEM                 (-154)
  4247. #define DTYP_PPID                       (-92)
  4248. #define DTYP_PPIX                       (-156)
  4249. #define DTYP_PPOINTERINFO               (-105)
  4250. #define DTYP_PPOINTL                    (-77)
  4251. #define DTYP_PPROGCATEGORY              (-129)
  4252. #define DTYP_PPROGRAMENTRY              (-128)
  4253. #define DTYP_PPROGTYPE                  (-130)
  4254. #define DTYP_PPROPERTY2                 (-88)
  4255. #define DTYP_PPROPERTY4                 (-89)
  4256. #define DTYP_PQMSG                      (-87)
  4257. #define DTYP_PRECTL                     (-121)
  4258. #define DTYP_PRESID                     (-125)
  4259. #define DTYP_PRGB                       (-111)
  4260. #define DTYP_PRGNRECT                   (-115)
  4261. #define DTYP_PSBCDATA                   (-159)
  4262. #define DTYP_PSEGOFF                    (-126)
  4263. #define DTYP_PSHORT                     (-23)
  4264. #define DTYP_PSIZEF                     (-101)
  4265. #define DTYP_PSIZEL                     (-102)
  4266. #define DTYP_PSTRL                      (-17)
  4267. #define DTYP_PSTR16                     (-40)
  4268. #define DTYP_PSTR32                     (-37)
  4269. #define DTYP_PSTR64                     (-47)
  4270. #define DTYP_PSTR8                      (-33)
  4271. #define DTYP_PSWBLOCK                   (-63)
  4272. #define DTYP_PSWCNTRL                   (-64)
  4273. #define DTYP_PSWENTRY                   (-65)
  4274. #define DTYP_PSWP                       (-31)
  4275. #define DTYP_PTID                       (-104)
  4276. #define DTYP_PTIME                      (-107)
  4277. #define DTYP_PTRACKINFO                 (-73)
  4278. #define DTYP_PUCHAR                     (-22)
  4279. #define DTYP_PULONG                     (-26)
  4280. #define DTYP_PUSERBUTTON                (-36)
  4281. #define DTYP_PUSHORT                    (-24)
  4282. #define DTYP_PWIDTH4                    (-108)
  4283. #define DTYP_PWNDPARAMS                 (-83)
  4284. #define DTYP_PWNDPROC                   (-84)
  4285. #define DTYP_PWPOINT                    (-59)
  4286. #define DTYP_PWRECT                     (-55)
  4287. #define DTYP_PXYWINSIZE                 (-52)
  4288.  
  4289. #define HK_SENDMSG                      0
  4290. #define HK_INPUT                        1
  4291. #define HK_MSGFILTER                    2
  4292. #define HK_JOURNALRECORD                3
  4293. #define HK_JOURNALPLAYBACK              4
  4294. #define HK_HELP                         5
  4295. #define HK_LOADER                       6
  4296. #define HK_REGISTERUSERMSG              7
  4297. #define HK_MSGCONTROL                   8
  4298. #define HK_PLIST_ENTRY                  9
  4299. #define HK_PLIST_EXIT                   10
  4300. #define HK_FINDWORD                     11
  4301. #define HK_CODEPAGECHANGED              12
  4302. #define HK_WINDOWDC                     15
  4303. #define HK_DESTROYWINDOW                16
  4304. #define HK_CHECKMSGFILTER               20
  4305. #define HK_FLUSHBUF                     24
  4306.  
  4307. #define MSGF_DIALOGBOX                  1
  4308. #define MSGF_MESSAGEBOX                 2
  4309. #define MSGF_DDEPOSTMSG                 3
  4310. #define MSGF_TRACK                      8
  4311.  
  4312. #define HLPM_FRAME                      (-1)
  4313. #define HLPM_WINDOW                     (-2)
  4314. #define HLPM_MENU                       (-3)
  4315.  
  4316. #define PM_MODEL_1X                     0
  4317. #define PM_MODEL_2X                     1
  4318.  
  4319. #define LHK_DELETEPROC                  1
  4320. #define LHK_DELETELIB                   2
  4321. #define LHK_LOADPROC                    3
  4322. #define LHK_LOADLIB                     4
  4323.  
  4324. #define MCHK_MSGINTEREST                1
  4325. #define MCHK_CLASSMSGINTEREST           2
  4326. #define MCHK_SYNCHRONISATION            3
  4327. #define MCHK_MSGMODE                    4
  4328.  
  4329. #define RUMHK_DATATYPE                  1
  4330. #define RUMHK_MSG                       2
  4331.  
  4332. #define SPTR_ARROW                      1
  4333. #define SPTR_TEXT                       2
  4334. #define SPTR_WAIT                       3
  4335. #define SPTR_SIZE                       4
  4336. #define SPTR_MOVE                       5
  4337. #define SPTR_SIZENWSE                   6
  4338. #define SPTR_SIZENESW                   7
  4339. #define SPTR_SIZEWE                     8
  4340. #define SPTR_SIZENS                     9
  4341. #define SPTR_APPICON                    10
  4342. #define SPTR_ICONINFORMATION            11
  4343. #define SPTR_ICONQUESTION               12
  4344. #define SPTR_ICONERROR                  13
  4345. #define SPTR_ICONWARNING                14
  4346. #define SPTR_CPTR                       14
  4347. #define SPTR_ILLEGAL                    18
  4348. #define SPTR_FILE                       19
  4349. #define SPTR_FOLDER                     20
  4350. #define SPTR_MULTFILE                   21
  4351. #define SPTR_PROGRAM                    22
  4352.  
  4353. #define SPTR_HANDICON                   SPTR_ICONERROR
  4354. #define SPTR_QUESICON                   SPTR_ICONQUESTION
  4355. #define SPTR_BANGICON                   SPTR_ICONWARNING
  4356. #define SPTR_NOTEICON                   SPTR_ICONINFORMATION
  4357.  
  4358. #define DP_NORMAL                       0x0000
  4359. #define DP_HALFTONED                    0x0001
  4360. #define DP_INVERTED                     0x0002
  4361.  
  4362. #define SBMP_OLD_SYSMENU                1
  4363. #define SBMP_OLD_SBUPARROW              2
  4364. #define SBMP_OLD_SBDNARROW              3
  4365. #define SBMP_OLD_SBRGARROW              4
  4366. #define SBMP_OLD_SBLFARROW              5
  4367. #define SBMP_MENUCHECK                  6
  4368. #define SBMP_OLD_CHECKBOXES             7
  4369. #define SBMP_BTNCORNERS                 8
  4370. #define SBMP_OLD_MINBUTTON              9
  4371. #define SBMP_OLD_MAXBUTTON              10
  4372. #define SBMP_OLD_RESTOREBUTTON          11
  4373. #define SBMP_OLD_CHILDSYSMENU           12
  4374. #define SBMP_DRIVE                      15
  4375. #define SBMP_FILE                       16
  4376. #define SBMP_FOLDER                     17
  4377. #define SBMP_TREEPLUS                   18
  4378. #define SBMP_TREEMINUS                  19
  4379. #define SBMP_PROGRAM                    22
  4380. #define SBMP_MENUATTACHED               23
  4381. #define SBMP_SIZEBOX                    24
  4382. #define SBMP_SYSMENU                    25
  4383. #define SBMP_MINBUTTON                  26
  4384. #define SBMP_MAXBUTTON                  27
  4385. #define SBMP_RESTOREBUTTON              28
  4386. #define SBMP_CHILDSYSMENU               29
  4387. #define SBMP_SYSMENUDEP                 30
  4388. #define SBMP_MINBUTTONDEP               31
  4389. #define SBMP_MAXBUTTONDEP               32
  4390. #define SBMP_RESTOREBUTTONDEP           33
  4391. #define SBMP_CHILDSYSMENUDEP            34
  4392. #define SBMP_SBUPARROW                  35
  4393. #define SBMP_SBDNARROW                  36
  4394. #define SBMP_SBLFARROW                  37
  4395. #define SBMP_SBRGARROW                  38
  4396. #define SBMP_SBUPARROWDEP               39
  4397. #define SBMP_SBDNARROWDEP               40
  4398. #define SBMP_SBLFARROWDEP               41
  4399. #define SBMP_SBRGARROWDEP               42
  4400. #define SBMP_SBUPARROWDIS               43
  4401. #define SBMP_SBDNARROWDIS               44
  4402. #define SBMP_SBLFARROWDIS               45
  4403. #define SBMP_SBRGARROWDIS               46
  4404. #define SBMP_COMBODOWN                  47
  4405. #define SBMP_CHECKBOXES                 48
  4406.  
  4407. #define CURSOR_SOLID                    0x0000
  4408. #define CURSOR_HALFTONE                 0x0001
  4409. #define CURSOR_FRAME                    0x0002
  4410. #define CURSOR_FLASH                    0x0004
  4411. #define CURSOR_SETPOS                   0x8000
  4412.  
  4413. #define CF_TEXT                         1
  4414. #define CF_BITMAP                       2
  4415. #define CF_DSPTEXT                      3
  4416. #define CF_DSPBITMAP                    4
  4417. #define CF_METAFILE                     5
  4418. #define CF_DSPMETAFILE                  6
  4419. #define CF_PALETTE                      9
  4420.  
  4421. #define CFI_OWNERFREE                   0x0001
  4422. #define CFI_OWNERDISPLAY                0x0002
  4423. #define CFI_HANDLE                      0x0200
  4424. #define CFI_POINTER                     0x0400
  4425.  
  4426. #define SZFMT_TEXT                      "#1"
  4427. #define SZFMT_BITMAP                    "#2"
  4428. #define SZFMT_DSPTEXT                   "#3"
  4429. #define SZFMT_DSPBITMAP                 "#4"
  4430. #define SZFMT_METAFILE                  "#5"
  4431. #define SZFMT_DSPMETAFILE               "#6"
  4432. #define SZFMT_PALETTE                   "#9"
  4433. #define SZFMT_SYLK                      "Sylk"
  4434. #define SZFMT_DIF                       "Dif"
  4435. #define SZFMT_TIFF                      "Tiff"
  4436. #define SZFMT_OEMTEXT                   "OemText"
  4437. #define SZFMT_DIB                       "Dib"
  4438. #define SZFMT_OWNERDISPLAY              "OwnerDisplay"
  4439. #define SZFMT_LINK                      "Link"
  4440. #define SZFMT_METAFILEPICT              "MetaFilePict"
  4441. #define SZFMT_DSPMETAFILEPICT           "DspMetaFilePict"
  4442. #define SZFMT_CPTEXT                    "Codepage Text"
  4443.  
  4444. #define SZDDEFMT_RTF                    "Rich Text Format"
  4445. #define SZDDEFMT_PTRPICT                "Printer_Picture"
  4446.  
  4447. #define SZDDESYS_TOPIC                  "System"
  4448. #define SZDDESYS_ITEM_TOPICS            "Topics"
  4449. #define SZDDESYS_ITEM_SYSITEMS          "SysItems"
  4450. #define SZDDESYS_ITEM_RTNMSG            "ReturnMessage"
  4451. #define SZDDESYS_ITEM_STATUS            "Status"
  4452. #define SZDDESYS_ITEM_FORMATS           "Formats"
  4453. #define SZDDESYS_ITEM_SECURITY          "Security"
  4454. #define SZDDESYS_ITEM_ITEMFORMATS       "ItemFormats"
  4455. #define SZDDESYS_ITEM_HELP              "Help"
  4456. #define SZDDESYS_ITEM_PROTOCOLS         "Protocols"
  4457. #define SZDDESYS_ITEM_RESTART           "Restart"
  4458.  
  4459. #define DDECTXT_CASESENSITIVE           0x0001
  4460.  
  4461. #define DDE_FACK                        0x0001
  4462. #define DDE_FBUSY                       0x0002
  4463. #define DDE_FNODATA                     0x0004
  4464. #define DDE_FACKREQ                     0x0008
  4465. #define DDE_FRESPONSE                   0x0010
  4466. #define DDE_NOTPROCESSED                0x0020
  4467. #define DDE_FRESERVED                   0x00c0
  4468. #define DDE_FAPPSTATUS                  0xff00
  4469.  
  4470. #define DDEFMT_TEXT                     0x0001
  4471.  
  4472. #define DDEPM_RETRY                     0x0001
  4473. #define DDEPM_NOFREE                    0x0002
  4474.  
  4475. #define STR_DLLNAME                     "keyremap"
  4476.  
  4477. #define PMERR_OK                        0x0000
  4478. #define PMERR_INVALID_HWND              0x1001
  4479. #define PMERR_INVALID_HMQ               0x1002
  4480. #define PMERR_PARAMETER_OUT_OF_RANGE    0x1003
  4481. #define PMERR_WINDOW_LOCK_UNDERFLOW     0x1004
  4482. #define PMERR_WINDOW_LOCK_OVERFLOW      0x1005
  4483. #define PMERR_BAD_WINDOW_LOCK_COUNT     0x1006
  4484. #define PMERR_WINDOW_NOT_LOCKED         0x1007
  4485. #define PMERR_INVALID_SELECTOR          0x1008
  4486. #define PMERR_CALL_FROM_WRONG_THREAD    0x1009
  4487. #define PMERR_RESOURCE_NOT_FOUND        0x100a
  4488. #define PMERR_INVALID_STRING_PARM       0x100b
  4489. #define PMERR_INVALID_HHEAP             0x100c
  4490. #define PMERR_INVALID_HEAP_POINTER      0x100d
  4491. #define PMERR_INVALID_HEAP_SIZE_PARM    0x100e
  4492. #define PMERR_INVALID_HEAP_SIZE         0x100f
  4493. #define PMERR_INVALID_HEAP_SIZE_WORD    0x1010
  4494. #define PMERR_HEAP_OUT_OF_MEMORY        0x1011
  4495. #define PMERR_HEAP_MAX_SIZE_REACHED     0x1012
  4496. #define PMERR_INVALID_HATOMTBL          0x1013
  4497. #define PMERR_INVALID_ATOM              0x1014
  4498. #define PMERR_INVALID_ATOM_NAME         0x1015
  4499. #define PMERR_INVALID_INTEGER_ATOM      0x1016
  4500. #define PMERR_ATOM_NAME_NOT_FOUND       0x1017
  4501. #define PMERR_QUEUE_TOO_LARGE           0x1018
  4502. #define PMERR_INVALID_FLAG              0x1019
  4503. #define PMERR_INVALID_HACCEL            0x101a
  4504. #define PMERR_INVALID_HPTR              0x101b
  4505. #define PMERR_INVALID_HENUM             0x101c
  4506. #define PMERR_INVALID_SRC_CODEPAGE      0x101d
  4507. #define PMERR_INVALID_DST_CODEPAGE      0x101e
  4508. #define PMERR_UNKNOWN_COMPONENT_ID      0x101f
  4509. #define PMERR_UNKNOWN_ERROR_CODE        0x1020
  4510. #define PMERR_SEVERITY_LEVELS           0x1021
  4511. #define PMERR_INVALID_RESOURCE_FORMAT   0x1034
  4512. #define PMERR_NO_MSG_QUEUE              0x1036
  4513. #define PMERR_WIN_DEBUGMSG              0x1037
  4514. #define PMERR_QUEUE_FULL                0x1038
  4515. #define PMERR_LIBRARY_LOAD_FAILED       0x1039
  4516. #define PMERR_PROCEDURE_LOAD_FAILED     0x103a
  4517. #define PMERR_LIBRARY_DELETE_FAILED     0x103b
  4518. #define PMERR_PROCEDURE_DELETE_FAILED   0x103c
  4519. #define PMERR_ARRAY_TOO_LARGE           0x103d
  4520. #define PMERR_ARRAY_TOO_SMALL           0x103e
  4521. #define PMERR_DATATYPE_ENTRY_BAD_INDEX  0x103f
  4522. #define PMERR_DATATYPE_ENTRY_CTL_BAD    0x1040
  4523. #define PMERR_DATATYPE_ENTRY_CTL_MISS   0x1041
  4524. #define PMERR_DATATYPE_ENTRY_INVALID    0x1042
  4525. #define PMERR_DATATYPE_ENTRY_NOT_NUM    0x1043
  4526. #define PMERR_DATATYPE_ENTRY_NOT_OFF    0x1044
  4527. #define PMERR_DATATYPE_INVALID          0x1045
  4528. #define PMERR_DATATYPE_NOT_UNIQUE       0x1046
  4529. #define PMERR_DATATYPE_TOO_LONG         0x1047
  4530. #define PMERR_DATATYPE_TOO_SMALL        0x1048
  4531. #define PMERR_DIRECTION_INVALID         0x1049
  4532. #define PMERR_INVALID_HAB               0x104a
  4533. #define PMERR_INVALID_HSTRUCT           0x104d
  4534. #define PMERR_LENGTH_TOO_SMALL          0x104e
  4535. #define PMERR_MSGID_TOO_SMALL           0x104f
  4536. #define PMERR_NO_HANDLE_ALLOC           0x1050
  4537. #define PMERR_NOT_IN_A_PM_SESSION       0x1051
  4538. #define PMERR_MSG_QUEUE_ALREADY_EXISTS  0x1052
  4539. #define PMERR_OLD_RESOURCE              0x1055
  4540. #define PMERR_INVALID_PIB               0x1101
  4541. #define PMERR_INSUFF_SPACE_TO_ADD       0x1102
  4542. #define PMERR_INVALID_GROUP_HANDLE      0x1103
  4543. #define PMERR_DUPLICATE_TITLE           0x1104
  4544. #define PMERR_INVALID_TITLE             0x1105
  4545. #define PMERR_HANDLE_NOT_IN_GROUP       0x1107
  4546. #define PMERR_INVALID_TARGET_HANDLE     0x1106
  4547. #define PMERR_INVALID_PATH_STATEMENT    0x1108
  4548. #define PMERR_NO_PROGRAM_FOUND          0x1109
  4549. #define PMERR_INVALID_BUFFER_SIZE       0x110a
  4550. #define PMERR_BUFFER_TOO_SMALL          0x110b
  4551. #define PMERR_PL_INITIALISATION_FAIL    0x110c
  4552. #define PMERR_CANT_DESTROY_SYS_GROUP    0x110d
  4553. #define PMERR_INVALID_TYPE_CHANGE       0x110e
  4554. #define PMERR_INVALID_PROGRAM_HANDLE    0x110f
  4555. #define PMERR_NOT_CURRENT_PL_VERSION    0x1110
  4556. #define PMERR_INVALID_CIRCULAR_REF      0x1111
  4557. #define PMERR_MEMORY_ALLOCATION_ERR     0x1112
  4558. #define PMERR_MEMORY_DEALLOCATION_ERR   0x1113
  4559. #define PMERR_TASK_HEADER_TOO_BIG       0x1114
  4560. #define PMERR_INVALID_INI_FILE_HANDLE   0x1115
  4561. #define PMERR_MEMORY_SHARE              0x1116
  4562. #define PMERR_OPEN_QUEUE                0x1117
  4563. #define PMERR_CREATE_QUEUE              0x1118
  4564. #define PMERR_WRITE_QUEUE               0x1119
  4565. #define PMERR_READ_QUEUE                0x111a
  4566. #define PMERR_CALL_NOT_EXECUTED         0x111b
  4567. #define PMERR_UNKNOWN_APIPKT            0x111c
  4568. #define PMERR_INITHREAD_EXISTS          0x111d
  4569. #define PMERR_CREATE_THREAD             0x111e
  4570. #define PMERR_NO_HK_PROFILE_INSTALLED   0x111f
  4571. #define PMERR_INVALID_DIRECTORY         0x1120
  4572. #define PMERR_WILDCARD_IN_FILENAME      0x1121
  4573. #define PMERR_FILENAME_BUFFER_FULL      0x1122
  4574. #define PMERR_FILENAME_TOO_LONG         0x1123
  4575. #define PMERR_INI_FILE_IS_SYS_OR_USER   0x1124
  4576. #define PMERR_BROADCAST_PLMSG           0x1125
  4577. #define PMERR_190_INIT_DONE             0x1126
  4578. #define PMERR_HMOD_FOR_PMSHAPI          0x1127
  4579. #define PMERR_SET_HK_PROFILE            0x1128
  4580. #define PMERR_API_NOT_ALLOWED           0x1129
  4581. #define PMERR_INI_STILL_OPEN            0x112a
  4582. #define PMERR_PROGDETAILS_NOT_IN_INI    0x112b
  4583. #define PMERR_PIBSTRUCT_NOT_IN_INI      0x112c
  4584. #define PMERR_INVALID_DISKPROGDETAILS   0x112d
  4585. #define PMERR_PROGDETAILS_READ_FAILURE  0x112e
  4586. #define PMERR_PROGDETAILS_WRITE_FAILURE 0x112f
  4587. #define PMERR_PROGDETAILS_QSIZE_FAILURE 0x1130
  4588. #define PMERR_INVALID_PROGDETAILS       0x1131
  4589. #define PMERR_SHEPROFILEHOOK_NOT_FOUND  0x1132
  4590. #define PMERR_190PLCONVERTED            0x1133
  4591. #define PMERR_FAILED_TO_CONVERT_INI_PL  0x1134
  4592. #define PMERR_PMSHAPI_NOT_INITIALISED   0x1135
  4593. #define PMERR_INVALID_SHELL_API_HOOK_ID 0x1136
  4594. #define PMERR_DOS_ERROR                 0x1200
  4595. #define PMERR_NO_SPACE                  0x1201
  4596. #define PMERR_INVALID_SWITCH_HANDLE     0x1202
  4597. #define PMERR_NO_HANDLE                 0x1203
  4598. #define PMERR_INVALID_PROCESS_ID        0x1204
  4599. #define PMERR_NOT_SHELL                 0x1205
  4600. #define PMERR_INVALID_WINDOW            0x1206
  4601. #define PMERR_INVALID_POST_MSG          0x1207
  4602. #define PMERR_INVALID_PARAMETERS        0x1208
  4603. #define PMERR_INVALID_PROGRAM_TYPE      0x1209
  4604. #define PMERR_NOT_EXTENDED_FOCUS        0x120a
  4605. #define PMERR_INVALID_SESSION_ID        0x120b
  4606. #define PMERR_SMG_INVALID_ICON_FILE     0x120c
  4607. #define PMERR_SMG_ICON_NOT_CREATED      0x120d
  4608. #define PMERR_SHL_DEBUG                 0x120e
  4609. #define PMERR_OPENING_INI_FILE          0x1301
  4610. #define PMERR_INI_FILE_CORRUPT          0x1302
  4611. #define PMERR_INVALID_PARM              0x1303
  4612. #define PMERR_NOT_IN_IDX                0x1304
  4613. #define PMERR_NO_ENTRIES_IN_GROUP       0x1305
  4614. #define PMERR_INI_WRITE_FAIL            0x1306
  4615. #define PMERR_IDX_FULL                  0x1307
  4616. #define PMERR_INI_PROTECTED             0x1308
  4617. #define PMERR_MEMORY_ALLOC              0x1309
  4618. #define PMERR_INI_INIT_ALREADY_DONE     0x130a
  4619. #define PMERR_INVALID_INTEGER           0x130b
  4620. #define PMERR_INVALID_ASCIIZ            0x130c
  4621. #define PMERR_CAN_NOT_CALL_SPOOLER      0x130d
  4622. #define PMERR_VALIDATION_REJECTED       0x130d /*!*/
  4623. #define PMERR_WARNING_WINDOW_NOT_KILLED 0x1401
  4624. #define PMERR_ERROR_INVALID_WINDOW      0x1402
  4625. #define PMERR_ALREADY_INITIALIZED       0x1403
  4626. #define PMERR_MSG_PROG_NO_MOU           0x1405
  4627. #define PMERR_MSG_PROG_NON_RECOV        0x1406
  4628. #define PMERR_WINCONV_INVALID_PATH      0x1407
  4629. #define PMERR_PI_NOT_INITIALISED        0x1408
  4630. #define PMERR_PL_NOT_INITIALISED        0x1409
  4631. #define PMERR_NO_TASK_MANAGER           0x140a
  4632. #define PMERR_SAVE_NOT_IN_PROGRESS      0x140b
  4633. #define PMERR_NO_STACK_SPACE            0x140c
  4634. #define PMERR_INVALID_COLR_FIELD        0x140d
  4635. #define PMERR_INVALID_COLR_VALUE        0x140e
  4636. #define PMERR_COLR_WRITE                0x140f
  4637. #define PMERR_TARGET_FILE_EXISTS        0x1501
  4638. #define PMERR_SOURCE_SAME_AS_TARGET     0x1502
  4639. #define PMERR_SOURCE_FILE_NOT_FOUND     0x1503
  4640. #define PMERR_INVALID_NEW_PATH          0x1504
  4641. #define PMERR_TARGET_FILE_NOT_FOUND     0x1505
  4642. #define PMERR_INVALID_DRIVE_NUMBER      0x1506
  4643. #define PMERR_NAME_TOO_LONG             0x1507
  4644. #define PMERR_NOT_ENOUGH_ROOM_ON_DISK   0x1508
  4645. #define PMERR_NOT_ENOUGH_MEM            0x1509
  4646. #define PMERR_LOG_DRV_DOES_NOT_EXIST    0x150b
  4647. #define PMERR_INVALID_DRIVE             0x150c
  4648. #define PMERR_ACCESS_DENIED             0x150d
  4649. #define PMERR_NO_FIRST_SLASH            0x150e
  4650. #define PMERR_READ_ONLY_FILE            0x150f
  4651. #define PMERR_GROUP_PROTECTED           0x151f
  4652. #define PMERR_INVALID_PROGRAM_CATEGORY  0x152f
  4653. #define PMERR_INVALID_APPL              0x1530
  4654. #define PMERR_CANNOT_START              0x1531
  4655. #define PMERR_STARTED_IN_BACKGROUND     0x1532
  4656. #define PMERR_INVALID_HAPP              0x1533
  4657. #define PMERR_CANNOT_STOP               0x1534
  4658. #define PMERR_INVALID_FREE_MESSAGE_ID   0x1630
  4659. #define PMERR_FUNCTION_NOT_SUPPORTED    0x1641
  4660. #define PMERR_INVALID_ARRAY_COUNT       0x1642
  4661. #define PMERR_INVALID_LENGTH            0x1643
  4662. #define PMERR_INVALID_BUNDLE_TYPE       0x1644
  4663. #define PMERR_INVALID_PARAMETER         0x1645
  4664. #define PMERR_INVALID_NUMBER_OF_PARMS   0x1646
  4665. #define PMERR_GREATER_THAN_64K          0x1647
  4666. #define PMERR_INVALID_PARAMETER_TYPE    0x1648
  4667. #define PMERR_NEGATIVE_STRCOND_DIM      0x1649
  4668. #define PMERR_INVALID_NUMBER_OF_TYPES   0x164a
  4669. #define PMERR_INCORRECT_HSTRUCT         0x164b
  4670. #define PMERR_INVALID_ARRAY_SIZE        0x164c
  4671. #define PMERR_INVALID_CONTROL_DATATYPE  0x164d
  4672. #define PMERR_INCOMPLETE_CONTROL_SEQU   0x164e
  4673. #define PMERR_INVALID_DATATYPE          0x164f
  4674. #define PMERR_INCORRECT_DATATYPE        0x1650
  4675. #define PMERR_NOT_SELF_DESCRIBING_DTYP  0x1651
  4676. #define PMERR_INVALID_CTRL_SEQ_INDEX    0x1652
  4677. #define PMERR_INVALID_TYPE_FOR_LENGTH   0x1653
  4678. #define PMERR_INVALID_TYPE_FOR_OFFSET   0x1654
  4679. #define PMERR_INVALID_TYPE_FOR_MPARAM   0x1655
  4680. #define PMERR_INVALID_MESSAGE_ID        0x1656
  4681. #define PMERR_C_LENGTH_TOO_SMALL        0x1657
  4682. #define PMERR_APPL_STRUCTURE_TOO_SMALL  0x1658
  4683. #define PMERR_INVALID_ERRORINFO_HANDLE  0x1659
  4684. #define PMERR_INVALID_CHARACTER_INDEX   0x165a
  4685. #define PMERR_ALREADY_IN_AREA           0x2001
  4686. #define PMERR_ALREADY_IN_ELEMENT        0x2002
  4687. #define PMERR_ALREADY_IN_PATH           0x2003
  4688. #define PMERR_ALREADY_IN_SEG            0x2004
  4689. #define PMERR_AREA_INCOMPLETE           0x2005
  4690. #define PMERR_BASE_ERROR                0x2006
  4691. #define PMERR_BITBLT_LENGTH_EXCEEDED    0x2007
  4692. #define PMERR_BITMAP_IN_USE             0x2008
  4693. #define PMERR_BITMAP_IS_SELECTED        0x2009
  4694. #define PMERR_BITMAP_NOT_FOUND          0x200a
  4695. #define PMERR_BITMAP_NOT_SELECTED       0x200b
  4696. #define PMERR_BOUNDS_OVERFLOW           0x200c
  4697. #define PMERR_CALLED_SEG_IS_CHAINED     0x200d
  4698. #define PMERR_CALLED_SEG_IS_CURRENT     0x200e
  4699. #define PMERR_CALLED_SEG_NOT_FOUND      0x200f
  4700. #define PMERR_CANNOT_DELETE_ALL_DATA    0x2010
  4701. #define PMERR_CANNOT_REPLACE_ELEMENT_0  0x2011
  4702. #define PMERR_COL_TABLE_NOT_REALIZABLE  0x2012
  4703. #define PMERR_COL_TABLE_NOT_REALIZED    0x2013
  4704. #define PMERR_COORDINATE_OVERFLOW       0x2014
  4705. #define PMERR_CORR_FORMAT_MISMATCH      0x2015
  4706. #define PMERR_DATA_TOO_LONG             0x2016
  4707. #define PMERR_DC_IS_ASSOCIATED          0x2017
  4708. #define PMERR_DESC_STRING_TRUNCATED     0x2018
  4709. #define PMERR_DEVICE_DRIVER_ERROR_1     0x2019
  4710. #define PMERR_DEVICE_DRIVER_ERROR_2     0x201a
  4711. #define PMERR_DEVICE_DRIVER_ERROR_3     0x201b
  4712. #define PMERR_DEVICE_DRIVER_ERROR_4     0x201c
  4713. #define PMERR_DEVICE_DRIVER_ERROR_5     0x201d
  4714. #define PMERR_DEVICE_DRIVER_ERROR_6     0x201e
  4715. #define PMERR_DEVICE_DRIVER_ERROR_7     0x201f
  4716. #define PMERR_DEVICE_DRIVER_ERROR_8     0x2020
  4717. #define PMERR_DEVICE_DRIVER_ERROR_9     0x2021
  4718. #define PMERR_DEVICE_DRIVER_ERROR_10    0x2022
  4719. #define PMERR_DEV_FUNC_NOT_INSTALLED    0x2023
  4720. #define PMERR_DOSOPEN_FAILURE           0x2024
  4721. #define PMERR_DOSREAD_FAILURE           0x2025
  4722. #define PMERR_DRIVER_NOT_FOUND          0x2026
  4723. #define PMERR_DUP_SEG                   0x2027
  4724. #define PMERR_DYNAMIC_SEG_SEQ_ERROR     0x2028
  4725. #define PMERR_DYNAMIC_SEG_ZERO_INV      0x2029
  4726. #define PMERR_ELEMENT_INCOMPLETE        0x202a
  4727. #define PMERR_ESC_CODE_NOT_SUPPORTED    0x202b
  4728. #define PMERR_EXCEEDS_MAX_SEG_LENGTH    0x202c
  4729. #define PMERR_FONT_AND_MODE_MISMATCH    0x202d
  4730. #define PMERR_FONT_FILE_NOT_LOADED      0x202e
  4731. #define PMERR_FONT_NOT_LOADED           0x202f
  4732. #define PMERR_FONT_TOO_BIG              0x2030
  4733. #define PMERR_HARDWARE_INIT_FAILURE     0x2031
  4734. #define PMERR_HBITMAP_BUSY              0x2032
  4735. #define PMERR_HDC_BUSY                  0x2033
  4736. #define PMERR_HRGN_BUSY                 0x2034
  4737. #define PMERR_HUGE_FONTS_NOT_SUPPORTED  0x2035
  4738. #define PMERR_ID_HAS_NO_BITMAP          0x2036
  4739. #define PMERR_IMAGE_INCOMPLETE          0x2037
  4740. #define PMERR_INCOMPAT_COLOR_FORMAT     0x2038
  4741. #define PMERR_INCOMPAT_COLOR_OPTIONS    0x2039
  4742. #define PMERR_INCOMPATIBLE_BITMAP       0x203a
  4743. #define PMERR_INCOMPATIBLE_METAFILE     0x203b
  4744. #define PMERR_INCORRECT_DC_TYPE         0x203c
  4745. #define PMERR_INSUFFICIENT_DISK_SPACE   0x203d
  4746. #define PMERR_INSUFFICIENT_MEMORY       0x203e
  4747. #define PMERR_INV_ANGLE_PARM            0x203f
  4748. #define PMERR_INV_ARC_CONTROL           0x2040
  4749. #define PMERR_INV_AREA_CONTROL          0x2041
  4750. #define PMERR_INV_ARC_POINTS            0x2042
  4751. #define PMERR_INV_ATTR_MODE             0x2043
  4752. #define PMERR_INV_BACKGROUND_COL_ATTR   0x2044
  4753. #define PMERR_INV_BACKGROUND_MIX_ATTR   0x2045
  4754. #define PMERR_INV_BITBLT_MIX            0x2046
  4755. #define PMERR_INV_BITBLT_STYLE          0x2047
  4756. #define PMERR_INV_BITMAP_DIMENSION      0x2048
  4757. #define PMERR_INV_BOX_CONTROL           0x2049
  4758. #define PMERR_INV_BOX_ROUNDING_PARM     0x204a
  4759. #define PMERR_INV_CHAR_ANGLE_ATTR       0x204b
  4760. #define PMERR_INV_CHAR_DIRECTION_ATTR   0x204c
  4761. #define PMERR_INV_CHAR_MODE_ATTR        0x204d
  4762. #define PMERR_INV_CHAR_POS_OPTIONS      0x204e
  4763. #define PMERR_INV_CHAR_SET_ATTR         0x204f
  4764. #define PMERR_INV_CHAR_SHEAR_ATTR       0x2050
  4765. #define PMERR_INV_CLIP_PATH_OPTIONS     0x2051
  4766. #define PMERR_INV_CODEPAGE              0x2052
  4767. #define PMERR_INV_COLOR_ATTR            0x2053
  4768. #define PMERR_INV_COLOR_DATA            0x2054
  4769. #define PMERR_INV_COLOR_FORMAT          0x2055
  4770. #define PMERR_INV_COLOR_INDEX           0x2056
  4771. #define PMERR_INV_COLOR_OPTIONS         0x2057
  4772. #define PMERR_INV_COLOR_START_INDEX     0x2058
  4773. #define PMERR_INV_COORD_OFFSET          0x2059
  4774. #define PMERR_INV_COORD_SPACE           0x205a
  4775. #define PMERR_INV_COORDINATE            0x205b
  4776. #define PMERR_INV_CORRELATE_DEPTH       0x205c
  4777. #define PMERR_INV_CORRELATE_TYPE        0x205d
  4778. #define PMERR_INV_CURSOR_BITMAP         0x205e
  4779. #define PMERR_INV_DC_DATA               0x205f
  4780. #define PMERR_INV_DC_TYPE               0x2060
  4781. #define PMERR_INV_DEVICE_NAME           0x2061
  4782. #define PMERR_INV_DEV_MODES_OPTIONS     0x2062
  4783. #define PMERR_INV_DRAW_CONTROL          0x2063
  4784. #define PMERR_INV_DRAW_VALUE            0x2064
  4785. #define PMERR_INV_DRAWING_MODE          0x2065
  4786. #define PMERR_INV_DRIVER_DATA           0x2066
  4787. #define PMERR_INV_DRIVER_NAME           0x2067
  4788. #define PMERR_INV_DRAW_BORDER_OPTION    0x2068
  4789. #define PMERR_INV_EDIT_MODE             0x2069
  4790. #define PMERR_INV_ELEMENT_OFFSET        0x206a
  4791. #define PMERR_INV_ELEMENT_POINTER       0x206b
  4792. #define PMERR_INV_END_PATH_OPTIONS      0x206c
  4793. #define PMERR_INV_ESC_CODE              0x206d
  4794. #define PMERR_INV_ESCAPE_DATA           0x206e
  4795. #define PMERR_INV_EXTENDED_LCID         0x206f
  4796. #define PMERR_INV_FILL_PATH_OPTIONS     0x2070
  4797. #define PMERR_INV_FIRST_CHAR            0x2071
  4798. #define PMERR_INV_FONT_ATTRS            0x2072
  4799. #define PMERR_INV_FONT_FILE_DATA        0x2073
  4800. #define PMERR_INV_FOR_THIS_DC_TYPE      0x2074
  4801. #define PMERR_INV_FORMAT_CONTROL        0x2075
  4802. #define PMERR_INV_FORMS_CODE            0x2076
  4803. #define PMERR_INV_FONTDEF               0x2077
  4804. #define PMERR_INV_GEOM_LINE_WIDTH_ATTR  0x2078
  4805. #define PMERR_INV_GETDATA_CONTROL       0x2079
  4806. #define PMERR_INV_GRAPHICS_FIELD        0x207a
  4807. #define PMERR_INV_HBITMAP               0x207b
  4808. #define PMERR_INV_HDC                   0x207c
  4809. #define PMERR_INV_HJOURNAL              0x207d
  4810. #define PMERR_INV_HMF                   0x207e
  4811. #define PMERR_INV_HPS                   0x207f
  4812. #define PMERR_INV_HRGN                  0x2080
  4813. #define PMERR_INV_ID                    0x2081
  4814. #define PMERR_INV_IMAGE_DATA_LENGTH     0x2082
  4815. #define PMERR_INV_IMAGE_DIMENSION       0x2083
  4816. #define PMERR_INV_IMAGE_FORMAT          0x2084
  4817. #define PMERR_INV_IN_AREA               0x2085
  4818. #define PMERR_INV_IN_CALLED_SEG         0x2086
  4819. #define PMERR_INV_IN_CURRENT_EDIT_MODE  0x2087
  4820. #define PMERR_INV_IN_DRAW_MODE          0x2088
  4821. #define PMERR_INV_IN_ELEMENT            0x2089
  4822. #define PMERR_INV_IN_IMAGE              0x208a
  4823. #define PMERR_INV_IN_PATH               0x208b
  4824. #define PMERR_INV_IN_RETAIN_MODE        0x208c
  4825. #define PMERR_INV_IN_SEG                0x208d
  4826. #define PMERR_INV_IN_VECTOR_SYMBOL      0x208e
  4827. #define PMERR_INV_INFO_TABLE            0x208f
  4828. #define PMERR_INV_JOURNAL_OPTION        0x2090
  4829. #define PMERR_INV_KERNING_FLAGS         0x2091
  4830. #define PMERR_INV_LENGTH_OR_COUNT       0x2092
  4831. #define PMERR_INV_LINE_END_ATTR         0x2093
  4832. #define PMERR_INV_LINE_JOIN_ATTR        0x2094
  4833. #define PMERR_INV_LINE_TYPE_ATTR        0x2095
  4834. #define PMERR_INV_LINE_WIDTH_ATTR       0x2096
  4835. #define PMERR_INV_LOGICAL_ADDRESS       0x2097
  4836. #define PMERR_INV_MARKER_BOX_ATTR       0x2098
  4837. #define PMERR_INV_MARKER_SET_ATTR       0x2099
  4838. #define PMERR_INV_MARKER_SYMBOL_ATTR    0x209a
  4839. #define PMERR_INV_MATRIX_ELEMENT        0x209b
  4840. #define PMERR_INV_MAX_HITS              0x209c
  4841. #define PMERR_INV_METAFILE              0x209d
  4842. #define PMERR_INV_METAFILE_LENGTH       0x209e
  4843. #define PMERR_INV_METAFILE_OFFSET       0x209f
  4844. #define PMERR_INV_MICROPS_DRAW_CONTROL  0x20a0
  4845. #define PMERR_INV_MICROPS_FUNCTION      0x20a1
  4846. #define PMERR_INV_MICROPS_ORDER         0x20a2
  4847. #define PMERR_INV_MIX_ATTR              0x20a3
  4848. #define PMERR_INV_MODE_FOR_OPEN_DYN     0x20a4
  4849. #define PMERR_INV_MODE_FOR_REOPEN_SEG   0x20a5
  4850. #define PMERR_INV_MODIFY_PATH_MODE      0x20a6
  4851. #define PMERR_INV_MULTIPLIER            0x20a7
  4852. #define PMERR_INV_NESTED_FIGURES        0x20a8
  4853. #define PMERR_INV_OR_INCOMPAT_OPTIONS   0x20a9
  4854. #define PMERR_INV_ORDER_LENGTH          0x20aa
  4855. #define PMERR_INV_ORDERING_PARM         0x20ab
  4856. #define PMERR_INV_OUTSIDE_DRAW_MODE     0x20ac
  4857. #define PMERR_INV_PAGE_VIEWPORT         0x20ad
  4858. #define PMERR_INV_PATH_ID               0x20ae
  4859. #define PMERR_INV_PATH_MODE             0x20af
  4860. #define PMERR_INV_PATTERN_ATTR          0x20b0
  4861. #define PMERR_INV_PATTERN_REF_PT_ATTR   0x20b1
  4862. #define PMERR_INV_PATTERN_SET_ATTR      0x20b2
  4863. #define PMERR_INV_PATTERN_SET_FONT      0x20b3
  4864. #define PMERR_INV_PICK_APERTURE_OPTION  0x20b4
  4865. #define PMERR_INV_PICK_APERTURE_POSN    0x20b5
  4866. #define PMERR_INV_PICK_APERTURE_SIZE    0x20b6
  4867. #define PMERR_INV_PICK_NUMBER           0x20b7
  4868. #define PMERR_INV_PLAY_METAFILE_OPTION  0x20b8
  4869. #define PMERR_INV_PRIMITIVE_TYPE        0x20b9
  4870. #define PMERR_INV_PS_SIZE               0x20ba
  4871. #define PMERR_INV_PUTDATA_FORMAT        0x20bb
  4872. #define PMERR_INV_QUERY_ELEMENT_NO      0x20bc
  4873. #define PMERR_INV_RECT                  0x20bd
  4874. #define PMERR_INV_REGION_CONTROL        0x20be
  4875. #define PMERR_INV_REGION_MIX_MODE       0x20bf
  4876. #define PMERR_INV_REPLACE_MODE_FUNC     0x20c0
  4877. #define PMERR_INV_RESERVED_FIELD        0x20c1
  4878. #define PMERR_INV_RESET_OPTIONS         0x20c2
  4879. #define PMERR_INV_RGBCOLOR              0x20c3
  4880. #define PMERR_INV_SCAN_START            0x20c4
  4881. #define PMERR_INV_SEG_ATTR              0x20c5
  4882. #define PMERR_INV_SEG_ATTR_VALUE        0x20c6
  4883. #define PMERR_INV_SEG_CH_LENGTH         0x20c7
  4884. #define PMERR_INV_SEG_NAME              0x20c8
  4885. #define PMERR_INV_SEG_OFFSET            0x20c9
  4886. #define PMERR_INV_SETID                 0x20ca
  4887. #define PMERR_INV_SETID_TYPE            0x20cb
  4888. #define PMERR_INV_SET_VIEWPORT_OPTION   0x20cc
  4889. #define PMERR_INV_SHARPNESS_PARM        0x20cd
  4890. #define PMERR_INV_SOURCE_OFFSET         0x20ce
  4891. #define PMERR_INV_STOP_DRAW_VALUE       0x20cf
  4892. #define PMERR_INV_TRANSFORM_TYPE        0x20d0
  4893. #define PMERR_INV_USAGE_PARM            0x20d1
  4894. #define PMERR_INV_VIEWING_LIMITS        0x20d2
  4895. #define PMERR_JFILE_BUSY                0x20d3
  4896. #define PMERR_JNL_FUNC_DATA_TOO_LONG    0x20d4
  4897. #define PMERR_KERNING_NOT_SUPPORTED     0x20d5
  4898. #define PMERR_LABEL_NOT_FOUND           0x20d6
  4899. #define PMERR_MATRIX_OVERFLOW           0x20d7
  4900. #define PMERR_METAFILE_INTERNAL_ERROR   0x20d8
  4901. #define PMERR_METAFILE_IN_USE           0x20d9
  4902. #define PMERR_METAFILE_LIMIT_EXCEEDED   0x20da
  4903. #define PMERR_NAME_STACK_FULL           0x20db
  4904. #define PMERR_NOT_CREATED_BY_DEVOPENDC  0x20dc
  4905. #define PMERR_NOT_IN_AREA               0x20dd
  4906. #define PMERR_NOT_IN_DRAW_MODE          0x20de
  4907. #define PMERR_NOT_IN_ELEMENT            0x20df
  4908. #define PMERR_NOT_IN_IMAGE              0x20e0
  4909. #define PMERR_NOT_IN_PATH               0x20e1
  4910. #define PMERR_NOT_IN_RETAIN_MODE        0x20e2
  4911. #define PMERR_NOT_IN_SEG                0x20e3
  4912. #define PMERR_NO_BITMAP_SELECTED        0x20e4
  4913. #define PMERR_NO_CURRENT_ELEMENT        0x20e5
  4914. #define PMERR_NO_CURRENT_SEG            0x20e6
  4915. #define PMERR_NO_METAFILE_RECORD_HANDLE 0x20e7
  4916. #define PMERR_ORDER_TOO_BIG             0x20e8
  4917. #define PMERR_OTHER_SET_ID_REFS         0x20e9
  4918. #define PMERR_OVERRAN_SEG               0x20ea
  4919. #define PMERR_OWN_SET_ID_REFS           0x20eb
  4920. #define PMERR_PATH_INCOMPLETE           0x20ec
  4921. #define PMERR_PATH_LIMIT_EXCEEDED       0x20ed
  4922. #define PMERR_PATH_UNKNOWN              0x20ee
  4923. #define PMERR_PEL_IS_CLIPPED            0x20ef
  4924. #define PMERR_PEL_NOT_AVAILABLE         0x20f0
  4925. #define PMERR_PRIMITIVE_STACK_EMPTY     0x20f1
  4926. #define PMERR_PROLOG_ERROR              0x20f2
  4927. #define PMERR_PROLOG_SEG_ATTR_NOT_SET   0x20f3
  4928. #define PMERR_PS_BUSY                   0x20f4
  4929. #define PMERR_PS_IS_ASSOCIATED          0x20f5
  4930. #define PMERR_RAM_JNL_FILE_TOO_SMALL    0x20f6
  4931. #define PMERR_REALIZE_NOT_SUPPORTED     0x20f7
  4932. #define PMERR_REGION_IS_CLIP_REGION     0x20f8
  4933. #define PMERR_RESOURCE_DEPLETION        0x20f9
  4934. #define PMERR_SEG_AND_REFSEG_ARE_SAME   0x20fa
  4935. #define PMERR_SEG_CALL_RECURSIVE        0x20fb
  4936. #define PMERR_SEG_CALL_STACK_EMPTY      0x20fc
  4937. #define PMERR_SEG_CALL_STACK_FULL       0x20fd
  4938. #define PMERR_SEG_IS_CURRENT            0x20fe
  4939. #define PMERR_SEG_NOT_CHAINED           0x20ff
  4940. #define PMERR_SEG_NOT_FOUND             0x2100
  4941. #define PMERR_SEG_STORE_LIMIT_EXCEEDED  0x2101
  4942. #define PMERR_SETID_IN_USE              0x2102
  4943. #define PMERR_SETID_NOT_FOUND           0x2103
  4944. #define PMERR_STARTDOC_NOT_ISSUED       0x2104
  4945. #define PMERR_STOP_DRAW_OCCURRED        0x2105
  4946. #define PMERR_TOO_MANY_METAFILES_IN_USE 0x2106
  4947. #define PMERR_TRUNCATED_ORDER           0x2107
  4948. #define PMERR_UNCHAINED_SEG_ZERO_INV    0x2108
  4949. #define PMERR_UNSUPPORTED_ATTR          0x2109
  4950. #define PMERR_UNSUPPORTED_ATTR_VALUE    0x210a
  4951. #define PMERR_ENDDOC_NOT_ISSUED         0x210b
  4952. #define PMERR_PS_NOT_ASSOCIATED         0x210c
  4953. #define PMERR_INV_FLOOD_FILL_OPTIONS    0x210d
  4954. #define PMERR_INV_FACENAME              0x210e
  4955. #define PMERR_PALETTE_SELECTED          0x210f
  4956. #define PMERR_NO_PALETTE_SELECTED       0x2110
  4957. #define PMERR_INV_HPAL                  0x2111
  4958. #define PMERR_PALETTE_BUSY              0x2112
  4959. #define PMERR_START_POINT_CLIPPED       0x2113
  4960. #define PMERR_NO_FILL                   0x2114
  4961. #define PMERR_INV_FACENAMEDESC          0x2115
  4962. #define PMERR_INV_BITMAP_DATA           0x2116
  4963. #define PMERR_INV_CHAR_ALIGN_ATTR       0x2117
  4964. #define PMERR_INV_HFONT                 0x2118
  4965. #define PMERR_HFONT_IS_SELECTED         0x2119
  4966. #define PMERR_DRVR_NOT_SUPPORTED        0x2120
  4967. #define PMERR_SPL_DRIVER_ERROR          0x4001
  4968. #define PMERR_SPL_DEVICE_ERROR          0x4002
  4969. #define PMERR_SPL_DEVICE_NOT_INSTALLED  0x4003
  4970. #define PMERR_SPL_QUEUE_ERROR           0x4004
  4971. #define PMERR_SPL_INV_HSPL              0x4005
  4972. #define PMERR_SPL_NO_DISK_SPACE         0x4006
  4973. #define PMERR_SPL_NO_MEMORY             0x4007
  4974. #define PMERR_SPL_PRINT_ABORT           0x4008
  4975. #define PMERR_SPL_SPOOLER_NOT_INSTALLED 0x4009
  4976. #define PMERR_SPL_INV_FORMS_CODE        0x400a
  4977. #define PMERR_SPL_INV_PRIORITY          0x400b
  4978. #define PMERR_SPL_NO_FREE_JOB_ID        0x400c
  4979. #define PMERR_SPL_NO_DATA               0x400d
  4980. #define PMERR_SPL_INV_TOKEN             0x400e
  4981. #define PMERR_SPL_INV_DATATYPE          0x400f
  4982. #define PMERR_SPL_PROCESSOR_ERROR       0x4010
  4983. #define PMERR_SPL_INV_JOB_ID            0x4011
  4984. #define PMERR_SPL_JOB_NOT_PRINTING      0x4012
  4985. #define PMERR_SPL_JOB_PRINTING          0x4013
  4986. #define PMERR_SPL_QUEUE_ALREADY_EXISTS  0x4014
  4987. #define PMERR_SPL_INV_QUEUE_NAME        0x4015
  4988. #define PMERR_SPL_QUEUE_NOT_EMPTY       0x4016
  4989. #define PMERR_SPL_DEVICE_ALREADY_EXISTS 0x4017
  4990. #define PMERR_SPL_DEVICE_LIMIT_REACHED  0x4018
  4991. #define PMERR_SPL_STATUS_STRING_TRUNC   0x4019
  4992. #define PMERR_SPL_INV_LENGTH_OR_COUNT   0x401a
  4993. #define PMERR_SPL_FILE_NOT_FOUND        0x401b
  4994. #define PMERR_SPL_CANNOT_OPEN_FILE      0x401c
  4995. #define PMERR_SPL_DRIVER_NOT_INSTALLED  0x401d
  4996. #define PMERR_SPL_INV_PROCESSOR_DATTYPE 0x401e
  4997. #define PMERR_SPL_INV_DRIVER_DATATYPE   0x401f
  4998. #define PMERR_SPL_PROCESSOR_NOT_INST    0x4020
  4999. #define PMERR_SPL_NO_SUCH_LOG_ADDRESS   0x4021
  5000. #define PMERR_SPL_PRINTER_NOT_FOUND     0x4022
  5001. #define PMERR_SPL_DD_NOT_FOUND          0x4023
  5002. #define PMERR_SPL_QUEUE_NOT_FOUND       0x4024
  5003. #define PMERR_SPL_MANY_QUEUES_ASSOC     0x4025
  5004. #define PMERR_SPL_NO_QUEUES_ASSOCIATED  0x4026
  5005. #define PMERR_SPL_INI_FILE_ERROR        0x4027
  5006. #define PMERR_SPL_NO_DEFAULT_QUEUE      0x4028
  5007. #define PMERR_SPL_NO_CURRENT_FORMS_CODE 0x4029
  5008. #define PMERR_SPL_NOT_AUTHORISED        0x402a
  5009. #define PMERR_SPL_TEMP_NETWORK_ERROR    0x402b
  5010. #define PMERR_SPL_HARD_NETWORK_ERROR    0x402c
  5011. #define PMERR_DEL_NOT_ALLOWED           0x402d
  5012. #define PMERR_CANNOT_DEL_QP_REF         0x402e
  5013. #define PMERR_CANNOT_DEL_QNAME_REF      0x402f
  5014. #define PMERR_CANNOT_DEL_PRINTER_DD_REF 0x4030
  5015. #define PMERR_CANNOT_DEL_PRN_NAME_REF   0x4031
  5016. #define PMERR_CANNOT_DEL_PRN_ADDR_REF   0x4032
  5017. #define PMERR_SPOOLER_QP_NOT_DEFINED    0x4033
  5018. #define PMERR_PRN_NAME_NOT_DEFINED      0x4034
  5019. #define PMERR_PRN_ADDR_NOT_DEFINED      0x4035
  5020. #define PMERR_PRINTER_DD_NOT_DEFINED    0x4036
  5021. #define PMERR_PRINTER_QUEUE_NOT_DEFINED 0x4037
  5022. #define PMERR_PRN_ADDR_IN_USE           0x4038
  5023. #define PMERR_SPL_TOO_MANY_OPEN_FILES   0x4039
  5024. #define PMERR_SPL_CP_NOT_REQD           0x403a
  5025. #define PMERR_UNABLE_TO_CLOSE_DEVICE    0x4040
  5026. #define PMERR_INV_TYPE                  0x5001
  5027. #define PMERR_INV_CONV                  0x5002
  5028. #define PMERR_INV_SEGLEN                0x5003
  5029. #define PMERR_DUP_SEGNAME               0x5004
  5030. #define PMERR_INV_XFORM                 0x5005
  5031. #define PMERR_INV_VIEWLIM               0x5006
  5032. #define PMERR_INV_3DCOORD               0x5007
  5033. #define PMERR_SMB_OVFLOW                0x5008
  5034. #define PMERR_SEG_OVFLOW                0x5009
  5035. #define PMERR_PIC_DUP_FILENAME          0x5010
  5036.  
  5037. #define WINDBG_HWND_NOT_DESTROYED       0x1022
  5038. #define WINDBG_HPTR_NOT_DESTROYED       0x1023
  5039. #define WINDBG_HACCEL_NOT_DESTROYED     0x1024
  5040. #define WINDBG_HENUM_NOT_DESTROYED      0x1025
  5041. #define WINDBG_VISRGN_SEM_BUSY          0x1026
  5042. #define WINDBG_USER_SEM_BUSY            0x1027
  5043. #define WINDBG_DC_CACHE_BUSY            0x1028
  5044. #define WINDBG_HOOK_STILL_INSTALLED     0x1029
  5045. #define WINDBG_WINDOW_STILL_LOCKED      0x102a
  5046. #define WINDBG_UPDATEPS_ASSERTION_FAIL  0x102b
  5047. #define WINDBG_SENDMSG_WITHIN_USER_SEM  0x102c
  5048. #define WINDBG_USER_SEM_NOT_ENTERED     0x102d
  5049. #define WINDBG_PROC_NOT_EXPORTED        0x102e
  5050. #define WINDBG_BAD_SENDMSG_HWND         0x102f
  5051. #define WINDBG_ABNORMAL_EXIT            0x1030
  5052. #define WINDBG_INTERNAL_REVISION        0x1031
  5053. #define WINDBG_INITSYSTEM_FAILED        0x1032
  5054. #define WINDBG_HATOMTBL_NOT_DESTROYED   0x1033
  5055. #define WINDBG_WINDOW_UNLOCK_WAIT       0x1035
  5056.  
  5057. typedef LHANDLE HAB;
  5058. typedef HAB *PHAB;
  5059.  
  5060. typedef LHANDLE HPS;
  5061. typedef HPS *PHPS;
  5062.  
  5063. typedef LHANDLE HDC;
  5064. typedef HDC *PHDC;
  5065.  
  5066. typedef LHANDLE HWND;
  5067. typedef HWND *PHWND;
  5068.  
  5069. typedef LHANDLE HMQ;
  5070.  
  5071. typedef LHANDLE HACCEL;
  5072.  
  5073. typedef LHANDLE HRGN;
  5074. typedef HRGN *PHRGN;
  5075.  
  5076. typedef VOID *MRESULT;
  5077. typedef VOID *MPARAM;
  5078.  
  5079. typedef MRESULT FNWP (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  5080. typedef FNWP *PFNWP;
  5081.  
  5082. typedef LHANDLE HATOMTBL;
  5083. typedef ULONG ATOM;
  5084.  
  5085. typedef LHANDLE HPOINTER;
  5086.  
  5087. typedef HMODULE HLIB;
  5088. typedef HLIB *PHLIB;
  5089.  
  5090. typedef LHANDLE HENUM;
  5091.  
  5092. typedef LHANDLE HSAVEWP;
  5093.  
  5094. #define WRECT   RECTL
  5095. #define PWRECT  PRECTL
  5096.  
  5097. #define WPOINT  POINTL
  5098. #define PWPOINT PPOINTL
  5099.  
  5100. typedef struct
  5101. {
  5102.   LONG x;
  5103.   LONG y;
  5104. } POINTL;
  5105. typedef POINTL *PPOINTL;
  5106.  
  5107. typedef struct
  5108. {
  5109.   SHORT x;
  5110.   SHORT y;
  5111. } POINTS;
  5112. typedef POINTS *PPOINTS;
  5113.  
  5114. typedef struct
  5115. {
  5116.   LONG xLeft;
  5117.   LONG yBottom;
  5118.   LONG xRight;
  5119.   LONG yTop;
  5120. } RECTL;
  5121. typedef RECTL *PRECTL;
  5122.  
  5123. typedef struct
  5124. {
  5125.   HWND   hwnd;
  5126.   ULONG  msg;
  5127.   MPARAM mp1;
  5128.   MPARAM mp2;
  5129.   ULONG  time;
  5130.   POINTL ptl;
  5131.   ULONG  reserved;
  5132. } QMSG;
  5133. typedef QMSG *PQMSG;
  5134.  
  5135. typedef struct
  5136. {
  5137.   USHORT cmd;
  5138.   USHORT unused;
  5139.   USHORT source;
  5140.   USHORT fMouse;
  5141. } CMDMSG;
  5142. typedef CMDMSG *PCMDMSG;
  5143.  
  5144. typedef struct
  5145. {
  5146.   ULONG fl;
  5147.   LONG  cy;
  5148.   LONG  cx;
  5149.   LONG  y;
  5150.   LONG  x;
  5151.   HWND  hwndInsertBehind;
  5152.   HWND  hwnd;
  5153.   ULONG ulReserved1;
  5154.   ULONG ulReserved2;
  5155. } SWP;
  5156. typedef SWP *PSWP;
  5157.  
  5158. typedef struct
  5159. {
  5160.   PVOID pPresParams;
  5161.   PVOID pCtlData;
  5162.   ULONG id;
  5163.   HWND  hwndInsertBehind;
  5164.   HWND  hwndOwner;
  5165.   LONG  cy;
  5166.   LONG  cx;
  5167.   LONG  y;
  5168.   LONG  x;
  5169.   ULONG flStyle;
  5170.   PSZ   pszText;
  5171.   PSZ   pszClass;
  5172.   HWND  hwndParent;
  5173. } CREATESTRUCT;
  5174. typedef CREATESTRUCT *PCREATESTRUCT;
  5175.  
  5176. typedef struct
  5177. {
  5178.   SHORT  x;
  5179.   SHORT  y;
  5180.   USHORT codeHitTest;
  5181.   USHORT fsInp;
  5182. } MSEMSG;
  5183. typedef MSEMSG *PMSEMSG;
  5184.  
  5185. typedef struct
  5186. {
  5187.   USHORT fs;
  5188.   UCHAR  cRepeat;
  5189.   UCHAR  scancode;
  5190.   USHORT chr;
  5191.   USHORT vkey;
  5192. } CHRMSG;
  5193. typedef CHRMSG *PCHRMSG;
  5194.  
  5195. typedef struct
  5196. {
  5197.   ULONG fsStatus;
  5198.   ULONG cchText;
  5199.   PSZ   pszText;
  5200.   ULONG cbPresParams;
  5201.   PVOID pPresParams;
  5202.   ULONG cbCtlData;
  5203.   PVOID pCtlData;
  5204. } WNDPARAMS;
  5205. typedef WNDPARAMS *PWNDPARAMS;
  5206.  
  5207. typedef struct
  5208. {
  5209.   USHORT fsItemStatus;
  5210.   USHORT cChildren;
  5211.   USHORT cchClassName;
  5212.   USHORT offClassName;
  5213.   USHORT cchText;
  5214.   USHORT offText;
  5215.   ULONG  flStyle;
  5216.   SHORT  x;
  5217.   SHORT  y;
  5218.   SHORT  cx;
  5219.   SHORT  cy;
  5220.   USHORT id;
  5221.   USHORT offPresParams;
  5222.   USHORT offCtlData;
  5223. } DLGTITEM;
  5224. typedef DLGTITEM *PDLGTITEM;
  5225.  
  5226. typedef struct
  5227. {
  5228.   USHORT   cbTemplate;
  5229.   USHORT   type;
  5230.   USHORT   codepage;
  5231.   USHORT   offadlgti;
  5232.   USHORT   fsTemplateStatus;
  5233.   USHORT   iItemFocus;
  5234.   USHORT   coffPresParams;
  5235.   DLGTITEM adlgti[1];
  5236. } DLGTEMPLATE;
  5237. typedef DLGTEMPLATE *PDLGTEMPLATE;
  5238.  
  5239. typedef struct
  5240. {
  5241.   USHORT cb;
  5242.   ULONG  flCreateFlags;
  5243.   USHORT hmodResources;
  5244.   USHORT idResources;
  5245. } FRAMECDATA;
  5246. typedef FRAMECDATA *PFRAMECDATA;
  5247.  
  5248. typedef struct
  5249. {
  5250.   ULONG id;
  5251.   ULONG cb;
  5252.   BYTE  ab[1];
  5253. } PARAM;
  5254. typedef PARAM *NPPARAM;
  5255. typedef PARAM *PPARAM;
  5256.  
  5257. typedef struct
  5258. {
  5259.   ULONG cb;
  5260.   PARAM aparam[1];
  5261. } PRESPARAMS;
  5262. typedef PRESPARAMS *NPPRESPARAMS;
  5263. typedef PRESPARAMS *PPRESPARAMS;
  5264.  
  5265. typedef struct
  5266. {
  5267.   ULONG flClassStyle;
  5268.   PFNWP pfnWindowProc;
  5269.   ULONG cbWindowData;
  5270. } CLASSINFO;
  5271. typedef CLASSINFO *PCLASSINFO;
  5272.  
  5273. typedef struct
  5274. {
  5275.   HWND  hwnd;
  5276.   LONG  x;
  5277.   LONG  y;
  5278.   LONG  cx;
  5279.   LONG  cy;
  5280.   ULONG fs;
  5281.   RECTL rclClip;
  5282. } CURSORINFO;
  5283. typedef CURSORINFO *PCURSORINFO;
  5284.  
  5285. typedef struct
  5286. {
  5287.   ULONG   cbSize;
  5288.   HBITMAP hbm;
  5289.   LONG    x;
  5290.   LONG    y;
  5291.   ULONG   fl;
  5292.   LONG    lTileCount;
  5293.   CHAR    szFile[260];
  5294. } DESKTOP;
  5295. typedef DESKTOP *PDESKTOP;
  5296.  
  5297. typedef struct
  5298. {
  5299.   ULONG   fPointer;
  5300.   LONG    xHotspot;
  5301.   LONG    yHotspot;
  5302.   HBITMAP hbmPointer;
  5303.   HBITMAP hbmColor;
  5304.   HBITMAP hbmMiniPointer;
  5305.   HBITMAP hbmMiniColor;
  5306. } POINTERINFO;
  5307. typedef POINTERINFO *PPOINTERINFO;
  5308.  
  5309. typedef struct
  5310. {
  5311.   ULONG cb;
  5312.   PID   pid;
  5313.   TID   tid;
  5314.   ULONG cmsgs;
  5315.   PVOID pReserved;
  5316. } MQINFO;
  5317. typedef MQINFO *PMQINFO;
  5318.  
  5319. typedef struct
  5320. {
  5321.   USHORT environment;
  5322.   USHORT version;
  5323. } QVERSDATA;
  5324. typedef QVERSDATA *PQVERSDATA;
  5325.  
  5326. typedef struct
  5327. {
  5328.   MPARAM mp2;
  5329.   MPARAM mp1;
  5330.   ULONG  msg;
  5331.   HWND   hwnd;
  5332.   ULONG  model;
  5333. } SMHSTRUCT;
  5334. typedef SMHSTRUCT *PSMHSTRUCT;
  5335.  
  5336. typedef struct
  5337. {
  5338.   USHORT  cb;
  5339.   USHORT  fsCheckState;
  5340.   USHORT  fsHiliteState;
  5341.   LHANDLE hImage;
  5342. } BTNCDATA;
  5343. typedef BTNCDATA *PBTNCDATA;
  5344.  
  5345. typedef struct
  5346. {
  5347.   USHORT cb;
  5348.   USHORT cchEditLimit;
  5349.   USHORT ichMinSel;
  5350.   USHORT ichMaxSel;
  5351. } ENTRYFDATA;
  5352. typedef ENTRYFDATA *PENTRYFDATA;
  5353.  
  5354. typedef struct
  5355. {
  5356.   HWND  hwnd;
  5357.   HPS   hps;
  5358.   ULONG fsState;
  5359.   ULONG fsStateOld;
  5360. } USERBUTTON;
  5361. typedef USERBUTTON *PUSERBUTTON;
  5362.  
  5363. typedef struct
  5364. {
  5365.   HWND  hwnd;
  5366.   HPS   hps;
  5367.   ULONG fsState;
  5368.   ULONG fsAttribute;
  5369.   ULONG fsStateOld;
  5370.   ULONG fsAttributeOld;
  5371.   RECTL rclItem;
  5372.   LONG  idItem;
  5373.   ULONG hItem;
  5374. } OWNERITEM;
  5375. typedef OWNERITEM *POWNERITEM;
  5376.  
  5377. typedef struct
  5378. {
  5379.   USHORT fs;
  5380.   USHORT key;
  5381.   USHORT cmd;
  5382. } ACCEL;
  5383. typedef ACCEL *PACCEL;
  5384.  
  5385. typedef struct
  5386. {
  5387.   USHORT cAccel;
  5388.   USHORT codepage;
  5389.   ACCEL  aaccel[1];
  5390. } ACCELTABLE;
  5391. typedef ACCELTABLE *PACCELTABLE;
  5392.  
  5393. typedef struct
  5394. {
  5395.   USHORT cb;
  5396.   USHORT sHilite;
  5397.   SHORT  posFirst;
  5398.   SHORT  posLast;
  5399.   SHORT  posThumb;
  5400.   SHORT  cVisible;
  5401.   SHORT  cTotal;
  5402. } SBCDATA;
  5403. typedef SBCDATA *PSBCDATA;
  5404.  
  5405. typedef struct
  5406. {
  5407.   SHORT  iPosition;
  5408.   USHORT afStyle;
  5409.   USHORT afAttribute;
  5410.   USHORT id;
  5411.   HWND   hwndSubMenu;
  5412.   ULONG  hItem;
  5413. } MENUITEM;
  5414. typedef MENUITEM *PMENUITEM;
  5415.  
  5416. typedef struct
  5417. {
  5418.   LONG   cxBorder;
  5419.   LONG   cyBorder;
  5420.   LONG   cxGrid;
  5421.   LONG   cyGrid;
  5422.   LONG   cxKeyboard;
  5423.   LONG   cyKeyboard;
  5424.   RECTL  rclTrack;
  5425.   RECTL  rclBoundary;
  5426.   POINTL ptlMinTrackSize;
  5427.   POINTL ptlMaxTrackSize;
  5428.   ULONG  fs;
  5429. } TRACKINFO;
  5430. typedef TRACKINFO *PTRACKINFO;
  5431.  
  5432. typedef struct
  5433. {
  5434.   POINTL sizeBounds;
  5435.   POINTL sizeMM;
  5436.   ULONG  cbLength;
  5437.   USHORT mapMode;
  5438.   USHORT reserved;
  5439.   BYTE   abData[1];
  5440. } MFP;
  5441. typedef MFP *PMFP;
  5442.  
  5443. typedef struct
  5444. {
  5445.   ULONG   cbFixedErrInfo;
  5446.   ERRORID idError;
  5447.   ULONG   cDetailLevel;
  5448.   ULONG   offaoffszMsg;
  5449.   ULONG   offBinaryData;
  5450. } ERRINFO;
  5451. typedef ERRINFO *PERRINFO;
  5452.  
  5453. typedef struct
  5454. {
  5455.   ULONG cb;
  5456.   ULONG fsContext;
  5457.   ULONG idCountry;
  5458.   ULONG usCodepage;
  5459.   ULONG usLangID;
  5460.   ULONG usSubLangID;
  5461. } CONVCONTEXT;
  5462. typedef CONVCONTEXT *PCONVCONTEXT;
  5463.  
  5464. typedef struct
  5465. {
  5466.   ULONG cb;
  5467.   PSZ   pszAppName;
  5468.   PSZ   pszTopic;
  5469.   ULONG offConvContext;
  5470. } DDEINIT;
  5471. typedef DDEINIT *PDDEINIT;
  5472.  
  5473. typedef struct
  5474. {
  5475.   ULONG  cbData;
  5476.   USHORT fsStatus;
  5477.   USHORT usFormat;
  5478.   USHORT offszItemName;
  5479.   USHORT offabData;
  5480. } DDESTRUCT;
  5481. typedef DDESTRUCT *PDDESTRUCT;
  5482.  
  5483. typedef struct
  5484. {
  5485.   USHORT idCountry;
  5486.   USHORT usCodepage;
  5487.   USHORT usLangID;
  5488.   USHORT usSubLangID;
  5489.   BYTE   abText[1];
  5490. } CPTEXT;
  5491. typedef CPTEXT *PCPTEXT;
  5492.  
  5493. typedef struct
  5494. {
  5495.   BYTE bBlue;
  5496.   BYTE bGreen;
  5497.   BYTE bRed;
  5498. } RGB;
  5499.  
  5500. typedef struct
  5501. {
  5502.   BYTE bBlue;
  5503.   BYTE bGreen;
  5504.   BYTE bRed;
  5505.   BYTE fcOptions;
  5506. } RGB2;
  5507. typedef RGB2 *PRGB2;
  5508.  
  5509. typedef struct
  5510. {
  5511.   ULONG  cbFix;
  5512.   USHORT cx;
  5513.   USHORT cy;
  5514.   USHORT cPlanes;
  5515.   USHORT cBitCount;
  5516. } BITMAPINFOHEADER;
  5517. typedef BITMAPINFOHEADER *PBITMAPINFOHEADER;
  5518.  
  5519. typedef struct
  5520. {
  5521.   ULONG  cbFix;
  5522.   USHORT cx;
  5523.   USHORT cy;
  5524.   USHORT cPlanes;
  5525.   USHORT cBitCount;
  5526.   RGB    argbColor[1];
  5527. } BITMAPINFO;
  5528. typedef BITMAPINFO *PBITMAPINFO;
  5529.  
  5530. typedef struct
  5531. {
  5532.   ULONG  cbFix;
  5533.   ULONG  cx;
  5534.   ULONG  cy;
  5535.   USHORT cPlanes;
  5536.   USHORT cBitCount;
  5537.   ULONG  ulCompression;
  5538.   ULONG  cbImage;
  5539.   ULONG  cxResolution;
  5540.   ULONG  cyResolution;
  5541.   ULONG  cclrUsed;
  5542.   ULONG  cclrImportant;
  5543.   USHORT usUnits;
  5544.   USHORT usReserved;
  5545.   USHORT usRecording;
  5546.   USHORT usRendering;
  5547.   ULONG  cSize1;
  5548.   ULONG  cSize2;
  5549.   ULONG  ulColorEncoding;
  5550.   ULONG  ulIdentifier;
  5551.   RGB2   argbColor[1];
  5552. } BITMAPINFO2;
  5553. typedef BITMAPINFO2 *PBITMAPINFO2;
  5554.  
  5555. typedef struct
  5556. {
  5557.   ULONG  cbFix;
  5558.   ULONG  cx;
  5559.   ULONG  cy;
  5560.   USHORT cPlanes;
  5561.   USHORT cBitCount;
  5562.   ULONG  ulCompression;
  5563.   ULONG  cbImage;
  5564.   ULONG  cxResolution;
  5565.   ULONG  cyResolution;
  5566.   ULONG  cclrUsed;
  5567.   ULONG  cclrImportant;
  5568.   USHORT usUnits;
  5569.   USHORT usReserved;
  5570.   USHORT usRecording;
  5571.   USHORT usRendering;
  5572.   ULONG  cSize1;
  5573.   ULONG  cSize2;
  5574.   ULONG  ulColorEncoding;
  5575.   ULONG  ulIdentifier;
  5576. } BITMAPINFOHEADER2;
  5577. typedef BITMAPINFOHEADER2 *PBITMAPINFOHEADER2;
  5578.  
  5579. typedef struct
  5580. {
  5581.   USHORT           usType;
  5582.   ULONG            cbSize;
  5583.   SHORT            xHotspot;
  5584.   SHORT            yHotspot;
  5585.   ULONG            offBits;
  5586.   BITMAPINFOHEADER bmp;
  5587. } BITMAPFILEHEADER;
  5588. typedef BITMAPFILEHEADER *PBITMAPFILEHEADER;
  5589.  
  5590. typedef struct
  5591. {
  5592.   USHORT           usType;
  5593.   ULONG            cbSize;
  5594.   ULONG            offNext;
  5595.   USHORT           cxDisplay;
  5596.   USHORT           cyDisplay;
  5597.   BITMAPFILEHEADER bfh;
  5598. } BITMAPARRAYFILEHEADER;
  5599. typedef BITMAPARRAYFILEHEADER *PBITMAPARRAYFILEHEADER;
  5600.  
  5601. typedef struct
  5602. {
  5603.   USHORT            usType;
  5604.   ULONG             cbSize;
  5605.   SHORT             xHotspot;
  5606.   SHORT             yHotspot;
  5607.   ULONG             offBits;
  5608.   BITMAPINFOHEADER2 bmp2;
  5609. } BITMAPFILEHEADER2;
  5610. typedef BITMAPFILEHEADER2 *PBITMAPFILEHEADER2;
  5611.  
  5612. typedef struct
  5613. {
  5614.   USHORT            usType;
  5615.   ULONG             cbSize;
  5616.   ULONG             offNext;
  5617.   USHORT            cxDisplay;
  5618.   USHORT            cyDisplay;
  5619.   BITMAPFILEHEADER2 bfh2;
  5620. } BITMAPARRAYFILEHEADER2;
  5621. typedef BITMAPARRAYFILEHEADER2 *PBITMAPARRAYFILEHEADER2;
  5622.  
  5623.  
  5624. #define MPVOID                  ((MPARAM)0)
  5625. #define HMQ_CURRENT             ((HMQ)1)
  5626.  
  5627. #define MPFROMP(x)              ((MPARAM)((ULONG)(x)))
  5628. #define MPFROMHWND(x)           ((MPARAM)(HWND)(x))
  5629. #define MPFROMCHAR(x)           ((MPARAM)(USHORT)(x))
  5630. #define MPFROMSHORT(x)          ((MPARAM)(USHORT)(x))
  5631. #define MPFROM2SHORT(x1,x2)     ((MPARAM)MAKELONG (x1, x2))
  5632. #define MPFROMSH2CH(s,c1,c2)    ((MPARAM)MAKELONG (s, MAKESHORT (c1, c2)))
  5633. #define MPFROMLONG(x)           ((MPARAM)(ULONG)(x))
  5634.  
  5635. #define PVOIDFROMMP(mp)         ((PVOID)(mp))
  5636. #define HWNDFROMMP(mp)          ((HWND)(mp))
  5637. #define CHAR1FROMMP(mp)         ((UCHAR)(mp))
  5638. #define CHAR2FROMMP(mp)         ((UCHAR)((ULONG)mp >> 8))
  5639. #define CHAR3FROMMP(mp)         ((UCHAR)((ULONG)mp >> 16))
  5640. #define CHAR4FROMMP(mp)         ((UCHAR)((ULONG)mp >> 24))
  5641. #define SHORT1FROMMP(mp)        ((USHORT)(ULONG)(mp))
  5642. #define SHORT2FROMMP(mp)        ((USHORT)((ULONG)mp >> 16))
  5643. #define LONGFROMMP(mp)          ((ULONG)(mp))
  5644.  
  5645. #define MRFROMP(x)              ((MRESULT)(PVOID)(x))
  5646. #define MRFROMSHORT(x)          ((MRESULT)(USHORT)(x))
  5647. #define MRFROM2SHORT(x1,x2)     ((MRESULT)MAKELONG (x1, x2))
  5648. #define MRFROMLONG(x)           ((MRESULT)(ULONG)(x))
  5649.  
  5650. #define PVOIDFROMMR(mr)         ((VOID *)(mr))
  5651. #define SHORT1FROMMR(mr)        ((USHORT)((ULONG)mr))
  5652. #define SHORT2FROMMR(mr)        ((USHORT)((ULONG)mr >> 16))
  5653. #define LONGFROMMR(mr)          ((ULONG)(mr))
  5654.  
  5655. #define CHARMSG(pmsg)           ((PCHRMSG)((PBYTE)pmsg + sizeof (ULONG)))
  5656.  
  5657. #define COMMANDMSG(pmsg)        ((PCMDMSG)((PBYTE)pmsg + sizeof (ULONG)))
  5658.  
  5659. #define MOUSEMSG(pmsg)          ((PMSEMSG)((PBYTE)pmsg + sizeof (ULONG)))
  5660.  
  5661. #define MAKEINTATOM(x)          ((PCH)MAKEULONG (x, 0xffff))
  5662.  
  5663. #define DDES_PSZITEMNAME(pddes) \
  5664.     (((PSZ)pddes) + ((PDDESTRUCT)pddes)->offszItemName)
  5665.  
  5666. #define DDES_PABDATA(pddes) \
  5667.     (((PBYTE)pddes) + ((PDDESTRUCT)pddes)->offabData)
  5668.  
  5669. #define DDEI_PCONVCONTEXT(pddei) \
  5670.     ((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext))
  5671.  
  5672. #define WinCheckButton(hwndDlg,id,usCheckState) \
  5673.     ((ULONG)WinSendDlgItemMsg (hwndDlg, id, BM_SETCHECK, \
  5674.                                MPFROMSHORT (usCheckState), (MPARAM)NULL))
  5675.  
  5676. #define WinCheckMenuItem(hwndMenu,id,fcheck) \
  5677.     ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMATTR, \
  5678.                        MPFROM2SHORT (id, TRUE), \
  5679.                        MPFROM2SHORT (MIA_CHECKED, \
  5680.                                      ((USHORT)(fcheck) ? MIA_CHECKED : 0))))
  5681. #define WinDeleteLboxItem(hwndLbox,index) \
  5682.     ((LONG)WinSendMsg (hwndLbox, LM_DELETEITEM, MPFROMLONG (index), \
  5683.                        (MPARAM)NULL))
  5684.  
  5685. #define WinEnableControl(hwndDlg,id,fEnable) \
  5686.     WinEnableWindow (WinWindowFromID (hwndDlg, id), fEnable)
  5687.  
  5688. #define WinEnableMenuItem(hwndMenu,id,fEnable) \
  5689.     ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMATTR, MPFROM2SHORT (id, TRUE), \
  5690.                        MPFROM2SHORT (MIA_DISABLED, \
  5691.                                      ((USHORT)(fEnable) ? 0 : MIA_DISABLED))))
  5692.  
  5693. #define WinInsertLboxItem(hwndLbox,index,psz) \
  5694.     ((LONG)WinSendMsg (hwndLbox, LM_INSERTITEM, MPFROMLONG(index), \
  5695.                        MPFROMP (psz)))
  5696.  
  5697. #define WinIsControlEnabled(hwndDlg,id) \
  5698.     ((BOOL)WinIsWindowEnabled (WinWindowFromID (hwndDlg, id)))
  5699.  
  5700. #define WinIsMenuItemChecked(hwndMenu,id) \
  5701.     ((BOOL)WinSendMsg (hwndMenu, MM_QUERYITEMATTR, \
  5702.                        MPFROM2SHORT (id, TRUE), \
  5703.                        MPFROMLONG (MIA_CHECKED)))
  5704.  
  5705. #define WinIsMenuItemEnabled(hwndMenu,id)  \
  5706.     (!(BOOL)WinSendMsg (hwndMenu, MM_QUERYITEMATTR, \
  5707.                         MPFROM2SHORT (id, TRUE), \
  5708.                         MPFROMLONG (MIA_DISABLED)))
  5709.  
  5710. #define WinIsMenuItemValid(hwndMenu,id) \
  5711.     ((BOOL)WinSendMsg (hwndMenu, MM_ISITEMVALID, \
  5712.                        MPFROM2SHORT (id, TRUE), MPFROMLONG (FALSE)))
  5713.  
  5714. #define WinQueryButtonCheckstate(hwndDlg,id) \
  5715.     ((ULONG)WinSendDlgItemMsg (hwndDlg, id, BM_QUERYCHECK, \
  5716.                                (MPARAM)NULL, (MPARAM)NULL))
  5717.  
  5718. #define WinQueryLboxCount(hwndLbox) \
  5719.     ((LONG)WinSendMsg (hwndLbox, LM_QUERYITEMCOUNT, (MPARAM)NULL, \
  5720.                        (MPARAM)NULL))
  5721.  
  5722. #define WinQueryLboxItemText(hwndLbox,index,psz,cchMax) \
  5723.     ((LONG)WinSendMsg (hwndLbox, LM_QUERYITEMTEXT, \
  5724.                        MPFROM2SHORT((index), (cchMax)), MPFROMP (psz)))
  5725.  
  5726. #define WinQueryLboxItemTextLength(hwndLbox,index) \
  5727.     ((SHORT)WinSendMsg (hwndLbox, LM_QUERYITEMTEXTLENGTH, \
  5728.                         MPFROMSHORT (index), (MPARAM)NULL))
  5729.  
  5730. #define WinQueryLboxSelectedItem(hwndLbox) \
  5731.     ((LONG)WinSendMsg (hwndLbox, LM_QUERYSELECTION, MPFROMLONG (LIT_FIRST), \
  5732.                        (MPARAM)NULL))
  5733.  
  5734. #define WinSetLboxItemText(hwndLbox,index,psz) \
  5735.     ((BOOL)WinSendMsg (hwndLbox, LM_SETITEMTEXT, \
  5736.                        MPFROMLONG (index), MPFROMP (psz)))
  5737.  
  5738. #define WinSetMenuItemText(hwndMenu,id,psz) \
  5739.     ((BOOL)WinSendMsg (hwndMenu, MM_SETITEMTEXT, \
  5740.                        MPFROMLONG (id), MPFROMP (psz)))
  5741.  
  5742.  
  5743. ATOM WinAddAtom (HATOMTBL hAtomTbl, CONSTPSZ pszAtomName);
  5744. BOOL WinAlarm (HWND hwndDesktop, ULONG rgfType);
  5745. HPS WinBeginPaint (HWND hwnd, HPS hps, PRECTL prclPaint);
  5746. HENUM WinBeginEnumWindows (HWND hwnd);
  5747. BOOL WinBroadcastMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, ULONG rgf);
  5748. BOOL WinCalcFrameRect (HWND hwndFrame, PRECTL prcl, BOOL fClient);
  5749. BOOL WinCallMsgFilter (HAB hab, PQMSG pqmsg, ULONG msgf);
  5750. BOOL WinCancelShutdown (HMQ hmq, BOOL fCancelAlways);
  5751. BOOL WinCloseClipbrd (HAB hab);
  5752. ULONG WinCompareStrings (HAB hab, ULONG idcp, ULONG idcc, CONSTPSZ psz1,
  5753.     CONSTPSZ psz2, ULONG reserved);
  5754. ULONG WinCopyAccelTable (HACCEL haccel, PACCELTABLE pAccelTable,
  5755.     ULONG cbCopyMax);
  5756. BOOL WinCopyRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc);
  5757. BOOL WinCpTranslateString (HAB hab, ULONG cpSrc, CONSTPSZ pszSrc, ULONG cpDst,
  5758.     ULONG cchDestMax, PSZ pchDest);
  5759. UCHAR WinCpTranslateChar (HAB hab, ULONG cpSrc, UCHAR chSrc, ULONG cpDst);
  5760. HACCEL WinCreateAccelTable (HAB hab, PACCELTABLE pAccelTable);
  5761. HATOMTBL WinCreateAtomTable (ULONG cbInitial, ULONG cBuckets);
  5762. BOOL WinCreateCursor (HWND hwnd, LONG x, LONG y, LONG cx, LONG cy,
  5763.     ULONG fs, PRECTL prclClip);
  5764. HWND WinCreateDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
  5765.     PDLGTEMPLATE pdlgt, PVOID pCreateParams);
  5766. BOOL WinCreateFrameControls (HWND hwndFrame, PFRAMECDATA pfcdata,
  5767.     CONSTPSZ pszTitle);
  5768. HWND WinCreateMenu (HWND hwndParent, PVOID lpmt);
  5769. HMQ WinCreateMsgQueue (HAB hab, SHORT cmsg);
  5770. HPOINTER WinCreatePointer (HWND hwndDesktop, HBITMAP hbmPointer, BOOL fPointer,
  5771.     LONG xHotspot, LONG yHotspot);
  5772. HPOINTER WinCreatePointerIndirect (HWND hwndDesktop,
  5773.     __const__ POINTERINFO *pptri);
  5774. HWND WinCreateStdWindow (HWND hwndParent, ULONG flStyle,
  5775.     PULONG pflCreateFlags, CONSTPSZ pszClientClass, CONSTPSZ pszTitle,
  5776.     ULONG styleClient, HMODULE hmod, USHORT idResources, PHWND phwndClient);
  5777. HWND WinCreateWindow (HWND hwndParent, CONSTPSZ pszClass, CONSTPSZ pszName,
  5778.     ULONG flStyle, SHORT x, SHORT y, SHORT cx, SHORT cy, HWND hwndOwner,
  5779.     HWND hwndInsertBehind, USHORT id, PVOID pCtlData, PVOID pPresParams);
  5780. BOOL WinDdeInitiate (HWND hwndClient, CONSTPSZ pszAppName,
  5781.     CONSTPSZ pszTopicName, __const__ CONVCONTEXT *pcctxt);
  5782. BOOL WinDdePostMsg (HWND hwndTo, HWND hwndFrom, ULONG wm,
  5783.     __const__ DDESTRUCT *pddest, ULONG flOptions);
  5784. MRESULT WinDdeRespond (HWND hwndClient, HWND hwndServer, CONSTPSZ pszAppName,
  5785.     CONSTPSZ pszTopicName, __const__ CONVCONTEXT *pcctxt);
  5786. MRESULT WinDefDlgProc (HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2);
  5787. MRESULT WinDefWindowProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  5788. ATOM WinDeleteAtom (HATOMTBL hAtomTbl, ATOM atom);
  5789. BOOL WinDeleteLibrary (HAB hab, HLIB libhandle);
  5790. BOOL WinDeleteProcedure (HAB hab, PFNWP wndproc);
  5791. BOOL WinDestroyAccelTable (HACCEL haccel);
  5792. HATOMTBL WinDestroyAtomTable (HATOMTBL hAtomTbl);
  5793. BOOL WinDestroyCursor (HWND hwnd);
  5794. BOOL WinDestroyMsgQueue (HMQ hmq);
  5795. BOOL WinDestroyPointer (HPOINTER hptr);
  5796. BOOL WinDestroyWindow (HWND hwnd);
  5797. BOOL WinDismissDlg (HWND hwndDlg, ULONG usResult);
  5798. MRESULT WinDispatchMsg (HAB hab, PQMSG pqmsg);
  5799. ULONG WinDlgBox (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
  5800.     HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
  5801. BOOL WinDrawBitmap (HPS hpsDst, HBITMAP hbm, __const__ RECTL *pwrcSrc,
  5802.     __const__ POINTL *pptlDst, LONG clrFore, LONG clrBack, ULONG fl);
  5803. BOOL WinDrawBorder (HPS hps, __const__ RECTL *prcl, LONG cx, LONG cy,
  5804.     LONG clrFore, LONG clrBack, ULONG flCmd);
  5805. BOOL WinDrawPointer (HPS hps, LONG x, LONG y, HPOINTER hptr, ULONG fs);
  5806. SHORT WinDrawText (HPS hps, SHORT cchText, CONSTPCH lpchText, PRECTL prcl,
  5807.     LONG clrFore, LONG clrBack, ULONG flCmd);
  5808. BOOL WinEmptyClipbrd (HAB hab);
  5809. BOOL  WinEnablePhysInput (HWND hwndDesktop, BOOL fEnable);
  5810. BOOL WinEnableWindow (HWND hwnd, BOOL fEnable);
  5811. BOOL WinEnableWindowUpdate (HWND hwnd, BOOL fEnable);
  5812. BOOL WinEndEnumWindows (HENUM henum);
  5813. BOOL WinEndPaint (HPS hps);
  5814. ULONG WinEnumClipbrdFmts (HAB hab, ULONG fmt);
  5815. HWND WinEnumDlgItem (HWND hwndDlg, HWND hwnd, ULONG code);
  5816. BOOL WinEqualRect (HAB hab, __const__ RECTL *prcl1, __const__ RECTL *prcl2);
  5817. LONG WinExcludeUpdateRegion (HPS hps, HWND hwnd);
  5818. BOOL WinFillRect (HPS hps, __const__ RECTL *prcl, LONG lColor);
  5819. ATOM WinFindAtom (HATOMTBL hAtomTbl, CONSTPSZ pszAtomName);
  5820. BOOL WinFlashWindow (HWND hwndFrame, BOOL fFlash);
  5821. BOOL WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange);
  5822. BOOL WinFreeErrorInfo (PERRINFO perrinfo);
  5823. HPS WinGetClipPS (HWND hwnd, HWND hwndClip, ULONG fl);
  5824. ULONG  WinGetCurrentTime (HAB hab);
  5825. BOOL WinGetDlgMsg (HWND hwndDlg, PQMSG pqmsg);
  5826. PERRINFO WinGetErrorInfo (HAB hab);
  5827. LONG WinGetKeyState (HWND hwndDesktop, LONG vkey);
  5828. ERRORID WinGetLastError (HAB hab);
  5829. BOOL WinGetMaxPosition (HWND hwnd, PSWP pswp);
  5830. BOOL WinGetMinPosition (HWND hwnd, PSWP pswp, __const__ POINTL *pptl);
  5831. BOOL WinGetMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, USHORT msgFilterFirst,
  5832.     USHORT msgFilterLast);
  5833. HWND WinGetNextWindow (HENUM henum);
  5834. LONG WinGetPhysKeyState (HWND hwndDesktop, LONG sc);
  5835. HPS WinGetPS (HWND hwnd);
  5836. HPS WinGetScreenPS (HWND hwndDesktop);
  5837. HBITMAP WinGetSysBitmap (HWND hwndDesktop, ULONG ibm);
  5838. BOOL WinInflateRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
  5839. HAB WinInitialize (USHORT fsOptions);
  5840. BOOL WinInSendMsg (HAB hab);
  5841. BOOL WinIntersectRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
  5842.     __const__ RECTL *prclSrc2);
  5843. BOOL WinInvalidateRect (HWND hwnd, PRECTL pwrc, USHORT vrf);
  5844. BOOL WinInvalidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
  5845. BOOL WinInvertRect (HPS hps, __const__ RECTL *prcl);
  5846. BOOL WinIsChild (HWND hwnd, HWND hwndParent);
  5847. BOOL WinIsPhysInputEnabled (HWND hwndDesktop);
  5848. BOOL WinIsRectEmpty (HAB hab, __const__ RECTL *prcl);
  5849. BOOL WinIsThreadActive (HAB hab);
  5850. BOOL WinIsWindow (HAB hab, HWND hwnd);
  5851. BOOL WinIsWindowEnabled (HWND hwnd);
  5852. BOOL WinIsWindowShowing (HWND hwnd);
  5853. BOOL WinIsWindowVisible (HWND hwnd);
  5854. HACCEL WinLoadAccelTable (HAB hab, HMODULE hmod, ULONG idAccelTable);
  5855. HWND WinLoadDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
  5856.     HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
  5857. HLIB  WinLoadLibrary (HAB hab, CONSTPSZ libname);
  5858. HWND WinLoadMenu (HWND hwndFrame, HMODULE hmod, ULONG idMenu);
  5859. SHORT WinLoadMessage (HAB hab, HMODULE hmod, USHORT id, SHORT cchMax,
  5860.     PSZ pchBuffer);
  5861. HPOINTER WinLoadPointer (HWND hwndDesktop, HMODULE hmod, ULONG idres);
  5862. PFNWP  WinLoadProcedure (HAB hab, HLIB libhandle, PSZ procname);
  5863. SHORT WinLoadString (HAB hab, HMODULE hmod, USHORT id, SHORT cchMax,
  5864.     PSZ pchBuffer);
  5865. BOOL WinLockVisRegions (HWND hwndDesktop, BOOL fLock);
  5866. BOOL WinLockWindowUpdate (HWND hwndDesktop, HWND hwndLockUpdate);
  5867. BOOL WinMakePoints (HAB hab, PPOINTL pwpt, ULONG cwpt);
  5868. BOOL WinMakeRect (HAB hab, PRECTL pwrc);
  5869. BOOL WinMapDlgPoints (HWND hwndDlg, PPOINTL prgwptl, ULONG cwpt,
  5870.     BOOL fCalcWindowCoords);
  5871. BOOL WinMapWindowPoints (HWND hwndFrom, HWND hwndTo, PPOINTL prgptl,
  5872.     LONG cwpt);
  5873. ULONG WinMessageBox (HWND hwndParent, HWND hwndOwner, CONSTPSZ pszText,
  5874.     CONSTPSZ pszCaption, ULONG idWindow, ULONG flStyle);
  5875. LONG WinMultWindowFromIDs (HWND hwndParent, PHWND prghwnd, ULONG idFirst,
  5876.     ULONG idLast);
  5877. PSZ WinNextChar (HAB hab, ULONG idcp, ULONG idcc, CONSTPSZ psz);
  5878. BOOL WinOffsetRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
  5879. BOOL WinOpenClipbrd (HAB hab);
  5880. HDC WinOpenWindowDC (HWND hwnd);
  5881. BOOL WinPeekMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
  5882.     ULONG msgFilterLast, ULONG fl);
  5883. BOOL WinPopupMenu (HWND hwndParent, HWND hwndOwner, HWND hwndMenu,
  5884.     LONG x, LONG y, LONG idItem, ULONG fs);
  5885. BOOL WinPostMsg (HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2);
  5886. BOOL WinPostQueueMsg (HMQ hmq, ULONG msg, MPARAM mp1, MPARAM mp2);
  5887. PSZ WinPrevChar (HAB hab, ULONG idcp, ULONG idcc, CONSTPSZ pszStart,
  5888.     CONSTPSZ psz);
  5889. ULONG WinProcessDlg (HWND hwndDlg);
  5890. BOOL WinPtInRect (HAB hab, __const__ RECTL *prcl, __const__ POINTL *pptl);
  5891. HACCEL WinQueryAccelTable (HAB hab, HWND hwndFrame);
  5892. HWND WinQueryActiveWindow (HWND hwndDesktop);
  5893. HAB WinQueryAnchorBlock (HWND hwnd);
  5894. ULONG WinQueryAtomLength (HATOMTBL hAtomTbl, ATOM atom);
  5895. ULONG WinQueryAtomName (HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer,
  5896.     ULONG cchBufferMax);
  5897. ULONG WinQueryAtomUsage (HATOMTBL hAtomTbl, ATOM atom);
  5898. HWND WinQueryCapture (HWND hwndDesktop);
  5899. BOOL WinQueryClassInfo (HAB hab, CONSTPSZ pszClassName, PCLASSINFO pClassInfo);
  5900. LONG WinQueryClassName (HWND hwnd, LONG cchMax, PCH pch);
  5901. PFN WinQueryClassThunkProc (CONSTPSZ pszClassname);
  5902. ULONG WinQueryClipbrdData (HAB hab, ULONG fmt);
  5903. BOOL WinQueryClipbrdFmtInfo (HAB hab, ULONG fmt, PULONG prgfFmtInfo);
  5904. HWND WinQueryClipbrdOwner (HAB hab);
  5905. HWND WinQueryClipbrdViewer (HAB hab);
  5906. ULONG WinQueryCp (HMQ hmq);
  5907. ULONG WinQueryCpList (HAB hab, ULONG ccpMax, PULONG prgcp);
  5908. BOOL WinQueryCursorInfo (HWND hwndDesktop, PCURSORINFO pCursorInfo);
  5909. BOOL WinQueryDesktopBkgnd (HWND hwndDesktop, PDESKTOP pdsk);
  5910. HWND WinQueryDesktopWindow (HAB hab, HDC hdc);
  5911. BOOL WinQueryDlgItemShort (HWND hwndDlg, ULONG idItem, PSHORT pResult,
  5912.     BOOL fSigned);
  5913. ULONG WinQueryDlgItemText (HWND hwndDlg, ULONG idItem, LONG cchBufferMax,
  5914.     PSZ pchBuffer);
  5915. LONG WinQueryDlgItemTextLength (HWND hwndDlg, ULONG idItem);
  5916. HWND WinQueryFocus (HWND hwndDesktop);
  5917. BOOL WinQueryMsgPos (HAB hab, PPOINTL pptl);
  5918. ULONG WinQueryMsgTime (HAB hab);
  5919. HWND WinQueryObjectWindow (HWND hwndDesktop);
  5920. HPOINTER WinQueryPointer (HWND hwndDesktop);
  5921. BOOL WinQueryPointerPos (HWND hwndDesktop, PPOINTL pptl);
  5922. BOOL WinQueryPointerInfo (HPOINTER hptr, PPOINTERINFO pPointerInfo);
  5923. ULONG WinQueryPresParam (HWND hwnd, ULONG id1, ULONG id2, PULONG pulId,
  5924.     ULONG cbBuf, PVOID pbBuf, ULONG fs);
  5925. BOOL WinQueryQueueInfo (HMQ hmq, PMQINFO pmqi, ULONG cbCopy);
  5926. ULONG WinQueryQueueStatus (HWND hwndDesktop);
  5927. HWND WinQuerySysModalWindow (HWND hwndDesktop);
  5928. LONG WinQuerySysValue (HWND hwndDesktop, LONG iSysValue);
  5929. BOOL WinQueryUpdateRect (HWND hwnd, PRECTL prcl);
  5930. LONG WinQueryUpdateRegion (HWND hwnd, HRGN hrgn);
  5931. ULONG WinQueryVersion (HAB hab);
  5932. HWND WinQueryWindow (HWND hwnd, SHORT cmd);
  5933. HDC WinQueryWindowDC (HWND hwnd);
  5934. LONG WinQueryWindowModel (HWND hwnd);
  5935. BOOL WinQueryWindowPos (HWND hwnd, PSWP pswp);
  5936. BOOL WinQueryWindowProcess (HWND hwnd, PPID ppid, PTID ptid);
  5937. PVOID WinQueryWindowPtr (HWND hwnd, LONG index);
  5938. BOOL WinQueryWindowRect (HWND hwnd, PRECTL prclDest);
  5939. LONG WinQueryWindowText (HWND hwnd, LONG cchBufferMax, PCH pchBuffer);
  5940. LONG WinQueryWindowTextLength (HWND hwnd);
  5941. PFN WinQueryWindowThunkProc (HWND hwnd);
  5942. ULONG WinQueryWindowULong (HWND hwnd, LONG index);
  5943. USHORT WinQueryWindowUShort (HWND hwnd, LONG index);
  5944. LONG WinRealizePalette (HWND hwnd, HPS hps, PULONG pcclr);
  5945. BOOL WinRegisterClass (HAB hab, CONSTPSZ pszClassName, PFNWP pfnWndProc,
  5946.     ULONG flStyle, USHORT cbWindowData);
  5947. BOOL WinRegisterUserDatatype (HAB hab, LONG datatype, LONG count, PLONG types);
  5948. BOOL WinRegisterUserMsg (HAB hab, ULONG msgid, LONG datatype1, LONG dir1,
  5949.     LONG datatype2, LONG dir2, LONG datatyper);
  5950. BOOL WinReleaseHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
  5951. BOOL WinReleasePS (HPS hps);
  5952. BOOL WinRemovePresParam (HWND hwnd, ULONG id);
  5953. ULONG WinRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
  5954. BOOL WinSaveWindowPos (HSAVEWP hsvwp, PSWP pswp, ULONG cswp);
  5955. LONG WinScrollWindow (HWND hwnd, LONG dx, LONG dy, __const__ RECTL *prclScroll,
  5956.     __const__ RECTL *prclClip, HRGN hrgnUpdate, PRECTL prclUpdate,
  5957.     ULONG rgfsw);
  5958. MRESULT WinSendDlgItemMsg (HWND hwndDlg, ULONG idItem, ULONG msg,
  5959.     MPARAM mp1, MPARAM mp2);
  5960. MRESULT WinSendMsg (HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2);
  5961. BOOL WinSetAccelTable (HAB hab, HACCEL haccel, HWND hwndFrame);
  5962. BOOL WinSetActiveWindow (HWND hwndDesktop, HWND hwnd);
  5963. BOOL WinSetCapture (HWND hwndDesktop, HWND hwnd);
  5964. BOOL WinSetClassMsgInterest (HAB hab, CONSTPSZ pszClassName, ULONG msg_class,
  5965.     LONG control);
  5966. BOOL WinSetClassThunkProc (CONSTPSZ pszClassname, PFN pfnThunkProc);
  5967. BOOL WinSetClipbrdData (HAB hab, ULONG ulData, ULONG fmt, ULONG rgfFmtInfo);
  5968. BOOL WinSetClipbrdOwner (HAB hab, HWND hwnd);
  5969. BOOL WinSetClipbrdViewer (HAB hab, HWND hwndNewClipViewer);
  5970. BOOL WinSetCp (HMQ hmq, ULONG idCodePage);
  5971. HBITMAP WinSetDesktopBkgnd (HWND hwndDesktop, __const__ DESKTOP *pdskNew);
  5972.  BOOL WinSetDlgItemShort (HWND hwndDlg, ULONG idItem, USHORT usValue,
  5973.     BOOL fSigned);
  5974. BOOL WinSetDlgItemText (HWND hwndDlg, ULONG idItem, CONSTPSZ pszText);
  5975. BOOL WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus);
  5976. BOOL WinSetHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
  5977. BOOL WinSetKeyboardStateTable (HWND hwndDesktop, PBYTE pKeyStateTable,
  5978.     BOOL fSet);
  5979. BOOL WinSetMsgInterest (HWND hwnd, ULONG msg_class, LONG control);
  5980. BOOL WinSetMsgMode (HAB hab, CONSTPSZ classname, LONG control);
  5981. BOOL WinSetMultWindowPos (HAB hab, __const__ SWP *pswp, ULONG cswp);
  5982. BOOL WinSetOwner (HWND hwnd, HWND hwndNewOwner);
  5983. BOOL WinSetParent (HWND hwnd, HWND hwndNewParent, BOOL fRedraw);
  5984. BOOL WinSetPointer (HWND hwndDesktop, HPOINTER hptrNew);
  5985. BOOL WinSetPointerOwner (HPOINTER hptr, PID pid, BOOL fDestroy);
  5986. BOOL WinSetPointerPos (HWND hwndDesktop, LONG x, LONG y);
  5987. BOOL WinSetPresParam (HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam);
  5988. BOOL WinSetRect (HAB hab, PRECTL prcl, LONG xLeft, LONG yBottom, LONG xRight,
  5989.     LONG yTop);
  5990. BOOL WinSetRectEmpty (HAB hab, PRECTL prcl);
  5991. BOOL WinSetSynchroMode (HAB hab, LONG mode);
  5992. BOOL WinSetSysColors (HWND hwndDesktop, ULONG flOptions, ULONG flFormat,
  5993.     LONG clrFirst, ULONG cclr, __const__ LONG *pclr);
  5994. BOOL WinSetSysModalWindow (HWND hwndDesktop, HWND hwnd);
  5995. BOOL WinSetSysValue (HWND hwndDesktop, LONG iSysValue, LONG lValue);
  5996. BOOL WinSetWindowBits (HWND hwnd, LONG index, ULONG flData, ULONG flMask);
  5997. BOOL WinSetWindowPos (HWND hwnd, HWND hwndInsertBehind, SHORT x, SHORT y,
  5998.     SHORT cx, SHORT cy, ULONG fl);
  5999. BOOL WinSetWindowPtr (HWND hwnd, LONG index, PVOID p);
  6000. BOOL WinSetWindowText (HWND hwnd, CONSTPSZ pszText);
  6001. BOOL WinSetWindowThunkProc (HWND hwnd, PFN pfnThunkProc);
  6002. BOOL WinSetWindowULong (HWND hwnd, LONG index, ULONG ul);
  6003. BOOL WinSetWindowUShort (HWND hwnd, LONG index, USHORT us);
  6004. BOOL WinShowCursor (HWND hwnd, BOOL fShow);
  6005. BOOL WinShowPointer (HWND hwndDesktop, BOOL fShow);
  6006. BOOL WinShowTrackRect (HWND hwnd, BOOL fShow);
  6007. BOOL WinShowWindow (HWND hwnd, BOOL fShow);
  6008. ULONG WinStartTimer (HAB hab, HWND hwnd, ULONG idTimer, ULONG dtTimeout);
  6009. BOOL WinStopTimer (HAB hab, HWND hwnd, ULONG idTimer);
  6010. PFNWP WinSubclassWindow (HWND hwnd, PFNWP pfnwp);
  6011. LONG WinSubstituteStrings (HWND hwnd, CONSTPSZ pszSrc, LONG cchDstMax,
  6012.     PSZ pszDst);
  6013. BOOL WinSubtractRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
  6014.     __const__ RECTL *prclSrc2);
  6015. BOOL WinTerminate (HAB hab);
  6016. BOOL WinTrackRect (HWND hwnd, HPS hps, PTRACKINFO pti);
  6017. BOOL WinTranslateAccel (HAB hab, HWND hwnd, HACCEL haccel, PQMSG pqmsg);
  6018. BOOL WinUnionRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
  6019.     __const__ RECTL *prclSrc2);
  6020. BOOL WinUpdateWindow (HWND hwnd);
  6021. ULONG WinUpper (HAB hab, ULONG idcp, ULONG idcc, PSZ psz);
  6022. ULONG WinUpperChar (HAB hab, ULONG idcp, ULONG idcc, ULONG c);
  6023. BOOL WinValidateRect (HWND hwnd, __const__ RECTL *prcl, BOOL fIncludeChildren);
  6024. BOOL WinValidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
  6025. ULONG WinWaitEventSem (HEV hev, ULONG ulTimeout);
  6026. BOOL WinWaitMsg (HAB hab, ULONG msgFirst, ULONG msgLast);
  6027. ULONG WinWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
  6028. HWND WinWindowFromDC (HDC hdc);
  6029. HWND WinWindowFromID (HWND hwndParent, USHORT id);
  6030. HWND WinWindowFromPoint (HWND hwnd, __const__ POINTL *pptl, BOOL fChildren);
  6031.  
  6032. /* -------------------- MULTIPLE LINE ENTRIES ----------------------------- */
  6033.  
  6034. #if defined (INCL_WINMLE)
  6035.  
  6036. #define MLS_WORDWRAP                    0x0001
  6037. #define MLS_BORDER                      0x0002
  6038. #define MLS_VSCROLL                     0x0004
  6039. #define MLS_HSCROLL                     0x0008
  6040. #define MLS_READONLY                    0x0010
  6041. #define MLS_IGNORETAB                   0x0020
  6042. #define MLS_DISABLEUNDO                 0x0040
  6043.  
  6044. #define MLFFMTRECT_FORMATRECT           0x0007
  6045. #define MLFFMTRECT_LIMITHORZ            0x0001
  6046. #define MLFFMTRECT_LIMITVERT            0x0002
  6047. #define MLFFMTRECT_MATCHWINDOW          0x0004
  6048.  
  6049. #define MLFIE_CFTEXT                    0
  6050. #define MLFIE_NOTRANS                   1
  6051. #define MLFIE_WINFMT                    2
  6052. #define MLFIE_RTF                       3
  6053.  
  6054. #define MLFEFR_RESIZE                   0x0001
  6055. #define MLFEFR_TABSTOP                  0x0002
  6056. #define MLFEFR_FONT                     0x0004
  6057. #define MLFEFR_TEXT                     0x0008
  6058. #define MLFEFR_WORDWRAP                 0x0010
  6059. #define MLFETL_TEXTBYTES                0x0020
  6060.  
  6061. #define MLFMARGIN_LEFT                  0x0001
  6062. #define MLFMARGIN_BOTTOM                0x0002
  6063. #define MLFMARGIN_RIGHT                 0x0003
  6064. #define MLFMARGIN_TOP                   0x0004
  6065.  
  6066. #define MLFQS_MINMAXSEL                 0
  6067. #define MLFQS_MINSEL                    1
  6068. #define MLFQS_MAXSEL                    2
  6069. #define MLFQS_ANCHORSEL                 3
  6070. #define MLFQS_CURSORSEL                 4
  6071.  
  6072. #define MLFCLPBD_TOOMUCHTEXT            0x0001
  6073. #define MLFCLPBD_ERROR                  0x0002
  6074.  
  6075. #define MLFSEARCH_CASESENSITIVE         0x0001
  6076. #define MLFSEARCH_SELECTMATCH           0x0002
  6077. #define MLFSEARCH_CHANGEALL             0x0004
  6078.  
  6079. #define MLM_SETTEXTLIMIT                0x01b0
  6080. #define MLM_QUERYTEXTLIMIT              0x01b1
  6081. #define MLM_SETFORMATRECT               0x01b2
  6082. #define MLM_QUERYFORMATRECT             0x01b3
  6083. #define MLM_SETWRAP                     0x01b4
  6084. #define MLM_QUERYWRAP                   0x01b5
  6085. #define MLM_SETTABSTOP                  0x01b6
  6086. #define MLM_QUERYTABSTOP                0x01b7
  6087. #define MLM_SETREADONLY                 0x01b8
  6088. #define MLM_QUERYREADONLY               0x01b9
  6089.  
  6090. #define MLM_QUERYCHANGED                0x01ba
  6091. #define MLM_SETCHANGED                  0x01bb
  6092. #define MLM_QUERYLINECOUNT              0x01bc
  6093. #define MLM_CHARFROMLINE                0x01bd
  6094. #define MLM_LINEFROMCHAR                0x01be
  6095. #define MLM_QUERYLINELENGTH             0x01bf
  6096. #define MLM_QUERYTEXTLENGTH             0x01c0
  6097.  
  6098. #define MLM_FORMAT                      0x01c1
  6099. #define MLM_SETIMPORTEXPORT             0x01c2
  6100. #define MLM_IMPORT                      0x01c3
  6101. #define MLM_EXPORT                      0x01c4
  6102. #define MLM_DELETE                      0x01c6
  6103. #define MLM_QUERYFORMATLINELENGTH       0x01c7
  6104. #define MLM_QUERYFORMATTEXTLENGTH       0x01c8
  6105. #define MLM_INSERT                      0x01c9
  6106.  
  6107. #define MLM_SETSEL                      0x01ca
  6108. #define MLM_QUERYSEL                    0x01cb
  6109. #define MLM_QUERYSELTEXT                0x01cc
  6110.  
  6111. #define MLM_QUERYUNDO                   0x01cd
  6112. #define MLM_UNDO                        0x01ce
  6113. #define MLM_RESETUNDO                   0x01cf
  6114.  
  6115. #define MLM_QUERYFONT                   0x01d0
  6116. #define MLM_SETFONT                     0x01d1
  6117. #define MLM_SETTEXTCOLOR                0x01d2
  6118. #define MLM_QUERYTEXTCOLOR              0x01d3
  6119. #define MLM_SETBACKCOLOR                0x01d4
  6120. #define MLM_QUERYBACKCOLOR              0x01d5
  6121.  
  6122. #define MLM_QUERYFIRSTCHAR              0x01d6
  6123. #define MLM_SETFIRSTCHAR                0x01d7
  6124.  
  6125. #define MLM_CUT                         0x01d8
  6126. #define MLM_COPY                        0x01d9
  6127. #define MLM_PASTE                       0x01da
  6128. #define MLM_CLEAR                       0x01db
  6129.  
  6130. #define MLM_ENABLEREFRESH               0x01dc
  6131. #define MLM_DISABLEREFRESH              0x01dd
  6132.  
  6133. #define MLM_SEARCH                      0x01de
  6134. #define MLM_QUERYIMPORTEXPORT           0x01df
  6135.  
  6136. #define MLN_OVERFLOW                    0x0001
  6137. #define MLN_PIXHORZOVERFLOW             0x0002
  6138. #define MLN_PIXVERTOVERFLOW             0x0003
  6139. #define MLN_TEXTOVERFLOW                0x0004
  6140. #define MLN_VSCROLL                     0x0005
  6141. #define MLN_HSCROLL                     0x0006
  6142. #define MLN_CHANGE                      0x0007
  6143. #define MLN_SETFOCUS                    0x0008
  6144. #define MLN_KILLFOCUS                   0x0009
  6145. #define MLN_MARGIN                      0x000a
  6146. #define MLN_SEARCHPAUSE                 0x000b
  6147. #define MLN_MEMERROR                    0x000c
  6148. #define MLN_UNDOOVERFLOW                0x000d
  6149. #define MLN_CLPBDFAIL                   0x000f
  6150.  
  6151.  
  6152. typedef LONG IPT;
  6153. typedef IPT *PIPT;
  6154. typedef LONG PIX;
  6155. typedef ULONG LINE;
  6156.  
  6157.  
  6158. typedef struct
  6159. {
  6160.   LONG cxFormat;
  6161.   LONG cyFormat;
  6162. } MLEFORMATRECT;
  6163. typedef MLEFORMATRECT *PFORMATRECT;
  6164.  
  6165. typedef struct
  6166. {
  6167.   USHORT cbCtlData;
  6168.   USHORT afIEFormat;
  6169.   ULONG  cchText;
  6170.   IPT    iptAnchor;
  6171.   IPT    iptCursor;
  6172.   LONG   cxFormat;
  6173.   LONG   cyFormat;
  6174.   ULONG  afFormatFlags;
  6175. } MLECTLDATA;
  6176. typedef MLECTLDATA *PMLECTLDATA;
  6177.  
  6178. typedef struct
  6179. {
  6180.   ULONG afErrInd;
  6181.   LONG  nBytesOver;
  6182.   LONG  pixHorzOver;
  6183.   LONG  pixVertOver;
  6184. } MLEOVERFLOW;
  6185. typedef MLEOVERFLOW *POVERFLOW;
  6186.  
  6187. typedef struct
  6188. {
  6189.   USHORT afMargins;
  6190.   USHORT usMouMsg;
  6191.   IPT    iptNear;
  6192. } MLEMARGSTRUCT;
  6193. typedef MLEMARGSTRUCT *PMARGSTRUCT;
  6194.  
  6195. typedef struct
  6196. {
  6197.   USHORT cb;
  6198.   PCHAR  pchFind;
  6199.   PCHAR  pchReplace;
  6200.   SHORT  cchFind;
  6201.   SHORT  cchReplace;
  6202.   IPT    iptStart;
  6203.   IPT    iptStop;
  6204.   USHORT cchFound;
  6205. } MLE_SEARCHDATA;
  6206. typedef MLE_SEARCHDATA *PMLE_SEARCHDATA;
  6207.  
  6208. #endif /* INCL_WINMLE */
  6209.  
  6210. /* --------------- GRAPHICS PROGRAMMING INTERFACE ------------------------- */
  6211.  
  6212. #define GPI_ERROR                       0
  6213. #define GPI_OK                          1
  6214. #define GPI_ALTERROR                    (-1)
  6215.  
  6216. #define GPI_HITS                        2
  6217.  
  6218. #define HDC_ERROR                       ((HDC)(-1))
  6219.  
  6220. #define HRGN_ERROR                      ((HRGN)(-1))
  6221.  
  6222. #define HBM_ERROR                       ((HBITMAP)(-1))
  6223.  
  6224. #define BMB_ERROR                       (-1)
  6225.  
  6226. #define CLR_ERROR                       (-255)
  6227. #define CLR_NOINDEX                     (-254)
  6228. #define CLR_FALSE                       (-5)
  6229. #define CLR_TRUE                        (-4)
  6230. #define CLR_DEFAULT                     (-3)
  6231. #define CLR_WHITE                       (-2)
  6232. #define CLR_BLACK                       (-1)
  6233. #define CLR_BACKGROUND                  0
  6234. #define CLR_BLUE                        1
  6235. #define CLR_RED                         2
  6236. #define CLR_PINK                        3
  6237. #define CLR_GREEN                       4
  6238. #define CLR_CYAN                        5
  6239. #define CLR_YELLOW                      6
  6240. #define CLR_NEUTRAL                     7
  6241. #define CLR_DARKGRAY                    8
  6242. #define CLR_DARKBLUE                    9
  6243. #define CLR_DARKRED                     10
  6244. #define CLR_DARKPINK                    11
  6245. #define CLR_DARKGREEN                   12
  6246. #define CLR_DARKCYAN                    13
  6247. #define CLR_BROWN                       14
  6248. #define CLR_PALEGRAY                    15
  6249.  
  6250. #define RGB_ERROR                       (-255)
  6251. #define RGB_BLACK                       0x00000000
  6252. #define RGB_BLUE                        0x000000ff
  6253. #define RGB_GREEN                       0x0000ff00
  6254. #define RGB_CYAN                        0x0000ffff
  6255. #define RGB_RED                         0x00ff0000
  6256. #define RGB_PINK                        0x00ff00ff
  6257. #define RGB_YELLOW                      0x00ffff00
  6258. #define RGB_WHITE                       0x00ffffff
  6259.  
  6260. #define GPIA_NOASSOC                    0x0000
  6261. #define GPIA_ASSOC                      0x4000
  6262.  
  6263. #define GPIF_DEFAULT                    0x0000
  6264. #define GPIF_SHORT                      0x0100
  6265. #define GPIF_LONG                       0x0200
  6266.  
  6267. #define GPIT_NORMAL                     0x0000
  6268. #define GPIT_MICRO                      0x1000
  6269.  
  6270. #define GRES_ATTRS                      0x0001
  6271. #define GRES_SEGMENTS                   0x0002
  6272. #define GRES_ALL                        0x0004
  6273.  
  6274. #define GPIE_SEGMENT                    0
  6275. #define GPIE_ELEMENT                    1
  6276. #define GPIE_DATA                       2
  6277.  
  6278. #define PS_UNITS                        0x00fc
  6279. #define PS_FORMAT                       0x0f00
  6280. #define PS_TYPE                         0x1000
  6281. #define PS_MODE                         0x2000
  6282. #define PS_ASSOCIATE                    0x4000
  6283. #define PS_NORESET                      0x8000
  6284.  
  6285. #define PRIM_LINE                       1
  6286. #define PRIM_CHAR                       2
  6287. #define PRIM_MARKER                     3
  6288. #define PRIM_AREA                       4
  6289. #define PRIM_IMAGE                      5
  6290.  
  6291. #define PU_ARBITRARY                    0x0004
  6292. #define PU_PELS                         0x0008
  6293. #define PU_LOMETRIC                     0x000c
  6294. #define PU_HIMETRIC                     0x0010
  6295. #define PU_LOENGLISH                    0x0014
  6296. #define PU_HIENGLISH                    0x0018
  6297. #define PU_TWIPS                        0x001c
  6298.  
  6299. #define ROP_SRCCOPY                     0x00cc
  6300. #define ROP_SRCPAINT                    0x00ee
  6301. #define ROP_SRCAND                      0x0088
  6302. #define ROP_SRCINVERT                   0x0066
  6303. #define ROP_SRCERASE                    0x0044
  6304. #define ROP_NOTSRCCOPY                  0x0033
  6305. #define ROP_NOTSRCERASE                 0x0011
  6306. #define ROP_MERGECOPY                   0x00c0
  6307. #define ROP_MERGEPAINT                  0x00bb
  6308. #define ROP_PATCOPY                     0x00f0
  6309. #define ROP_PATPAINT                    0x00fb
  6310. #define ROP_PATINVERT                   0x005a
  6311. #define ROP_DSTINVERT                   0x0055
  6312. #define ROP_ZERO                        0x0000
  6313. #define ROP_ONE                         0x00ff
  6314.  
  6315. #define BBO_OR                          0
  6316. #define BBO_AND                         1
  6317. #define BBO_IGNORE                      2
  6318. #define BBO_PAL_COLORS                  4
  6319. #define BBO_NO_COLOR_INFO               8
  6320.  
  6321. #define FF_BOUNDARY                     0
  6322. #define FF_SURFACE                      1
  6323.  
  6324. #define AM_ERROR                        (-1)
  6325. #define AM_PRESERVE                     0
  6326. #define AM_NOPRESERVE                   1
  6327.  
  6328. #define FM_ERROR                        (-1)
  6329. #define FM_DEFAULT                      0
  6330. #define FM_OR                           1
  6331. #define FM_OVERPAINT                    2
  6332. #define FM_LEAVEALONE                   5
  6333.  
  6334. #define FM_XOR                          4
  6335. #define FM_AND                          6
  6336. #define FM_SUBTRACT                     7
  6337. #define FM_MASKSRCNOT                   8
  6338. #define FM_ZERO                         9
  6339. #define FM_NOTMERGESRC                  10
  6340. #define FM_NOTXORSRC                    11
  6341. #define FM_INVERT                       12
  6342. #define FM_MERGESRCNOT                  13
  6343. #define FM_NOTCOPYSRC                   14
  6344. #define FM_MERGENOTSRC                  15
  6345. #define FM_NOTMASKSRC                   16
  6346. #define FM_ONE                          17
  6347.  
  6348. #define BM_ERROR                        (-1)
  6349. #define BM_DEFAULT                      0
  6350. #define BM_OR                           1
  6351. #define BM_OVERPAINT                    2
  6352. #define BM_LEAVEALONE                   5
  6353.  
  6354. #define BM_XOR                          4
  6355. #define BM_AND                          6
  6356. #define BM_SUBTRACT                     7
  6357. #define BM_MASKSRCNOT                   8
  6358. #define BM_ZERO                         9
  6359. #define BM_NOTMERGESRC                  10
  6360. #define BM_NOTXORSRC                    11
  6361. #define BM_INVERT                       12
  6362. #define BM_MERGESRCNOT                  13
  6363. #define BM_NOTCOPYSRC                   14
  6364. #define BM_MERGENOTSRC                  15
  6365. #define BM_NOTMASKSRC                   16
  6366. #define BM_ONE                          17
  6367. #define BM_SRCTRANSPARENT               18
  6368. #define BM_DESTTRANSPARENT              19
  6369.  
  6370. #define LINETYPE_ERROR                  (-1)
  6371. #define LINETYPE_DEFAULT                0
  6372. #define LINETYPE_DOT                    1
  6373. #define LINETYPE_SHORTDASH              2
  6374. #define LINETYPE_DASHDOT                3
  6375. #define LINETYPE_DOUBLEDOT              4
  6376. #define LINETYPE_LONGDASH               5
  6377. #define LINETYPE_DASHDOUBLEDOT          6
  6378. #define LINETYPE_SOLID                  7
  6379. #define LINETYPE_INVISIBLE              8
  6380. #define LINETYPE_ALTERNATE              9
  6381.  
  6382. #define LINEWIDTH_ERROR                 (-1)
  6383. #define LINEWIDTH_DEFAULT               0L
  6384. #define LINEWIDTH_NORMAL                0x00010000
  6385. #define LINEWIDTH_THICK                 0x00020000
  6386.  
  6387. #define LINEWIDTHGEOM_ERROR             (-1)
  6388.  
  6389. #define LINEEND_ERROR                   (-1)
  6390. #define LINEEND_DEFAULT                 0
  6391. #define LINEEND_FLAT                    1
  6392. #define LINEEND_SQUARE                  2
  6393. #define LINEEND_ROUND                   3
  6394.  
  6395. #define LINEJOIN_ERROR                  (-1)
  6396. #define LINEJOIN_DEFAULT                0
  6397. #define LINEJOIN_BEVEL                  1
  6398. #define LINEJOIN_ROUND                  2
  6399. #define LINEJOIN_MITRE                  3
  6400.  
  6401. #define CHDIRN_ERROR                    (-1)
  6402. #define CHDIRN_DEFAULT                  0
  6403. #define CHDIRN_LEFTRIGHT                1
  6404. #define CHDIRN_TOPBOTTOM                2
  6405. #define CHDIRN_RIGHTLEFT                3
  6406. #define CHDIRN_BOTTOMTOP                4
  6407.  
  6408. #define TA_NORMAL_HORIZ                 0x0001
  6409. #define TA_LEFT                         0x0002
  6410. #define TA_CENTER                       0x0003
  6411. #define TA_RIGHT                        0x0004
  6412. #define TA_STANDARD_HORIZ               0x0005
  6413. #define TA_NORMAL_VERT                  0x0100
  6414. #define TA_TOP                          0x0200
  6415. #define TA_HALF                         0x0300
  6416. #define TA_BASE                         0x0400
  6417. #define TA_BOTTOM                       0x0500
  6418. #define TA_STANDARD_VERT                0x0600
  6419.  
  6420. #define CM_ERROR                        (-1)
  6421. #define CM_DEFAULT                      0
  6422. #define CM_MODE1                        1
  6423. #define CM_MODE2                        2
  6424. #define CM_MODE3                        3
  6425.  
  6426. #define MARKSYM_ERROR                   (-1)
  6427. #define MARKSYM_DEFAULT                 0
  6428. #define MARKSYM_CROSS                   1
  6429. #define MARKSYM_PLUS                    2
  6430. #define MARKSYM_DIAMOND                 3
  6431. #define MARKSYM_SQUARE                  4
  6432. #define MARKSYM_SIXPOINTSTAR            5
  6433. #define MARKSYM_EIGHTPOINTSTAR          6
  6434. #define MARKSYM_SOLIDDIAMOND            7
  6435. #define MARKSYM_SOLIDSQUARE             8
  6436. #define MARKSYM_DOT                     9
  6437. #define MARKSYM_SMALLCIRCLE             10
  6438. #define MARKSYM_BLANK                   64
  6439.  
  6440. #define TXTBOX_TOPLEFT                  0
  6441. #define TXTBOX_BOTTOMLEFT               1
  6442. #define TXTBOX_TOPRIGHT                 2
  6443. #define TXTBOX_BOTTOMRIGHT              3
  6444. #define TXTBOX_CONCAT                   4
  6445. #define TXTBOX_COUNT                    5
  6446.  
  6447. #define PVIS_ERROR                      0
  6448. #define PVIS_INVISIBLE                  1
  6449. #define PVIS_VISIBLE                    2
  6450.  
  6451. #define RVIS_ERROR                      0
  6452. #define RVIS_INVISIBLE                  1
  6453. #define RVIS_PARTIAL                    2
  6454. #define RVIS_VISIBLE                    3
  6455.  
  6456. #define FONT_DEFAULT                    1
  6457. #define FONT_MATCH                      2
  6458.  
  6459. #define LCIDT_FONT                      6
  6460. #define LCIDT_BITMAP                    7
  6461.  
  6462. #define LCID_ALL                        (-1)
  6463.  
  6464. #define CHS_OPAQUE                      0x0001
  6465. #define CHS_VECTOR                      0x0002
  6466. #define CHS_LEAVEPOS                    0x0008
  6467. #define CHS_CLIP                        0x0010
  6468. #define CHS_UNDERSCORE                  0x0200
  6469. #define CHS_STRIKEOUT                   0x0400
  6470.  
  6471. #define FWEIGHT_DONT_CARE               0
  6472. #define FWEIGHT_ULTRA_LIGHT             1
  6473. #define FWEIGHT_EXTRA_LIGHT             2
  6474. #define FWEIGHT_LIGHT                   3
  6475. #define FWEIGHT_SEMI_LIGHT              4
  6476. #define FWEIGHT_NORMAL                  5
  6477. #define FWEIGHT_SEMI_BOLD               6
  6478. #define FWEIGHT_BOLD                    7
  6479. #define FWEIGHT_EXTRA_BOLD              8
  6480. #define FWEIGHT_ULTRA_BOLD              9
  6481.  
  6482. #define FWIDTH_DONT_CARE                0
  6483. #define FWIDTH_ULTRA_CONDENSED          1
  6484. #define FWIDTH_EXTRA_CONDENSED          2
  6485. #define FWIDTH_CONDENSED                3
  6486. #define FWIDTH_SEMI_CONDENSED           4
  6487. #define FWIDTH_NORMAL                   5
  6488. #define FWIDTH_SEMI_EXPANDED            6
  6489. #define FWIDTH_EXPANDED                 7
  6490. #define FWIDTH_EXTRA_EXPANDED           8
  6491. #define FWIDTH_ULTRA_EXPANDED           9
  6492.  
  6493. #define FTYPE_ITALIC                    0x0001
  6494. #define FTYPE_ITALIC_DONT_CARE          0x0002
  6495. #define FTYPE_OBLIQUE                   0x0004
  6496. #define FTYPE_OBLIQUE_DONT_CARE         0x0008
  6497. #define FTYPE_ROUNDED                   0x0010
  6498. #define FTYPE_ROUNDED_DONT_CARE         0x0020
  6499.  
  6500. #define QFA_PUBLIC                      1
  6501. #define QFA_PRIVATE                     2
  6502. #define QFA_ERROR                       GPI_ALTERROR
  6503.  
  6504. #define QF_PUBLIC                       0x0001
  6505. #define QF_PRIVATE                      0x0002
  6506. #define QF_NO_GENERIC                   0x0004
  6507. #define QF_NO_DEVICE                    0x0008
  6508.  
  6509. #define QCD_LCT_FORMAT                  0
  6510. #define QCD_LCT_LOINDEX                 1
  6511. #define QCD_LCT_HIINDEX                 2
  6512. #define QCD_LCT_OPTIONS                 3
  6513.  
  6514. #define QLCT_ERROR                      (-1)
  6515. #define QLCT_RGB                        (-2)
  6516.  
  6517. #define QLCT_NOTLOADED                  (-1)
  6518.  
  6519. #define PAL_ERROR                       (-1)
  6520.  
  6521. #define PC_RESERVED                     0x01
  6522. #define PC_EXPLICIT                     0x02
  6523. #define PC_NOCOLLAPSE                   0x04
  6524.  
  6525. #define SCP_ALTERNATE                   0
  6526. #define SCP_WINDING                     2
  6527. #define SCP_AND                         4
  6528. #define SCP_RESET                       0
  6529. #define SCP_INCL                        0
  6530. #define SCP_EXCL                        8
  6531.  
  6532. #define MPATH_STROKE                    6
  6533.  
  6534. #define FPATH_ALTERNATE                 0
  6535. #define FPATH_WINDING                   2
  6536. #define FPATH_INCL                      0
  6537. #define FPATH_EXCL                      8
  6538.  
  6539. #define DCTL_ERASE                      1
  6540. #define DCTL_DISPLAY                    2
  6541. #define DCTL_BOUNDARY                   3
  6542. #define DCTL_DYNAMIC                    4
  6543. #define DCTL_CORRELATE                  5
  6544.  
  6545. #define DCTL_ERROR                      (-1)
  6546. #define DCTL_OFF                        0
  6547. #define DCTL_ON                         1
  6548.  
  6549. #define DM_ERROR                        0
  6550. #define DM_DRAW                         1
  6551. #define DM_RETAIN                       2
  6552. #define DM_DRAWANDRETAIN                3
  6553.  
  6554. #define SDW_ERROR                       (-1)
  6555. #define SDW_OFF                         0
  6556. #define SDW_ON                          1
  6557.  
  6558. #define PICKAP_DEFAULT                  0
  6559. #define PICKAP_REC                      2
  6560.  
  6561. #define PICKSEL_VISIBLE                 0
  6562. #define PICKSEL_ALL                     1
  6563.  
  6564. #define DFORM_NOCONV                    0
  6565.  
  6566. #define DFORM_S370SHORT                 1
  6567. #define DFORM_PCSHORT                   2
  6568. #define DFORM_PCLONG                    4
  6569.  
  6570. #define ATTR_ERROR                      (-1)
  6571. #define ATTR_DETECTABLE                 1
  6572. #define ATTR_VISIBLE                    2
  6573. #define ATTR_CHAINED                    6
  6574. #define ATTR_DYNAMIC                    8
  6575. #define ATTR_FASTCHAIN                  9
  6576. #define ATTR_PROP_DETECTABLE            10
  6577. #define ATTR_PROP_VISIBLE               11
  6578.  
  6579. #define ATTR_OFF                        0
  6580. #define ATTR_ON                         1
  6581.  
  6582. #define LOWER_PRI                       (-1)
  6583. #define HIGHER_PRI                      1
  6584.  
  6585. #define CVTC_WORLD                      1
  6586. #define CVTC_MODEL                      2
  6587. #define CVTC_DEFAULTPAGE                3
  6588. #define CVTC_PAGE                       4
  6589. #define CVTC_DEVICE                     5
  6590.  
  6591. #define TRANSFORM_REPLACE               0
  6592. #define TRANSFORM_ADD                   1
  6593. #define TRANSFORM_PREEMPT               2
  6594.  
  6595. #define SEGEM_ERROR                     0
  6596. #define SEGEM_INSERT                    1
  6597. #define SEGEM_REPLACE                   2
  6598.  
  6599. #define POLYGON_NOBOUNDARY              0x0000
  6600. #define POLYGON_BOUNDARY                0x0001
  6601.  
  6602. #define POLYGON_ALTERNATE               0x0000
  6603. #define POLYGON_WINDING                 0x0002
  6604.  
  6605. #define POLYGON_INCL                    0x0000
  6606. #define POLYGON_EXCL                    0x0008
  6607.  
  6608. #define LCOL_RESET                      0x0001
  6609. #define LCOL_REALIZABLE                 0x0002
  6610. #define LCOL_PURECOLOR                  0x0004
  6611. #define LCOL_OVERRIDE_DEFAULT_COLORS    0x0008
  6612. #define LCOL_REALIZED                   0x0010
  6613.  
  6614. #define LCOLF_DEFAULT                   0
  6615. #define LCOLF_INDRGB                    1
  6616. #define LCOLF_CONSECRGB                 2
  6617. #define LCOLF_RGB                       3
  6618. #define LCOLF_PALETTE                   4
  6619.  
  6620. #define LCOLOPT_REALIZED                0x0001
  6621. #define LCOLOPT_INDEX                   0x0002
  6622.  
  6623. #define BA_NOBOUNDARY                   0
  6624. #define BA_BOUNDARY                     0x0001
  6625.  
  6626. #define BA_ALTERNATE                    0
  6627. #define BA_WINDING                      0x0002
  6628.  
  6629. #define BA_INCL                         0
  6630. #define BA_EXCL                         8
  6631.  
  6632. #define DRO_FILL                        1
  6633. #define DRO_OUTLINE                     2
  6634. #define DRO_OUTLINEFILL                 3
  6635.  
  6636. #define PATSYM_ERROR                    (-1)
  6637. #define PATSYM_DEFAULT                  0
  6638. #define PATSYM_DENSE1                   1
  6639. #define PATSYM_DENSE2                   2
  6640. #define PATSYM_DENSE3                   3
  6641. #define PATSYM_DENSE4                   4
  6642. #define PATSYM_DENSE5                   5
  6643. #define PATSYM_DENSE6                   6
  6644. #define PATSYM_DENSE7                   7
  6645. #define PATSYM_DENSE8                   8
  6646. #define PATSYM_VERT                     9
  6647. #define PATSYM_HORIZ                    10
  6648. #define PATSYM_DIAG1                    11
  6649. #define PATSYM_DIAG2                    12
  6650. #define PATSYM_DIAG3                    13
  6651. #define PATSYM_DIAG4                    14
  6652. #define PATSYM_NOSHADE                  15
  6653. #define PATSYM_SOLID                    16
  6654. #define PATSYM_HALFTONE                 17
  6655. #define PATSYM_HATCH                    18
  6656. #define PATSYM_DIAGHATCH                19
  6657. #define PATSYM_BLANK                    64
  6658.  
  6659. #define LCID_ERROR                      (-1)
  6660. #define LCID_DEFAULT                    0
  6661.  
  6662. #define CBM_INIT                        0x0004
  6663.  
  6664. #define CRGN_OR                         1
  6665. #define CRGN_COPY                       2
  6666. #define CRGN_XOR                        4
  6667. #define CRGN_AND                        6
  6668. #define CRGN_DIFF                       7
  6669.  
  6670. #define RGN_ERROR                       0
  6671. #define RGN_NULL                        1
  6672. #define RGN_RECT                        2
  6673. #define RGN_COMPLEX                     3
  6674.  
  6675. #define PRGN_ERROR                      0
  6676. #define PRGN_OUTSIDE                    1
  6677. #define PRGN_INSIDE                     2
  6678.  
  6679. #define RRGN_ERROR                      0
  6680. #define RRGN_OUTSIDE                    1
  6681. #define RRGN_PARTIAL                    2
  6682. #define RRGN_INSIDE                     3
  6683.  
  6684. #define EQRGN_ERROR                     0
  6685. #define EQRGN_NOTEQUAL                  1
  6686. #define EQRGN_EQUAL                     2
  6687.  
  6688. #define RECTDIR_LFRT_TOPBOT             1
  6689. #define RECTDIR_RTLF_TOPBOT             2
  6690. #define RECTDIR_LFRT_BOTTOP             3
  6691. #define RECTDIR_RTLF_BOTTOP             4
  6692.  
  6693. #define PMF_SEGBASE                     0
  6694. #define PMF_LOADTYPE                    1
  6695. #define PMF_RESOLVE                     2
  6696. #define PMF_LCIDS                       3
  6697. #define PMF_RESET                       4
  6698. #define PMF_SUPPRESS                    5
  6699. #define PMF_COLORTABLES                 6
  6700. #define PMF_COLORREALIZABLE             7
  6701. #define PMF_DEFAULTS                    8
  6702. #define PMF_DELETEOBJECTS               9
  6703.  
  6704. #define RS_DEFAULT                      0
  6705. #define RS_NODISCARD                    1
  6706. #define LC_DEFAULT                      0
  6707. #define LC_NOLOAD                       1
  6708. #define LC_LOADDISC                     3
  6709. #define LT_DEFAULT                      0
  6710. #define LT_NOMODIFY                     1
  6711. #define LT_ORIGINALVIEW                 4
  6712. #define RES_DEFAULT                     0
  6713. #define RES_NORESET                     1
  6714. #define RES_RESET                       2
  6715. #define SUP_DEFAULT                     0
  6716. #define SUP_NOSUPPRESS                  1
  6717. #define SUP_SUPPRESS                    2
  6718. #define CTAB_DEFAULT                    0
  6719. #define CTAB_NOMODIFY                   1
  6720. #define CTAB_REPLACE                    3
  6721. #define CTAB_REPLACEPALETTE             4
  6722. #define CREA_DEFAULT                    0
  6723. #define CREA_REALIZE                    1
  6724. #define CREA_NOREALIZE                  2
  6725. #define CREA_DOREALIZE                  3
  6726.  
  6727. #define DDEF_DEFAULT                    0
  6728. #define DDEF_IGNORE                     1
  6729. #define DDEF_LOADDISC                   3
  6730. #define DOBJ_DEFAULT                    0
  6731. #define DOBJ_NODELETE                   1
  6732. #define DOBJ_DELETE                     2
  6733. #define RSP_DEFAULT                     0
  6734. #define RSP_NODISCARD                   1
  6735.  
  6736. #define LBB_COLOR                       0x0001
  6737. #define LBB_BACK_COLOR                  0x0002
  6738. #define LBB_MIX_MODE                    0x0004
  6739. #define LBB_BACK_MIX_MODE               0x0008
  6740. #define LBB_WIDTH                       0x0010
  6741. #define LBB_GEOM_WIDTH                  0x0020
  6742. #define LBB_TYPE                        0x0040
  6743. #define LBB_END                         0x0080
  6744. #define LBB_JOIN                        0x0100
  6745.  
  6746. #define CBB_COLOR                       0x0001
  6747. #define CBB_BACK_COLOR                  0x0002
  6748. #define CBB_MIX_MODE                    0x0004
  6749. #define CBB_BACK_MIX_MODE               0x0008
  6750. #define CBB_SET                         0x0010
  6751. #define CBB_MODE                        0x0020
  6752. #define CBB_BOX                         0x0040
  6753. #define CBB_ANGLE                       0x0080
  6754. #define CBB_SHEAR                       0x0100
  6755. #define CBB_DIRECTION                   0x0200
  6756. #define CBB_TEXT_ALIGN                  0x0400
  6757. #define CBB_EXTRA                       0x0800
  6758. #define CBB_BREAK_EXTRA                 0x1000
  6759.  
  6760. #define MBB_COLOR                       0x0001
  6761. #define MBB_BACK_COLOR                  0x0002
  6762. #define MBB_MIX_MODE                    0x0004
  6763. #define MBB_BACK_MIX_MODE               0x0008
  6764. #define MBB_SET                         0x0010
  6765. #define MBB_SYMBOL                      0x0020
  6766. #define MBB_BOX                         0x0040
  6767.  
  6768. #define ABB_COLOR                       0x0001
  6769. #define ABB_BACK_COLOR                  0x0002
  6770. #define ABB_MIX_MODE                    0x0004
  6771. #define ABB_BACK_MIX_MODE               0x0008
  6772. #define ABB_SET                         0x0010
  6773. #define ABB_SYMBOL                      0x0020
  6774. #define ABB_REF_POINT                   0x0040
  6775.  
  6776. #define IBB_COLOR                       0x0001
  6777. #define IBB_BACK_COLOR                  0x0002
  6778. #define IBB_MIX_MODE                    0x0004
  6779. #define IBB_BACK_MIX_MODE               0x0008
  6780.  
  6781.  
  6782. typedef PVOID PBUNDLE;
  6783.  
  6784. typedef LONG FIXED;
  6785. typedef FIXED *PFIXED;
  6786.  
  6787.  
  6788. typedef struct
  6789. {
  6790.   LONG cx;
  6791.   LONG cy;
  6792. } SIZEL;
  6793. typedef SIZEL *PSIZEL;
  6794.  
  6795. typedef struct
  6796. {
  6797.   ULONG ircStart;
  6798.   ULONG crc;
  6799.   ULONG crcReturned;
  6800.   ULONG ulDirection;
  6801. } RGNRECT;
  6802. typedef RGNRECT *PRGNRECT;
  6803.  
  6804. typedef struct
  6805. {
  6806.   FIXED fxM11;
  6807.   FIXED fxM12;
  6808.   LONG  lM13;
  6809.   FIXED fxM21;
  6810.   FIXED fxM22;
  6811.   LONG  lM23;
  6812.   LONG  lM31;
  6813.   LONG  lM32;
  6814.   LONG  lM33;
  6815. } MATRIXLF;
  6816. typedef MATRIXLF *PMATRIXLF;
  6817.  
  6818. typedef struct
  6819. {
  6820.   LONG lP;
  6821.   LONG lQ;
  6822.   LONG lR;
  6823.   LONG lS;
  6824. } ARCPARAMS;
  6825. typedef ARCPARAMS *PARCPARAMS;
  6826.  
  6827. typedef struct
  6828. {
  6829.   FIXED cx;
  6830.   FIXED cy;
  6831. } SIZEF;
  6832. typedef SIZEF *PSIZEF;
  6833.  
  6834. typedef struct
  6835. {
  6836.   ULONG   ulPoints;
  6837.   PPOINTL aPointl;
  6838. } POLYGON;
  6839. typedef POLYGON *PPOLYGON;
  6840.  
  6841. typedef struct
  6842. {
  6843.   ULONG   ulPolys;
  6844.   POLYGON aPolygon[1];
  6845. } POLYSET;
  6846. typedef POLYSET *PPOLYSET;
  6847.  
  6848. typedef struct
  6849. {
  6850.   LONG x;
  6851.   LONG y;
  6852. } GRADIENTL;
  6853. typedef GRADIENTL *PGRADIENTL;
  6854.  
  6855. typedef struct
  6856. {
  6857.   SHORT sFirstChar;
  6858.   SHORT sSecondChar;
  6859.   LONG  lKerningAmount;
  6860. } KERNINGPAIRS;
  6861. typedef KERNINGPAIRS *PKERNINGPAIRS;
  6862.  
  6863. typedef struct
  6864. {
  6865.   USHORT usSize;
  6866.   USHORT usWeightClass;
  6867.   USHORT usWidthClass;
  6868.   USHORT usReserved;
  6869.   ULONG  flOptions;
  6870. } FACENAMEDESC;
  6871. typedef FACENAMEDESC *PFACENAMEDESC;
  6872.  
  6873. typedef CHAR FFDESCS[2][FACESIZE];
  6874. typedef FFDESCS *PFFDESCS;
  6875.  
  6876. typedef struct
  6877. {
  6878.   ULONG cbLength;
  6879.   ULONG cbFacenameOffset;
  6880.   BYTE  abFamilyName[1];
  6881. } FFDESCS2;
  6882. typedef FFDESCS2 *PFFDESCS2;
  6883.  
  6884.  
  6885. typedef struct
  6886. {
  6887.   LONG   lColor;
  6888.   LONG   lBackColor;
  6889.   USHORT usMixMode;
  6890.   USHORT usBackMixMode;
  6891.   FIXED  fxWidth;
  6892.   LONG   lGeomWidth;
  6893.   USHORT usType;
  6894.   USHORT usEnd;
  6895.   USHORT usJoin;
  6896.   USHORT usReserved;
  6897. } LINEBUNDLE;
  6898. typedef LINEBUNDLE *PLINEBUNDLE;
  6899.  
  6900. typedef struct
  6901. {
  6902.   LONG   lColor;
  6903.   LONG   lBackColor;
  6904.   USHORT usMixMode;
  6905.   USHORT usBackMixMode;
  6906.   USHORT usSet;
  6907.   USHORT usPrecision;
  6908.   SIZEF  sizfxCell;
  6909.   POINTL ptlAngle;
  6910.   POINTL ptlShear;
  6911.   USHORT usDirection;
  6912.   USHORT usTextAlign;
  6913.   FIXED  fxExtra;
  6914.   FIXED  fxBreakExtra;
  6915. } CHARBUNDLE;
  6916. typedef CHARBUNDLE *PCHARBUNDLE;
  6917.  
  6918. typedef struct
  6919. {
  6920.   LONG   lColor;
  6921.   LONG   lBackColor;
  6922.   USHORT usMixMode;
  6923.   USHORT usBackMixMode;
  6924.   USHORT usSet;
  6925.   USHORT usSymbol;
  6926.   SIZEF  sizfxCell;
  6927. } MARKERBUNDLE;
  6928. typedef MARKERBUNDLE *PMARKERBUNDLE;
  6929.  
  6930. typedef struct
  6931. {
  6932.   LONG   lColor;
  6933.   LONG   lBackColor;
  6934.   USHORT usMixMode;
  6935.   USHORT usBackMixMode;
  6936.   USHORT usSet;
  6937.   USHORT usSymbol;
  6938.   POINTL ptlRefPoint ;
  6939. } AREABUNDLE;
  6940. typedef AREABUNDLE *PAREABUNDLE;
  6941.  
  6942. typedef struct
  6943. {
  6944.   LONG   lColor;
  6945.   LONG   lBackColor;
  6946.   USHORT usMixMode;
  6947.   USHORT usBackMixMode;
  6948. } IMAGEBUNDLE;
  6949. typedef IMAGEBUNDLE *PIMAGEBUNDLE;
  6950.  
  6951.  
  6952. #define MAKEFIXED(i,f) MAKELONG(f,i)
  6953. #define FIXEDFRAC(fx)  (LOUSHORT(fx))
  6954. #define FIXEDINT(fx)   ((SHORT)HIUSHORT(fx))
  6955.  
  6956.  
  6957. LONG GpiAnimatePalette (HPAL hpal, ULONG ulFormat, ULONG ulStart,
  6958.     ULONG ulCount, __const__ ULONG *aulTable);
  6959. BOOL GpiAssociate (HPS hps, HDC hdc);
  6960. BOOL GpiBeginArea (HPS hps, ULONG flOptions);
  6961. BOOL GpiBeginElement (HPS hps, LONG lType, CONSTPSZ pszDesc);
  6962. BOOL GpiBeginPath (HPS hps, LONG lPath);
  6963. LONG GpiBitBlt (HPS hpsTarget, HPS hpsSource, LONG lCount,
  6964.     __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
  6965. LONG GpiBox (HPS hps, LONG lControl, PPOINTL pptlPoint, LONG lHRound,
  6966.     LONG lVRound);
  6967. LONG GpiCallSegmentMatrix (HPS hps, LONG lSegment, LONG lCount,
  6968.     __const__ MATRIXLF *pmatlfArray, LONG lOptions);
  6969. LONG GpiCharString (HPS hps, LONG lCount, CONSTPCH pchString);
  6970. LONG GpiCharStringAt (HPS hps, __const__ POINTL *pptlPoint, LONG lCount,
  6971.      CONSTPCH pchString);
  6972. LONG GpiCharStringPos (HPS hps, __const__ RECTL *prclRect, ULONG flOptions,
  6973.     LONG lCount, CONSTPCH pchString, __const__ LONG *alAdx);
  6974. LONG  GpiCharStringPosAt (HPS hps, __const__ POINTL *pptlStart,
  6975.     __const__ RECTL *prclRect, ULONG flOptions, LONG lCount,
  6976.     CONSTPCH pchString, __const__ LONG *alAdx);
  6977. BOOL GpiCloseFigure (HPS hps);
  6978. BOOL GpiCloseSegment (HPS hps);
  6979. LONG GpiCombineRegion (HPS hps, HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2,
  6980.     LONG lMode);
  6981. BOOL GpiComment (HPS hps, LONG lLength, __const__ BYTE *pbData);
  6982. BOOL GpiConvert (HPS hps, LONG lSrc, LONG lTarg, LONG lCount,
  6983.     PPOINTL aptlPoints);
  6984. BOOL GpiConvertWithMatrix (HPS hps, LONG lCountp, PPOINTL aptlPoints,
  6985.     LONG lCount, __const__ MATRIXLF *pmatlfArray);
  6986. HMF GpiCopyMetaFile (HMF hmf);
  6987. LONG GpiCorrelateChain (HPS hps, LONG lType, __const__ POINTL *pptlPick,
  6988.     LONG lMaxHits, LONG lMaxDepth, PLONG pl2);
  6989. LONG GpiCorrelateFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment,
  6990.     LONG lType, __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth,
  6991.     PLONG plSegTag);
  6992. LONG GpiCorrelateSegment (HPS hps, LONG lSegment, LONG lType,
  6993.     __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth, PLONG alSegTag);
  6994. HBITMAP GpiCreateBitmap (HPS hps, __const__ BITMAPINFOHEADER2 *pbmpNew,
  6995.     ULONG flOptions, __const__ BYTE *pbInitData,
  6996.     __const__ BITMAPINFO2 *pbmiInfoTable);
  6997. BOOL GpiCreateLogColorTable (HPS hps, ULONG flOptions, LONG lFormat,
  6998.     LONG lStart, LONG lCount, __const__ LONG *alTable);
  6999. LONG GpiCreateLogFont (HPS hps, __const__ STR8 *pName, LONG lLcid,
  7000.     __const__ FATTRS *pfatAttrs);
  7001. HPAL GpiCreatePalette (HAB hab, ULONG flOptions, ULONG ulFormat,
  7002.     ULONG ulCount, __const__ ULONG *aulTable);
  7003. HPS GpiCreatePS (HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions);
  7004. HRGN GpiCreateRegion (HPS hps, LONG lCount, __const__ RECTL *arclRectangles);
  7005. BOOL GpiDeleteBitmap (HBITMAP hbm);
  7006. BOOL GpiDeleteElement (HPS hps);
  7007. BOOL GpiDeleteElementRange (HPS hps, LONG lFirstElement, LONG lLastElement);
  7008. BOOL GpiDeleteElementsBetweenLabels (HPS hps, LONG lFirstLabel,
  7009.     LONG lLastLabel);
  7010. BOOL GpiDeleteMetaFile (HMF hmf);
  7011. BOOL GpiDeletePalette (HPAL hpal);
  7012. BOOL GpiDeleteSegment (HPS hps, LONG lSegid);
  7013. BOOL GpiDeleteSegments (HPS hps, LONG lFirstSegment, LONG lLastSegment);
  7014. BOOL GpiDeleteSetId (HPS hps, LONG lLcid);
  7015. BOOL GpiDestroyPS (HPS hps);
  7016. BOOL GpiDestroyRegion (HPS hps, HRGN hrgn);
  7017. LONG GpiDrawBits (HPS hps, __const__ VOID *pBits,
  7018.     __const__ BITMAPINFO2 *pbmiInfoTable, LONG lCount,
  7019.     __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
  7020. BOOL GpiDrawChain (HPS hps);
  7021. BOOL GpiDrawDynamics (HPS hps);
  7022. BOOL GpiDrawFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment);
  7023. BOOL GpiDrawSegment (HPS hps, LONG lSegment);
  7024. LONG GpiElement (HPS hps, LONG lType, CONSTPSZ pszDesc, LONG lLength,
  7025.     __const__ BYTE *pbData);
  7026. LONG GpiEndArea (HPS hps);
  7027. BOOL GpiEndElement (HPS hps);
  7028. BOOL GpiEndPath (HPS hps);
  7029. LONG GpiEqualRegion (HPS hps, HRGN hrgnSrc1, HRGN hrgnSrc2);
  7030. BOOL GpiErase (HPS hps);
  7031. LONG GpiErrorSegmentData (HPS hps, PLONG plSegment, PLONG plContext);
  7032. LONG GpiExcludeClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
  7033. LONG GpiFillPath (HPS hps, LONG lPath, LONG lOptions);
  7034. LONG GpiFloodFill (HPS hps, LONG lOptions, LONG lColor);
  7035. LONG GpiFrameRegion (HPS hps, HRGN hrgn, __const__ SIZEL *thickness);
  7036. LONG GpiFullArc (HPS hps, LONG lControl, FIXED fxMultiplier);
  7037. LONG GpiGetData (HPS hps, LONG lSegid, PLONG plOffset, LONG lFormat,
  7038.     LONG lLength, PBYTE pbData);
  7039. LONG GpiImage (HPS hps, LONG lFormat, __const__ SIZEL *psizlImageSize,
  7040.     LONG lLength, __const__ BYTE *pbData);
  7041. LONG GpiIntersectClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
  7042. BOOL GpiLabel (HPS hps, LONG lLabel);
  7043. LONG GpiLine (HPS hps, PPOINTL pptlEndPoint);
  7044. HBITMAP GpiLoadBitmap (HPS hps, HMODULE Resource, ULONG idBitmap,
  7045.     LONG lWidth, LONG lHeight);
  7046. BOOL GpiLoadFonts (HAB hab, CONSTPSZ pszFilename);
  7047. HMF GpiLoadMetaFile (HAB hab, CONSTPSZ pszFilename);
  7048. BOOL GpiLoadPublicFonts (HAB hab, CONSTPSZ pszFileName);
  7049. LONG GpiMarker (HPS hps, __const__ POINTL *pptlPoint);
  7050. BOOL GpiModifyPath (HPS hps, LONG lPath, LONG lMode);
  7051. BOOL GpiMove (HPS hps, PPOINTL pptlPoint);
  7052. LONG GpiOffsetClipRegion (HPS hps, __const__ POINTL *pptlPoint);
  7053. BOOL GpiOffsetElementPointer (HPS hps, LONG loffset);
  7054. BOOL GpiOffsetRegion (HPS hps, HRGN Hrgn, __const__ POINTL *pptlOffset);
  7055. BOOL GpiOpenSegment (HPS hps, LONG lSegment);
  7056. LONG GpiOutlinePath (HPS hps, LONG lPath, LONG lOptions);
  7057. LONG GpiPaintRegion (HPS hps, HRGN hrgn);
  7058. LONG GpiPartialArc (HPS hps, __const__ POINTL *pptlCenter, FIXED fxMultiplier,
  7059.     FIXED fxStartAngle, FIXED fxSweepAngle);
  7060. HRGN GpiPathToRegion (HPS GpiH, LONG lPath, LONG lOptions);
  7061. LONG GpiPlayMetaFile (HPS hps, HMF hmf, LONG lCount1,
  7062.     __const__ LONG *alOptarray, PLONG plSegCount, LONG lCount2, PSZ pszDesc);
  7063. LONG GpiPointArc (HPS hps, __const__ POINTL *pptl2);
  7064. LONG GpiPolyFillet (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
  7065. LONG GpiPolyFilletSharp (HPS hps, LONG lCount, __const__ POINTL *aptlPoints,
  7066.     __const__ FIXED *afxPoints);
  7067. LONG GpiPolygons (HPS hps, ULONG ulCount, __const__ POLYGON *paplgn,
  7068.     ULONG flOptions, ULONG flModel);
  7069. LONG GpiPolyLine (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
  7070. LONG GpiPolyLineDisjoint (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
  7071. LONG GpiPolyMarker (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
  7072. LONG GpiPolySpline (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
  7073. BOOL GpiPop (HPS hps, LONG lCount);
  7074. LONG GpiPtInRegion (HPS hps, HRGN hrgn, __const__ POINTL *pptlPoint);
  7075. LONG GpiPtVisible (HPS hps, __const__ POINTL *pptlPoint);
  7076. LONG GpiPutData (HPS hps, LONG lFormat, PLONG plCount, __const__ BYTE *pbData);
  7077. BOOL GpiQueryArcParams (HPS hps, PARCPARAMS parcpArcParams);
  7078. LONG GpiQueryAttrMode (HPS hps);
  7079. LONG GpiQueryAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
  7080.     PBUNDLE ppbunAttrs);
  7081. LONG GpiQueryBackColor (HPS hps);
  7082. LONG GpiQueryBackMix (HPS hps);
  7083. LONG GpiQueryBitmapBits (HPS hps, LONG lScanStart, LONG lScans, PBYTE pbBuffer,
  7084.     PBITMAPINFO2 pbmiInfoTable);
  7085. BOOL GpiQueryBitmapDimension (HBITMAP hbm, PSIZEL psizlBitmapDimension);
  7086. HBITMAP GpiQueryBitmapHandle (HPS hps, LONG lLcid);
  7087. BOOL GpiQueryBitmapInfoHeader (HBITMAP hbm, PBITMAPINFOHEADER2 pbmpData);
  7088. BOOL GpiQueryBitmapParameters (HBITMAP hbm, PBITMAPINFOHEADER pbmpData);
  7089. BOOL GpiQueryBoundaryData (HPS hps, PRECTL prclBoundary);
  7090. BOOL GpiQueryCharAngle (HPS hps, PGRADIENTL pgradlAngle);
  7091. BOOL GpiQueryCharBox (HPS hps, PSIZEF psizfxSize);
  7092. BOOL GpiQueryCharBreakExtra (HPS hps, PFIXED BreakExtra);
  7093. LONG GpiQueryCharDirection (HPS hps);
  7094. BOOL GpiQueryCharExtra (HPS hps, PFIXED Extra);
  7095. LONG GpiQueryCharMode (HPS hps);
  7096. LONG GpiQueryCharSet (HPS hps);
  7097. BOOL GpiQueryCharShear (HPS hps, PPOINTL pptlShear);
  7098. BOOL GpiQueryCharStringPos (HPS hps, ULONG flOptions, LONG lCount,
  7099.     PCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
  7100. BOOL GpiQueryCharStringPosAt (HPS hps, PPOINTL pptlStart, ULONG flOptions,
  7101.     LONG lCount, PCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
  7102. LONG GpiQueryClipBox (HPS hps, PRECTL prclBound);
  7103. HRGN GpiQueryClipRegion (HPS hps);
  7104. LONG GpiQueryColor (HPS hps);
  7105. BOOL GpiQueryColorData (HPS hps, LONG lCount, PLONG alArray);
  7106. LONG GpiQueryColorIndex (HPS hps, ULONG flOptions, LONG lRgbColor);
  7107. ULONG GpiQueryCp (HPS hps);
  7108. BOOL GpiQueryCurrentPosition (HPS hps, PPOINTL pptlPoint);
  7109. BOOL GpiQueryDefArcParams (HPS hps, PARCPARAMS parcpArcParams);
  7110. BOOL GpiQueryDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
  7111.     PBUNDLE ppbunAttrs);
  7112. BOOL GpiQueryDefCharBox (HPS hps, PSIZEL psizlSize);
  7113. BOOL GpiQueryDefTag (HPS hps, PLONG plTag);
  7114. BOOL GpiQueryDefViewingLimits (HPS hps, PRECTL prclLimits);
  7115. BOOL GpiQueryDefaultViewMatrix (HPS hps, LONG lCount, PMATRIXLF pmatlfArray);
  7116. HDC GpiQueryDevice (HPS hps);
  7117. BOOL GpiQueryDeviceBitmapFormats (HPS hps, LONG lCount, PLONG alArray);
  7118. LONG GpiQueryDrawControl (HPS hps, LONG lControl);
  7119. LONG GpiQueryDrawingMode (HPS hps);
  7120. LONG GpiQueryEditMode (HPS hps);
  7121. LONG GpiQueryElement (HPS hps, LONG lOff, LONG lMaxLength, PBYTE pbData);
  7122. LONG GpiQueryElementPointer (HPS hps);
  7123. LONG GpiQueryElementType (HPS hps, PLONG plType, LONG lLength, PSZ pszData);
  7124. ULONG GpiQueryFaceString (HPS PS, PSZ FamilyName, PFACENAMEDESC attrs,
  7125.     LONG length, PSZ CompoundFaceName);
  7126. ULONG GpiQueryFontAction (HAB anchor, ULONG options);
  7127. LONG GpiQueryFontFileDescriptions (HAB hab, PSZ pszFilename, PLONG plCount,
  7128.     PFFDESCS affdescsNames);
  7129. BOOL GpiQueryFontMetrics (HPS hps, LONG lMetricsLength,
  7130.     PFONTMETRICS pfmMetrics);
  7131. LONG GpiQueryFonts (HPS hps, ULONG flOptions, PSZ pszFacename,
  7132.     PLONG plReqFonts, LONG lMetricsLength, PFONTMETRICS afmMetrics);
  7133. LONG GpiQueryFullFontFileDescs (HAB hab, PSZ pszFilename, PLONG plCount,
  7134.     PVOID pNames, PLONG plNamesBuffLength);
  7135. BOOL GpiQueryGraphicsField (HPS hps, PRECTL prclField);
  7136. LONG GpiQueryInitialSegmentAttrs (HPS hps, LONG lAttribute);
  7137. LONG GpiQueryKerningPairs (HPS hps, LONG lCount, PKERNINGPAIRS akrnprData);
  7138. LONG GpiQueryLineEnd (HPS hps);
  7139. LONG GpiQueryLineJoin (HPS hps);
  7140. LONG GpiQueryLineType (HPS hps);
  7141. FIXED GpiQueryLineWidth (HPS hps);
  7142. LONG GpiQueryLineWidthGeom (HPS hps);
  7143. LONG GpiQueryLogColorTable (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
  7144.     PLONG alArray);
  7145. BOOL GpiQueryLogicalFont (HPS PS, LONG lcid, PSTR8 name, PFATTRS attrs,
  7146.     LONG length);
  7147. LONG GpiQueryMarker (HPS hps);
  7148. BOOL GpiQueryMarkerBox (HPS hps, PSIZEF psizfxSize);
  7149. LONG GpiQueryMarkerSet (HPS hps);
  7150. BOOL GpiQueryMetaFileBits (HMF hmf, LONG lOffset, LONG lLength, PBYTE pbData);
  7151. LONG GpiQueryMetaFileLength (HMF hmf);
  7152. LONG GpiQueryMix (HPS hps);
  7153. BOOL GpiQueryModelTransformMatrix (HPS hps, LONG lCount,
  7154.     PMATRIXLF pmatlfArray);
  7155. LONG GpiQueryNearestColor (HPS hps, ULONG flOptions, LONG lRgbIn);
  7156. LONG GpiQueryNumberSetIds (HPS hps);
  7157. BOOL GpiQueryPageViewport (HPS hps, PRECTL prclViewport);
  7158. HPAL GpiQueryPalette (HPS hps);
  7159. LONG GpiQueryPaletteInfo (HPAL hpal, HPS  hps, ULONG flOptions,
  7160.     ULONG ulStart, ULONG ulCount, PULONG aulArray);
  7161. ULONG GpiQueryPS (HPS hps, PSIZEL psizlSize);
  7162. LONG GpiQueryPattern (HPS hps);
  7163. BOOL GpiQueryPatternRefPoint (HPS hps, PPOINTL pptlRefPoint);
  7164. LONG GpiQueryPatternSet (HPS hps);
  7165. LONG GpiQueryPel (HPS hps, PPOINTL pptlPoint);
  7166. BOOL GpiQueryPickAperturePosition (HPS hps, PPOINTL pptlPoint);
  7167. BOOL GpiQueryPickApertureSize (HPS hps, PSIZEL psizlSize);
  7168. LONG GpiQueryRealColors (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
  7169.     PLONG alColors);
  7170. LONG GpiQueryRegionBox (HPS hps, HRGN hrgn, PRECTL prclBound);
  7171. BOOL GpiQueryRegionRects (HPS hps, HRGN hrgn, PRECTL prclBound,
  7172.     PRGNRECT prgnrcControl, PRECTL prclRect);
  7173. LONG GpiQueryRGBColor (HPS hps, ULONG flOptions, LONG lColorIndex);
  7174. LONG GpiQuerySegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute);
  7175. LONG GpiQuerySegmentNames (HPS hps, LONG lFirstSegid, LONG lLastSegid,
  7176.     LONG lMax, PLONG alSegids);
  7177. LONG GpiQuerySegmentPriority (HPS hps, LONG lRefSegid, LONG lOrder);
  7178. BOOL GpiQuerySegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
  7179.     PMATRIXLF pmatlfArray);
  7180. BOOL GpiQuerySetIds (HPS hps, LONG lCount, PLONG alTypes, PSTR8 aNames,
  7181.     PLONG allcids);
  7182. LONG GpiQueryStopDraw (HPS hps);
  7183. BOOL GpiQueryTag (HPS hps, PLONG plTag);
  7184. BOOL GpiQueryTextAlignment (HPS hps, PLONG plHoriz, PLONG plVert);
  7185. BOOL GpiQueryTextBox (HPS hps, LONG lCount1, PCH pchString, LONG lCount2,
  7186.     PPOINTL aptlPoints);
  7187. BOOL GpiQueryViewingLimits (HPS hps, PRECTL prclLimits);
  7188. BOOL GpiQueryViewingTransformMatrix (HPS hps, LONG lCount,
  7189.     PMATRIXLF pmatlfArray);
  7190. BOOL GpiQueryWidthTable (HPS hps, LONG lFirstChar, LONG lCount, PLONG alData);
  7191. LONG GpiRectInRegion (HPS hps, HRGN hrgn, __const__ RECTL *prclRect);
  7192. LONG GpiRectVisible (HPS hps, __const__ RECTL *prclRectangle);
  7193. BOOL GpiRemoveDynamics (HPS hps, LONG lFirstSegid, LONG lLastSegid);
  7194. BOOL GpiResetBoundaryData (HPS hps);
  7195. BOOL GpiResetPS (HPS hps, ULONG flOptions);
  7196. BOOL GpiRestorePS (HPS hps, LONG lPSid);
  7197. BOOL GpiRotate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions, FIXED fxAngle,
  7198.     __const__ POINTL *pptlCenter);
  7199. BOOL GpiSaveMetaFile (HMF hmf, CONSTPSZ pszFilename);
  7200. LONG GpiSavePS (HPS hps);
  7201. BOOL GpiScale (HPS hps, PMATRIXLF pmfatlfArray, LONG lOptions,
  7202.     __const__ FIXED *afxScale, __const__ POINTL *pptlCenter);
  7203. HPAL GpiSelectPalette (HPS hps, HPAL hpal);
  7204. BOOL GpiSetArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
  7205. BOOL GpiSetAttrMode (HPS hps, LONG lMode);
  7206. BOOL GpiSetAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, ULONG flDefMask,
  7207.     __const__ VOID *ppbunAttrs);
  7208. BOOL GpiSetBackColor (HPS hps, LONG lColor);
  7209. BOOL GpiSetBackMix (HPS hps, LONG lMixMode);
  7210. HBITMAP GpiSetBitmap (HPS hps, HBITMAP hbm);
  7211. LONG  GpiSetBitmapBits (HPS hps, LONG lScanStart, LONG lScans,
  7212.     __const__ BYTE *pbBuffer, __const__ BITMAPINFO2 *pbmiInfoTable);
  7213. BOOL GpiSetBitmapDimension (HBITMAP hbm,
  7214.     __const__ SIZEL *psizlBitmapDimension);
  7215. BOOL GpiSetBitmapId (HPS hps, HBITMAP hbm, LONG lLcid);
  7216. BOOL GpiSetCharAngle (HPS hps, __const__ GRADIENTL *pgradlAngle);
  7217. BOOL GpiSetCharBox (HPS hps, __const__ SIZEF *psizfxBox);
  7218. BOOL GpiSetCharBreakExtra (HPS hps, FIXED BreakExtra);
  7219. BOOL GpiSetCharDirection (HPS hps, LONG lDirection);
  7220. BOOL GpiSetCharExtra (HPS hps, FIXED  Extra);
  7221. BOOL GpiSetCharMode (HPS hps, LONG lMode);
  7222. BOOL GpiSetCharSet (HPS hps, LONG llcid);
  7223. BOOL GpiSetCharShear (HPS hps, __const__ POINTL *pptlAngle);
  7224. BOOL GpiSetClipPath (HPS hps, LONG lPath, LONG lOptions);
  7225. LONG GpiSetClipRegion (HPS hps, HRGN hrgn, PHRGN phrgnOld);
  7226. BOOL GpiSetColor (HPS hps, LONG lColor);
  7227. BOOL GpiSetCp (HPS hps, ULONG ulCodePage);
  7228. BOOL GpiSetCurrentPosition (HPS hps, __const__ POINTL *pptlPoint);
  7229. BOOL GpiSetDefArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
  7230. BOOL GpiSetDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
  7231.     __const__ VOID *ppbunAttrs);
  7232. BOOL GpiSetDefaultViewMatrix (HPS hps, LONG lCount,
  7233.     __const__ MATRIXLF *pmatlfarray, LONG lOptions);
  7234. BOOL GpiSetDefTag (HPS hps, LONG lTag);
  7235. BOOL GpiSetDefViewingLimits (HPS hps, __const__ RECTL *prclLimits);
  7236. BOOL GpiSetDrawControl (HPS hps, LONG lControl, LONG lValue);
  7237. BOOL GpiSetDrawingMode (HPS hps, LONG lMode);
  7238. BOOL GpiSetEditMode (HPS hps, LONG lMode);
  7239. BOOL GpiSetElementPointer (HPS hps, LONG lElement);
  7240. BOOL GpiSetElementPointerAtLabel (HPS hps, LONG lLabel);
  7241. BOOL GpiSetGraphicsField (HPS hps, __const__ RECTL *prclField);
  7242. BOOL GpiSetInitialSegmentAttrs (HPS hps, LONG lAttribute, LONG lValue);
  7243. BOOL GpiSetLineEnd (HPS hps, LONG lLineEnd);
  7244. BOOL GpiSetLineJoin (HPS hps, LONG lLineJoin);
  7245. BOOL GpiSetLineType (HPS hps, LONG lLineType);
  7246. BOOL GpiSetLineWidth (HPS hps, FIXED fxLineWidth);
  7247. BOOL GpiSetLineWidthGeom (HPS hps, LONG lLineWidth);
  7248. BOOL GpiSetMarker (HPS hps, LONG lSymbol);
  7249. BOOL GpiSetMarkerBox (HPS hps, __const__ SIZEF *psizfxSize);
  7250. BOOL GpiSetMarkerSet (HPS hps, LONG lSet);
  7251. BOOL GpiSetMetaFileBits (HMF hmf, LONG lOffset, LONG lLength,
  7252.     __const__ BYTE *pbBuffer);
  7253. BOOL GpiSetMix (HPS hps, LONG lMixMode);
  7254. BOOL GpiSetModelTransformMatrix (HPS hps, LONG lCount,
  7255.     __const__ MATRIXLF *pmatlfArray, LONG lOptions);
  7256. BOOL GpiSetPageViewport (HPS hps, __const__ RECTL *prclViewport);
  7257. BOOL GpiSetPaletteEntries (HPAL hpal, ULONG ulFormat, ULONG ulStart,
  7258.     ULONG ulCount, __const__ ULONG *aulTable);
  7259. BOOL GpiSetPattern (HPS hps, LONG lPatternSymbol);
  7260. BOOL GpiSetPatternRefPoint (HPS hps, __const__ POINTL *pptlRefPoint);
  7261. BOOL GpiSetPatternSet (HPS hps, LONG lSet);
  7262. LONG GpiSetPel (HPS hps, __const__ POINTL *pptlPoint);
  7263. BOOL GpiSetPickAperturePosition (HPS hps, __const__ POINTL *pptlPick);
  7264. BOOL GpiSetPickApertureSize (HPS hps, LONG lOptions,
  7265.     __const__ SIZEL *psizlSize);
  7266. BOOL GpiSetPS (HPS hps, __const__ SIZEL *psizlsize, ULONG flOptions);
  7267. BOOL GpiSetRegion (HPS hps, HRGN hrgn, LONG lcount,
  7268.     __const__ RECTL *arclRectangles);
  7269. BOOL GpiSetSegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute, LONG lValue);
  7270. BOOL GpiSetSegmentPriority (HPS hps, LONG lSegid, LONG lRefSegid, LONG lOrder);
  7271. BOOL GpiSetSegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
  7272.     __const__ MATRIXLF *pmatlfarray, LONG lOptions);
  7273. BOOL GpiSetStopDraw (HPS hps, LONG lValue);
  7274. BOOL GpiSetTag (HPS hps, LONG lTag);
  7275. BOOL GpiSetTextAlignment (HPS hps, LONG lHoriz, LONG lVert);
  7276. BOOL GpiSetViewingLimits (HPS hps, __const__ RECTL *prclLimits);
  7277. BOOL GpiSetViewingTransformMatrix (HPS hps, LONG lCount,
  7278.     __const__ MATRIXLF *pmatlfArray, LONG lOptions);
  7279. LONG GpiStrokePath (HPS hps, LONG lPath, ULONG flOptions);
  7280. BOOL GpiTranslate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions,
  7281.     __const__ POINTL *pptlTranslation);
  7282. BOOL GpiUnloadFonts (HAB hab, CONSTPSZ pszFilename);
  7283. BOOL GpiUnloadPublicFonts (HAB hab, CONSTPSZ pszFilename);
  7284. LONG GpiWCBitBlt (HPS hpsTarget, HBITMAP hbmSource, LONG lCount,
  7285.     __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
  7286.  
  7287.  
  7288. /* ---------------------- DEVICE CONTEXTS --------------------------------- */
  7289.  
  7290. #define DEV_ERROR                       0
  7291. #define DEV_OK                          1
  7292.  
  7293. #define ADDRESS                         0
  7294. #define DRIVER_NAME                     1
  7295. #define DRIVER_DATA                     2
  7296. #define DATA_TYPE                       3
  7297. #define COMMENT                         4
  7298. #define PROC_NAME                       5
  7299. #define PROC_PARAMS                     6
  7300. #define SPL_PARAMS                      7
  7301. #define NETWORK_PARAMS                  8
  7302.  
  7303. #define OD_QUEUED                       2
  7304. #define OD_DIRECT                       5
  7305. #define OD_INFO                         6
  7306. #define OD_METAFILE                     7
  7307. #define OD_MEMORY                       8
  7308. #define OD_METAFILE_NOQUERY             9
  7309.  
  7310. #define CAPS_FAMILY                     0
  7311. #define CAPS_IO_CAPS                    1
  7312. #define CAPS_TECHNOLOGY                 2
  7313. #define CAPS_DRIVER_VERSION             3
  7314. #define CAPS_WIDTH                      4
  7315. #define CAPS_HEIGHT                     5
  7316. #define CAPS_WIDTH_IN_CHARS             6
  7317. #define CAPS_HEIGHT_IN_CHARS            7
  7318. #define CAPS_HORIZONTAL_RESOLUTION      8
  7319. #define CAPS_VERTICAL_RESOLUTION        9
  7320. #define CAPS_CHAR_WIDTH                 10
  7321. #define CAPS_CHAR_HEIGHT                11
  7322. #define CAPS_SMALL_CHAR_WIDTH           12
  7323. #define CAPS_SMALL_CHAR_HEIGHT          13
  7324. #define CAPS_COLORS                     14
  7325. #define CAPS_COLOR_PLANES               15
  7326. #define CAPS_COLOR_BITCOUNT             16
  7327. #define CAPS_COLOR_TABLE_SUPPORT        17
  7328. #define CAPS_MOUSE_BUTTONS              18
  7329. #define CAPS_FOREGROUND_MIX_SUPPORT     19
  7330. #define CAPS_BACKGROUND_MIX_SUPPORT     20
  7331. #define CAPS_DEVICE_WINDOWING           31
  7332. #define CAPS_ADDITIONAL_GRAPHICS        32
  7333. #define CAPS_VIO_LOADABLE_FONTS         21
  7334. #define CAPS_WINDOW_BYTE_ALIGNMENT      22
  7335. #define CAPS_BITMAP_FORMATS             23
  7336. #define CAPS_RASTER_CAPS                24
  7337. #define CAPS_MARKER_HEIGHT              25
  7338. #define CAPS_MARKER_WIDTH               26
  7339. #define CAPS_DEVICE_FONTS               27
  7340. #define CAPS_GRAPHICS_SUBSET            28
  7341. #define CAPS_GRAPHICS_VERSION           29
  7342. #define CAPS_GRAPHICS_VECTOR_SUBSET     30
  7343. #define CAPS_PHYS_COLORS                33
  7344. #define CAPS_COLOR_INDEX                34
  7345. #define CAPS_GRAPHICS_CHAR_WIDTH        35
  7346. #define CAPS_GRAPHICS_CHAR_HEIGHT       36
  7347. #define CAPS_HORIZONTAL_FONT_RES        37
  7348. #define CAPS_VERTICAL_FONT_RES          38
  7349. #define CAPS_DEVICE_FONT_SIM            39
  7350. #define CAPS_LINEWIDTH_THICK            40
  7351. #define CAPS_DEVICE_POLYSET_POINTS      41
  7352.  
  7353. #define CAPS_IO_DUMMY                   1
  7354. #define CAPS_IO_SUPPORTS_OP             2
  7355. #define CAPS_IO_SUPPORTS_IP             3
  7356. #define CAPS_IO_SUPPORTS_IO             4
  7357.  
  7358. #define CAPS_TECH_UNKNOWN               0
  7359. #define CAPS_TECH_VECTOR_PLOTTER        1
  7360. #define CAPS_TECH_RASTER_DISPLAY        2
  7361. #define CAPS_TECH_RASTER_PRINTER        3
  7362. #define CAPS_TECH_RASTER_CAMERA         4
  7363. #define CAPS_TECH_POSTSCRIPT            5
  7364.  
  7365. #define CAPS_COLTABL_RGB_8              0x0001
  7366. #define CAPS_COLTABL_RGB_8_PLUS         0x0002
  7367. #define CAPS_COLTABL_TRUE_MIX           0x0004
  7368. #define CAPS_COLTABL_REALIZE            0x0008
  7369.  
  7370. #define CAPS_FM_OR                      0x0001
  7371. #define CAPS_FM_OVERPAINT               0x0002
  7372. #define CAPS_FM_XOR                     0x0008
  7373. #define CAPS_FM_LEAVEALONE              0x0010
  7374. #define CAPS_FM_AND                     0x0020
  7375. #define CAPS_FM_GENERAL_BOOLEAN         0x0040
  7376.  
  7377. #define CAPS_BM_OR                      0x0001
  7378. #define CAPS_BM_OVERPAINT               0x0002
  7379. #define CAPS_BM_XOR                     0x0008
  7380. #define CAPS_BM_LEAVEALONE              0x0010
  7381. #define CAPS_BM_AND                     0x0020
  7382. #define CAPS_BM_GENERAL_BOOLEAN         0x0040
  7383. #define CAPS_BM_SRCTRANSPARENT          0x0080
  7384. #define CAPS_BM_DESTTRANSPARENT         0x0100
  7385.  
  7386. #define CAPS_DEV_WINDOWING_SUPPORT      0x0001
  7387.  
  7388. #define CAPS_VDD_DDB_TRANSFER           0x0001
  7389. #define CAPS_GRAPHICS_KERNING_SUPPORT   0x0002
  7390. #define CAPS_FONT_OUTLINE_DEFAULT       0x0004
  7391. #define CAPS_FONT_IMAGE_DEFAULT         0x0008
  7392. #define CAPS_SCALED_DEFAULT_MARKERS     0x0040
  7393. #define CAPS_COLOR_CURSOR_SUPPORT       0x0080
  7394. #define CAPS_PALETTE_MANAGER            0x0100
  7395. #define CAPS_COSMETIC_WIDELINE_SUPPORT  0x0200
  7396. #define CAPS_DIRECT_FILL                0x0400
  7397. #define CAPS_REBUILD_FILLS              0x0800
  7398. #define CAPS_CLIP_FILLS                 0x1000
  7399. #define CAPS_ENHANCED_FONTMETRICS       0x2000
  7400. #define CAPS_ENHANCED_TEXT              0x4000
  7401. #define CAPS_TRANSFORM_SUPPORT          0x4000 /*?*/
  7402.  
  7403. #define CAPS_BYTE_ALIGN_REQUIRED        0
  7404. #define CAPS_BYTE_ALIGN_RECOMMENDED     1
  7405. #define CAPS_BYTE_ALIGN_NOT_REQUIRED    2
  7406.  
  7407. #define CAPS_RASTER_BITBLT              0x0001
  7408. #define CAPS_RASTER_BANDING             0x0002
  7409. #define CAPS_RASTER_BITBLT_SCALING      0x0004
  7410. #define CAPS_RASTER_SET_PEL             0x0010
  7411. #define CAPS_RASTER_FONTS               0x0020
  7412. #define CAPS_RASTER_FLOOD_FILL          0x0040
  7413.  
  7414. #define DEVESC_ERROR                    (-1)
  7415. #define DEVESC_NOTIMPLEMENTED           0
  7416.  
  7417. #define DEVESC_QUERYESCSUPPORT          0
  7418. #define DEVESC_GETSCALINGFACTOR         1
  7419. #define DEVESC_QUERYVIOCELLSIZES        2
  7420. #define DEVESC_GETCP                    8000
  7421. #define DEVESC_STARTDOC                 8150
  7422. #define DEVESC_ENDDOC                   8151
  7423. #define DEVESC_NEXTBAND                 8152
  7424. #define DEVESC_ABORTDOC                 8153
  7425. #define DEVESC_NEWFRAME                 16300
  7426. #define DEVESC_DRAFTMODE                16301
  7427. #define DEVESC_FLUSHOUTPUT              16302
  7428. #define DEVESC_RAWDATA                  16303
  7429. #define DEVESC_SETMODE                  16304
  7430. #define DEVESC_DBE_FIRST                24450
  7431. #define DEVESC_DBE_LAST                 24455
  7432. #define DEVESC_CHAR_EXTRA               16998
  7433. #define DEVESC_BREAK_EXTRA              16999
  7434. #define DEVESC_STD_JOURNAL              32600
  7435.  
  7436. #define DPDM_ERROR                      (-1)
  7437. #define DPDM_NONE                       0
  7438.  
  7439. #define DPDM_POSTJOBPROP                0
  7440. #define DPDM_CHANGEPROP                 1
  7441. #define DPDM_QUERYJOBPROP               2
  7442.  
  7443. #define DQHC_ERROR                      (-1)
  7444.  
  7445. #define HCAPS_CURRENT                   1
  7446. #define HCAPS_SELECTABLE                2
  7447.  
  7448.  
  7449. typedef PSZ *PDEVOPENDATA;
  7450.  
  7451.  
  7452. typedef struct
  7453. {
  7454.   LONG cb;
  7455.   LONG lVersion;
  7456.   CHAR szDeviceName[32];
  7457.   CHAR abGeneralData[1];
  7458. } DRIVDATA;
  7459. typedef DRIVDATA *PDRIVDATA;
  7460.  
  7461. typedef struct
  7462. {
  7463.   PSZ       pszLogAddress;
  7464.   PSZ       pszDriverName;
  7465.   PDRIVDATA pdriv;
  7466.   PSZ       pszDataType;
  7467.   PSZ       pszComment;
  7468.   PSZ       pszQueueProcName;
  7469.   PSZ       pszQueueProcParams;
  7470.   PSZ       pszSpoolerParams;
  7471.   PSZ       pszNetworkParams;
  7472. } DEVOPENSTRUC;
  7473. typedef DEVOPENSTRUC *PDEVOPENSTRUC;
  7474.  
  7475. typedef struct
  7476. {
  7477.   ULONG mode;
  7478.   BYTE  modedata[1];
  7479. } ESCMODE;
  7480. typedef ESCMODE *PESCMODE;
  7481.  
  7482. typedef struct
  7483. {
  7484.   LONG maxcount;
  7485.   LONG count;
  7486. } VIOSIZECOUNT;
  7487. typedef VIOSIZECOUNT *PVIOSIZECOUNT;
  7488.  
  7489. typedef struct
  7490. {
  7491.   LONG cx;
  7492.   LONG cy;
  7493. } VIOFONTCELLSIZE;
  7494. typedef VIOFONTCELLSIZE *PVIOFONTCELLSIZE;
  7495.  
  7496. typedef struct
  7497. {
  7498.   LONG x;
  7499.   LONG y;
  7500. } SFACTORS;
  7501. typedef SFACTORS *PSFACTORS;
  7502.  
  7503. typedef struct
  7504. {
  7505.   LONG xleft;
  7506.   LONG ybottom;
  7507.   LONG xright;
  7508.   LONG ytop;
  7509. } BANDRECT;
  7510. typedef BANDRECT *PBANDRECT;
  7511.  
  7512. typedef struct
  7513. {
  7514.   CHAR szFormname[32];
  7515.   LONG cx;
  7516.   LONG cy;
  7517.   LONG xLeftClip;
  7518.   LONG yBottomClip;
  7519.   LONG xRightClip;
  7520.   LONG yTopClip;
  7521.   LONG xPels;
  7522.   LONG yPels;
  7523.   LONG flAttributes;
  7524. } HCINFO;
  7525. typedef HCINFO *PHCINFO;
  7526.  
  7527. HMF DevCloseDC (HDC hdc);
  7528. LONG DevEscape (HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData,
  7529.     PLONG plOutCount, PBYTE pbOutData);
  7530. HDC DevOpenDC (HAB hab, LONG lType, PSZ pszToken, LONG lCount,
  7531.     PDEVOPENDATA pdopData, HDC hdcComp);
  7532. LONG DevPostDeviceModes (HAB hab, PDRIVDATA pdrivDriverData ,
  7533.     PSZ pszDriverName, PSZ pszDeviceName, PSZ pszName, ULONG flOptions);
  7534. BOOL DevQueryCaps (HDC hdc, LONG lStart, LONG lCount, PLONG alArray);
  7535. BOOL DevQueryDeviceNames (HAB hab, PSZ pszDriverName, PLONG pldn,
  7536.     PSTR32 aDeviceName, PSTR64 aDeviceDesc, PLONG pldt, PSTR16 aDataType);
  7537. LONG DevQueryHardcopyCaps (HDC hdc, LONG lStartForm, LONG lForms,
  7538.     PHCINFO phciHcInfo);
  7539.  
  7540. /* ------------------ PRESENTATION MANAGER SHELL -------------------------- */
  7541.  
  7542. #define MAXNAMEL                60
  7543.  
  7544. #define PROG_DEFAULT            0
  7545. #define PROG_FULLSCREEN         1
  7546. #define PROG_WINDOWABLEVIO      2
  7547. #define PROG_PM                 3
  7548. #define PROG_GROUP              5
  7549. #define PROG_REAL               4
  7550. #define PROG_VDM                4
  7551. #define PROG_WINDOWEDVDM        7
  7552. #define PROG_DLL                6
  7553. #define PROG_PDD                8
  7554. #define PROG_VDD                9
  7555. #define PROG_WINDOW_REAL        10
  7556. #define PROG_WINDOW_PROT        11
  7557. #define PROG_WINDOW_AUTO        12
  7558. #define PROG_SEAMLESSVDM        13
  7559. #define PROG_SEAMLESSCOMMON     14
  7560. #define PROG_RESERVED           255
  7561.  
  7562. #define SAF_VALIDFLAGS          0x001f
  7563.  
  7564. #define SAF_INSTALLEDCMDLINE    0x0001
  7565. #define SAF_STARTCHILDAPP       0x0002
  7566. #define SAF_MAXIMIZED           0x0004
  7567. #define SAF_MINIMIZED           0x0008
  7568. #define SAF_BACKGROUND          0x0010
  7569.  
  7570. #define SHE_VISIBLE             0x00
  7571. #define SHE_INVISIBLE           0x01
  7572. #define SHE_RESERVED            0xff
  7573.  
  7574. #define SHE_UNPROTECTED         0x00
  7575. #define SHE_PROTECTED           0x02
  7576.  
  7577. #define SWL_VISIBLE             0x04
  7578. #define SWL_INVISIBLE           0x01
  7579. #define SWL_GRAYED              0x02
  7580.  
  7581. #define SWL_JUMPABLE            0x02
  7582. #define SWL_NOTJUMPABLE         0x01
  7583.  
  7584. typedef LHANDLE HSWITCH;
  7585. typedef HSWITCH *PHSWITCH;
  7586.  
  7587. typedef LHANDLE HPROGRAM;
  7588. typedef HPROGRAM *PHPROGRAM;
  7589.  
  7590. typedef LHANDLE HAPP;
  7591.  
  7592. typedef ULONG PROGCATEGORY;
  7593. typedef PROGCATEGORY *PPROGCATEGORY;
  7594.  
  7595. typedef struct
  7596. {
  7597.   HWND     hwnd;
  7598.   HWND     hwndIcon;
  7599.   HPROGRAM hprog;
  7600.   PID      idProcess;
  7601.   ULONG    idSession;
  7602.   ULONG    uchVisibility;
  7603.   ULONG    fbJump;
  7604.   CHAR     szSwtitle[MAXNAMEL+4];
  7605.   ULONG    bProgType;
  7606. } SWCNTRL;
  7607. typedef SWCNTRL *PSWCNTRL;
  7608.  
  7609. typedef struct
  7610. {
  7611.   HSWITCH hswitch;
  7612.   SWCNTRL swctl;
  7613. } SWENTRY;
  7614. typedef SWENTRY *PSWENTRY;
  7615.  
  7616. typedef struct
  7617. {
  7618.   ULONG   cswentry;
  7619.   SWENTRY aswentry[1];
  7620. } SWBLOCK;
  7621. typedef SWBLOCK *PSWBLOCK;
  7622.  
  7623. typedef struct
  7624. {
  7625.   PROGCATEGORY progc;
  7626.   ULONG        fbVisible;
  7627. } PROGTYPE;
  7628. typedef PROGTYPE *PPROGTYPE;
  7629.  
  7630. typedef struct
  7631. {
  7632.   HPROGRAM hprog;
  7633.   PROGTYPE progt;
  7634.   PSZ      pszTitle;
  7635. } PROGTITLE;
  7636. typedef PROGTITLE *PPROGTITLE;
  7637.  
  7638. typedef struct
  7639. {
  7640.   ULONG    Length;
  7641.   PROGTYPE progt;
  7642.   PSZ      pszTitle;
  7643.   PSZ      pszExecutable;
  7644.   PSZ      pszParameters;
  7645.   PSZ      pszStartupDir;
  7646.   PSZ      pszIcon;
  7647.   PSZ      pszEnvironment;
  7648.   SWP      swpInitial;
  7649. } PROGDETAILS;
  7650. typedef PROGDETAILS *PPROGDETAILS;
  7651.  
  7652.  
  7653. HSWITCH WinAddSwitchEntry (__const__ SWCNTRL *pswctl);
  7654. ULONG WinChangeSwitchEntry (HSWITCH hsw, __const__ SWCNTRL *pswctl);
  7655. HSWITCH WinCreateSwitchEntry (HAB hab, __const__ SWCNTRL *pswctl);
  7656. ULONG WinQuerySessionTitle (HAB hab, ULONG usSession, PSZ pszTitle,
  7657.     ULONG usTitlelen);
  7658. ULONG WinQuerySwitchEntry (HSWITCH hsw, PSWCNTRL pswctl);
  7659. HSWITCH WinQuerySwitchHandle (HWND hwnd, PID pid);
  7660. ULONG WinQuerySwitchList (HAB hab, PSWBLOCK pswblk, ULONG usDataLength);
  7661. ULONG WinQueryTaskSizePos (HAB hab, ULONG usScreenGroup, PSWP pswp);
  7662. ULONG WinQueryTaskTitle (ULONG usSession, PSZ pszTitle, ULONG usTitlelen);
  7663. ULONG WinRemoveSwitchEntry (HSWITCH hsw);
  7664. HAPP WinStartApp (HWND hwndNotify, PPROGDETAILS pDetails,
  7665.     PSZ pszParams, PVOID Reserved, ULONG fbOptions);
  7666. ULONG WinSwitchToProgram (HSWITCH hsw);
  7667. BOOL WinTerminateApp (HAPP happ);
  7668.  
  7669. /* ------------------ STANDARD DIALOGS: FILE ------------------------------ */
  7670.  
  7671. #if defined (INCL_WINSTDFILE)
  7672.  
  7673. #define FDM_FILTER                      (WM_USER+40)
  7674. #define FDM_VALIDATE                    (WM_USER+41)
  7675. #define FDM_ERROR                       (WM_USER+42)
  7676.  
  7677. #define DID_FILE_DIALOG                 256
  7678. #define DID_FILENAME_TXT                257
  7679. #define DID_FILENAME_ED                 258
  7680. #define DID_DRIVE_TXT                   259
  7681. #define DID_DRIVE_CB                    260
  7682. #define DID_FILTER_TXT                  261
  7683. #define DID_FILTER_CB                   262
  7684. #define DID_DIRECTORY_TXT               263
  7685. #define DID_DIRECTORY_LB                264
  7686. #define DID_FILES_TXT                   265
  7687. #define DID_FILES_LB                    266
  7688. #define DID_HELP_PB                     267
  7689. #define DID_APPLY_PB                    268
  7690. #define DID_OK_PB                       DID_OK
  7691. #define DID_CANCEL_PB                   DID_CANCEL
  7692.  
  7693. #define FDS_CENTER                      0x0001
  7694. #define FDS_CUSTOM                      0x0002
  7695. #define FDS_FILTERUNION                 0x0004
  7696. #define FDS_HELPBUTTON                  0x0008
  7697. #define FDS_APPLYBUTTON                 0x0010
  7698. #define FDS_PRELOAD_VOLINFO             0x0020
  7699. #define FDS_MODELESS                    0x0040
  7700. #define FDS_INCLUDE_EAS                 0x0080
  7701. #define FDS_OPEN_DIALOG                 0x0100
  7702. #define FDS_SAVEAS_DIALOG               0x0200
  7703. #define FDS_MULTIPLESEL                 0x0400
  7704. #define FDS_ENABLEFILELB                0x0800
  7705.  
  7706. #define FDS_EFSELECTION                 0
  7707. #define FDS_LBSELECTION                 1
  7708.  
  7709. #define FDS_SUCCESSFUL                  0
  7710. #define FDS_ERR_DEALLOCATE_MEMORY       1
  7711. #define FDS_ERR_FILTER_TRUNC            2
  7712. #define FDS_ERR_INVALID_DIALOG          3
  7713. #define FDS_ERR_INVALID_DRIVE           4
  7714. #define FDS_ERR_INVALID_FILTER          5
  7715. #define FDS_ERR_INVALID_PATHFILE        6
  7716. #define FDS_ERR_OUT_OF_MEMORY           7
  7717. #define FDS_ERR_PATH_TOO_LONG           8
  7718. #define FDS_ERR_TOO_MANY_FILE_TYPES     9
  7719. #define FDS_ERR_INVALID_VERSION         10
  7720. #define FDS_ERR_INVALID_CUSTOM_HANDLE   11
  7721. #define FDS_ERR_DIALOG_LOAD_ERROR       12
  7722. #define FDS_ERR_DRIVE_ERROR             13
  7723.  
  7724. #define IDS_FILE_ALL_FILES_SELECTOR     1000
  7725. #define IDS_FILE_BACK_CUR_PATH          1001
  7726. #define IDS_FILE_BACK_PREV_PATH         1002
  7727. #define IDS_FILE_BACK_SLASH             1003
  7728. #define IDS_FILE_BASE_FILTER            1004
  7729. #define IDS_FILE_BLANK                  1005
  7730. #define IDS_FILE_COLON                  1006
  7731. #define IDS_FILE_DOT                    1007
  7732. #define IDS_FILE_DRIVE_LETTERS          1008
  7733. #define IDS_FILE_FWD_CUR_PATH           1009
  7734. #define IDS_FILE_FWD_PREV_PATH          1010
  7735. #define IDS_FILE_FORWARD_SLASH          1011
  7736. #define IDS_FILE_PARENT_DIR             1012
  7737. #define IDS_FILE_Q_MARK                 1013
  7738. #define IDS_FILE_SPLAT                  1014
  7739. #define IDS_FILE_SPLAT_DOT              1015
  7740. #define IDS_FILE_SAVEAS_TITLE           1016
  7741. #define IDS_FILE_SAVEAS_FILTER_TXT      1017
  7742. #define IDS_FILE_SAVEAS_FILENM_TXT      1018
  7743. #define IDS_FILE_DUMMY_FILE_NAME        1019
  7744. #define IDS_FILE_DUMMY_FILE_EXT         1020
  7745. #define IDS_FILE_DUMMY_DRIVE            1021
  7746. #define IDS_FILE_DUMMY_ROOT_DIR         1022
  7747. #define IDS_FILE_PATH_PTR               1023
  7748. #define IDS_FILE_VOLUME_PREFIX          1024
  7749. #define IDS_FILE_VOLUME_SUFFIX          1025
  7750. #define IDS_FILE_PATH_PTR2              1026
  7751. #define IDS_FILE_INVALID_CHARS          1027
  7752. #define IDS_FILE_BAD_DRIVE_NAME         1100
  7753. #define IDS_FILE_BAD_DRIVE_OR_PATH_NAME 1101
  7754. #define IDS_FILE_BAD_FILE_NAME          1102
  7755. #define IDS_FILE_BAD_FQF                1103
  7756. #define IDS_FILE_BAD_NETWORK_NAME       1104
  7757. #define IDS_FILE_BAD_SUB_DIR_NAME       1105
  7758. #define IDS_FILE_DRIVE_NOT_AVAILABLE    1106
  7759. #define IDS_FILE_FQFNAME_TOO_LONG       1107
  7760. #define IDS_FILE_OPEN_DIALOG_NOTE       1108
  7761. #define IDS_FILE_PATH_TOO_LONG          1109
  7762. #define IDS_FILE_SAVEAS_DIALOG_NOTE     1110
  7763. #define IDS_FILE_DRIVE_DISK_CHANGE      1120
  7764. #define IDS_FILE_DRIVE_NOT_READY        1122
  7765. #define IDS_FILE_DRIVE_LOCKED           1123
  7766. #define IDS_FILE_DRIVE_NO_SECTOR        1124
  7767. #define IDS_FILE_DRIVE_SOME_ERROR       1125
  7768. #define IDS_FILE_DRIVE_INVALID          1126
  7769. #define IDS_FILE_INSERT_DISK_NOTE       1127
  7770. #define IDS_FILE_OK_WHEN_READY          1128
  7771.  
  7772. typedef PSZ APSZ[1];
  7773. typedef APSZ *PAPSZ;
  7774.  
  7775. typedef struct
  7776. {
  7777.   ULONG   cbSize;
  7778.   ULONG   fl;
  7779.   ULONG   ulUser;
  7780.   LONG    lReturn;
  7781.   LONG    lSRC;
  7782.   PSZ     pszTitle;
  7783.   PSZ     pszOKButton;
  7784.   PFNWP   pfnDlgProc;
  7785.   PSZ     pszIType;
  7786.   PAPSZ   papszITypeList;
  7787.   PSZ     pszIDrive;
  7788.   PAPSZ   papszIDriveList;
  7789.   HMODULE hMod;
  7790.   CHAR    szFullFile[CCHMAXPATH];
  7791.   PAPSZ   papszFQFilename;
  7792.   ULONG   ulFQFCount;
  7793.   USHORT  usDlgId;
  7794.   SHORT   x;
  7795.   SHORT   y;
  7796.   SHORT   sEAType;
  7797. } FILEDLG;
  7798. typedef FILEDLG *PFILEDLG;
  7799.  
  7800.  
  7801. MRESULT WinDefFileDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  7802. HWND WinFileDlg (HWND hwndP, HWND hwndO, PFILEDLG pfild);
  7803. BOOL WinFreeFileDlgList (PAPSZ papszFQFilename);
  7804.  
  7805. #endif /* INCL_WINSTDFILE */
  7806.  
  7807. /* -------------------------- SPIN BUTTON --------------------------------- */
  7808.  
  7809. #if defined (INCL_WINSTDSPIN)
  7810.  
  7811. #define SPBS_ALLCHARACTERS              0x0000
  7812. #define SPBS_NUMERICONLY                0x0001
  7813. #define SPBS_READONLY                   0x0002
  7814. #define SPBS_SERVANT                    0x0000
  7815. #define SPBS_MASTER                     0x0010
  7816. #define SPBS_JUSTDEFAULT                0x0000
  7817. #define SPBS_JUSTRIGHT                  0x0004
  7818. #define SPBS_JUSTLEFT                   0x0008
  7819. #define SPBS_JUSTCENTER                 0x000c
  7820. #define SPBS_NOBORDER                   0x0020
  7821. #define SPBS_PADWITHZEROS               0x0080
  7822. #define SPBS_FASTSPIN                   0x0100
  7823.  
  7824. #define SPBM_OVERRIDESETLIMITS          0x0200
  7825. #define SPBM_QUERYLIMITS                0x0201
  7826. #define SPBM_SETTEXTLIMIT               0x0202
  7827. #define SPBM_SPINUP                     0x0203
  7828. #define SPBM_SPINDOWN                   0x0204
  7829. #define SPBM_QUERYVALUE                 0x0205
  7830. #define SPBM_SETARRAY                   0x0206
  7831. #define SPBM_SETLIMITS                  0x0207
  7832. #define SPBM_SETCURRENTVALUE            0x0208
  7833. #define SPBM_SETMASTER                  0x0209
  7834.  
  7835. #define SPBN_UPARROW                    0x020a
  7836. #define SPBN_DOWNARROW                  0x020b
  7837. #define SPBN_ENDSPIN                    0x020c
  7838. #define SPBN_CHANGE                     0x020d
  7839. #define SPBN_SETFOCUS                   0x020e
  7840. #define SPBN_KILLFOCUS                  0x020f
  7841.  
  7842. #define SPBQ_UPDATEIFVALID              0
  7843. #define SPBQ_ALWAYSUPDATE               1
  7844. #define SPBQ_DONOTUPDATE                3
  7845.  
  7846. #endif /* INCL_WINSTDSPIN */
  7847.  
  7848. /* ----------------------------- SLIDER ----------------------------------- */
  7849.  
  7850. #if defined (INCL_WINSTDSLIDER)
  7851.  
  7852. #define SLM_ADDDETENT                   0x0369
  7853. #define SLM_QUERYDETENTPOS              0x036a
  7854. #define SLM_QUERYSCALETEXT              0x036b
  7855. #define SLM_QUERYSLIDERINFO             0x036c
  7856. #define SLM_QUERYTICKPOS                0x036d
  7857. #define SLM_QUERYTICKSIZE               0x036e
  7858. #define SLM_REMOVEDETENT                0x036f
  7859. #define SLM_SETSCALETEXT                0x0370
  7860. #define SLM_SETSLIDERINFO               0x0371
  7861. #define SLM_SETTICKSIZE                 0x0372
  7862.  
  7863. #define SLN_CHANGE                      1
  7864. #define SLN_SLIDERTRACK                 2
  7865. #define SLN_SETFOCUS                    3
  7866. #define SLN_KILLFOCUS                   4
  7867.  
  7868. #define SLS_HORIZONTAL                  0x0000
  7869. #define SLS_VERTICAL                    0x0001
  7870. #define SLS_CENTER                      0x0000
  7871. #define SLS_BOTTOM                      0x0002
  7872. #define SLS_TOP                         0x0004
  7873. #define SLS_LEFT                        0x0002
  7874. #define SLS_RIGHT                       0x0004
  7875. #define SLS_SNAPTOINCREMENT             0x0008
  7876. #define SLS_BUTTONSBOTTOM               0x0010
  7877. #define SLS_BUTTONSTOP                  0x0020
  7878. #define SLS_BUTTONSLEFT                 0x0010
  7879. #define SLS_BUTTONSRIGHT                0x0020
  7880. #define SLS_OWNERDRAW                   0x0040
  7881. #define SLS_READONLY                    0x0080
  7882. #define SLS_RIBBONSTRIP                 0x0100
  7883. #define SLS_HOMEBOTTOM                  0x0000
  7884. #define SLS_HOMETOP                     0x0200
  7885. #define SLS_HOMELEFT                    0x0000
  7886. #define SLS_HOMERIGHT                   0x0200
  7887. #define SLS_PRIMARYSCALE1               0x0000
  7888. #define SLS_PRIMARYSCALE2               0x0400
  7889.  
  7890. #define SMA_SCALE1                      0x0001
  7891. #define SMA_SCALE2                      0x0002
  7892. #define SMA_SHAFTDIMENSIONS             0x0000
  7893. #define SMA_SHAFTPOSITION               0x0001
  7894. #define SMA_SLIDERARMDIMENSIONS         0x0002
  7895. #define SMA_SLIDERARMPOSITION           0x0003
  7896. #define SMA_RANGEVALUE                  0x0000
  7897. #define SMA_INCREMENTVALUE              0x0001
  7898. #define SMA_SETALLTICKS                 0xffff
  7899.  
  7900. #define SDA_RIBBONSTRIP                 1
  7901. #define SDA_SLIDERSHAFT                 2
  7902. #define SDA_BACKGROUND                  3
  7903. #define SDA_SLIDERARM                   4
  7904.  
  7905. #define PMERR_UPDATE_IN_PROGRESS        0x1f06
  7906. #define SLDERR_INVALID_PARAMETERS       (-1)
  7907.  
  7908.  
  7909. typedef struct
  7910. {
  7911.   ULONG  cbSize;
  7912.   USHORT usScale1Increments;
  7913.   USHORT usScale1Spacing;
  7914.   USHORT usScale2Increments;
  7915.   USHORT usScale2Spacing;
  7916. } SLDCDATA;
  7917. typedef SLDCDATA *PSLDCDATA;
  7918.  
  7919. #endif /* INCL_WINSTDSLIDER */
  7920.  
  7921. /* -------------------------- HELP MANAGER -------------------------------- */
  7922.  
  7923. typedef VOID *HDDF;
  7924.  
  7925. #define ART_RUNIN                       0x0010
  7926. #define ART_LEFT                        0x0001
  7927. #define ART_RIGHT                       0x0002
  7928. #define ART_CENTER                      0x0004
  7929.  
  7930. #define CLR_UNCHANGED                   (-6)
  7931.  
  7932. #define HMBT_NONE                       1
  7933. #define HMBT_ALL                        2
  7934. #define HMBT_FIT                        3
  7935.  
  7936. #define HMLS_SINGLELINE                 1
  7937. #define HMLS_DOUBLELINE                 2
  7938.  
  7939. #define HM_RESOURCEID                   0
  7940. #define HM_PANELNAME                    1
  7941.  
  7942. #define HMPANELTYPE_NUMBER              0
  7943. #define HMPANELTYPE_NAME                1
  7944.  
  7945. #define REFERENCE_BY_ID                 0
  7946. #define REFERENCE_BY_RES                1
  7947.  
  7948. #define HWND_PARENT                     (HWND)NULL
  7949.  
  7950. #define CMIC_HIDE_PANEL_ID              0x0000
  7951. #define CMIC_SHOW_PANEL_ID              0x0001
  7952. #define CMIC_TOGGLE_PANEL_ID            0x0002
  7953.  
  7954. #define CTRL_PREVIOUS_ID                ((USHORT)0x0001)
  7955. #define CTRL_SEARCH_ID                  ((USHORT)0x0002)
  7956. #define CTRL_PRINT_ID                   ((USHORT)0x0003)
  7957. #define CTRL_INDEX_ID                   ((USHORT)0x0004)
  7958. #define CTRL_CONTENTS_ID                ((USHORT)0x0005)
  7959. #define CTRL_BACK_ID                    ((USHORT)0x0006)
  7960. #define CTRL_FORWARD_ID                 ((USHORT)0x0007)
  7961. #define CTRL_TUTORIAL_ID                ((USHORT)0x00ff)
  7962. #define CTRL_USER_ID_BASE               ((USHORT)0x0101)
  7963.  
  7964. #define HM_MSG_BASE                     0x0220
  7965. #define HM_DISMISS_WINDOW               0x0221
  7966. #define HM_DISPLAY_HELP                 0x0222
  7967. #define HM_EXT_HELP                     0x0223
  7968. #define HM_GENERAL_HELP                 0x0223 /*!*/
  7969. #define HM_SET_ACTIVE_WINDOW            0x0224
  7970. #define HM_LOAD_HELP_TABLE              0x0225
  7971. #define HM_CREATE_HELP_TABLE            0x0226
  7972. #define HM_SET_HELP_WINDOW_TITLE        0x0227
  7973. #define HM_SET_SHOW_PANEL_ID            0x0228
  7974. #define HM_REPLACE_HELP_FOR_HELP        0x0229
  7975. #define HM_REPLACE_USING_HELP           0x0229 /*!*/
  7976. #define HM_HELP_INDEX                   0x022a
  7977. #define HM_HELP_CONTENTS                0x022b
  7978. #define HM_KEYS_HELP                    0x022c
  7979. #define HM_SET_HELP_LIBRARY_NAME        0x022d
  7980. #define HM_SET_OBJCOM_WINDOW            0x0238
  7981. #define HM_UPDATE_OBJCOM_WINDOW_CHAIN   0x0239
  7982. #define HM_QUERY_DDF_DATA               0x023a
  7983. #define HM_INVALIDATE_DDF_DATA          0x023b
  7984. #define HM_QUERY                        0x023c
  7985. #define HM_SET_COVERPAGE_SIZE           0x023d
  7986.  
  7987. #define HMQW_COVERPAGE                  0x0001
  7988. #define HMQW_INDEX                      0x0002
  7989. #define HMQW_TOC                        0x0003
  7990. #define HMQW_SEARCH                     0x0004
  7991. #define HMQW_VIEWPAGES                  0x0005
  7992. #define HMQW_LIBRARY                    0x0006
  7993. #define HMQW_VIEWPORT                   0x0007
  7994. #define HMQW_OBJCOM_WINDOW              0x0008
  7995. #define HMQW_INSTANCE                   0x0009
  7996. #define HMQW_ACTIVEVIEWPORT             0x000a
  7997. #define CONTROL_SELECTED                0x000b
  7998.  
  7999. #define HM_ERROR                        0x022e
  8000. #define HM_HELPSUBITEM_NOT_FOUND        0x022f
  8001. #define HM_QUERY_KEYS_HELP              0x0230
  8002. #define HM_TUTORIAL                     0x0231
  8003. #define HM_EXT_HELP_UNDEFINED           0x0232
  8004. #define HM_GENERAL_HELP_UNDEFINED       0x0232 /*!*/
  8005. #define HM_ACTIONBAR_COMMAND            0x0233
  8006. #define HM_INFORM                       0x0234
  8007. #define HM_NOTIFY                       0x0242
  8008. #define HM_SET_USERDATA                 0x0243
  8009. #define HM_CONTROL                      0x0244
  8010.  
  8011. #define HMQW_GROUP_VIEWPORT             0x00f1
  8012. #define HMQW_RES_VIEWPORT               0x00f2
  8013. #define USERDATA                        0x00f3
  8014.  
  8015. #define HMQVP_NUMBER                    0x0001
  8016. #define HMQVP_NAME                      0x0002
  8017. #define HMQVP_GROUP                     0x0003
  8018.  
  8019. #define OPEN_COVERPAGE                  0x0001
  8020. #define OPEN_PAGE                       0x0002
  8021. #define SWAP_PAGE                       0x0003
  8022. #define OPEN_TOC                        0x0004
  8023. #define OPEN_INDEX                      0x0005
  8024. #define OPEN_HISTORY                    0x0006
  8025. #define OPEN_SEARCH_HIT_LIST            0x0007
  8026. #define OPEN_LIBRARY                    0x0008
  8027.  
  8028. #define HMERR_NO_FRAME_WND_IN_CHAIN     0x1001
  8029. #define HMERR_INVALID_ASSOC_APP_WND     0x1002
  8030. #define HMERR_INVALID_ASSOC_HELP_INST   0x1003
  8031. #define HMERR_INVALID_DESTROY_HELP_INST 0x1004
  8032. #define HMERR_NO_HELP_INST_IN_CHAIN     0x1005
  8033. #define HMERR_INVALID_HELP_INSTANCE_HDL 0x1006
  8034. #define HMERR_INVALID_QUERY_APP_WND     0x1007
  8035. #define HMERR_HELP_INST_CALLED_INVALID  0x1008
  8036. #define HMERR_HELPTABLE_UNDEFINE        0x1009
  8037. #define HMERR_HELP_INSTANCE_UNDEFINE    0x100a
  8038. #define HMERR_HELPITEM_NOT_FOUND        0x100b
  8039. #define HMERR_INVALID_HELPSUBITEM_SIZE  0x100c
  8040. #define HMERR_HELPSUBITEM_NOT_FOUND     0x100d
  8041.  
  8042. #define HMERR_INDEX_NOT_FOUND           0x2001
  8043. #define HMERR_CONTENT_NOT_FOUND         0x2002
  8044. #define HMERR_OPEN_LIB_FILE             0x2003
  8045. #define HMERR_READ_LIB_FILE             0x2004
  8046. #define HMERR_CLOSE_LIB_FILE            0x2005
  8047. #define HMERR_INVALID_LIB_FILE          0x2006
  8048. #define HMERR_NO_MEMORY                 0x2007
  8049. #define HMERR_ALLOCATE_SEGMENT          0x2008
  8050. #define HMERR_FREE_MEMORY               0x2009
  8051. #define HMERR_PANEL_NOT_FOUND           0x2010
  8052. #define HMERR_DATABASE_NOT_OPEN         0x2011
  8053. #define HMERR_LOAD_DLL                  0x2013
  8054.  
  8055. #define HMERR_DDF_MEMORY                0x3001
  8056. #define HMERR_DDF_ALIGN_TYPE            0x3002
  8057. #define HMERR_DDF_BACKCOLOR             0x3003
  8058. #define HMERR_DDF_FORECOLOR             0x3004
  8059. #define HMERR_DDF_FONTSTYLE             0x3005
  8060. #define HMERR_DDF_REFTYPE               0x3006
  8061. #define HMERR_DDF_LIST_UNCLOSED         0x3007
  8062. #define HMERR_DDF_LIST_UNINITIALIZED    0x3008
  8063. #define HMERR_DDF_LIST_BREAKTYPE        0x3009
  8064. #define HMERR_DDF_LIST_SPACING          0x300A
  8065. #define HMERR_DDF_HINSTANCE             0x300B
  8066. #define HMERR_DDF_EXCEED_MAX_LENGTH     0x300C
  8067. #define HMERR_DDF_EXCEED_MAX_INC        0x300D
  8068. #define HMERR_DDF_INVALID_DDF           0x300E
  8069. #define HMERR_DDF_FORMAT_TYPE           0x300F
  8070. #define HMERR_DDF_INVALID_PARM          0x3010
  8071. #define HMERR_DDF_INVALID_FONT          0x3011
  8072. #define HMERR_DDF_SEVERE                0x3012
  8073.  
  8074.  
  8075. typedef USHORT HELPSUBTABLE;
  8076. typedef HELPSUBTABLE *PHELPSUBTABLE;
  8077.  
  8078.  
  8079. typedef struct
  8080. {
  8081.   USHORT        idAppWindow;
  8082.   PHELPSUBTABLE phstHelpSubTable;
  8083.   USHORT        idExtPanel;
  8084. } HELPTABLE;
  8085. typedef HELPTABLE *PHELPTABLE;
  8086.  
  8087. typedef struct
  8088. {
  8089.   ULONG      cb;
  8090.   ULONG      ulReturnCode;
  8091.   PSZ        pszTutorialName;
  8092.   PHELPTABLE phtHelpTable;
  8093.   HMODULE    hmodHelpTableModule;
  8094.   HMODULE    hmodAccelActionBarModule;
  8095.   ULONG      idAccelTable;
  8096.   ULONG      idActionBar;
  8097.   PSZ        pszHelpWindowTitle;
  8098.   ULONG      fShowPanelId;
  8099.   PSZ        pszHelpLibraryName;
  8100. } HELPINIT;
  8101. typedef HELPINIT *PHELPINIT;
  8102.  
  8103. typedef struct
  8104. {
  8105.   ULONG cb;
  8106.   HAB   hAB;
  8107.   HMQ   hmq;
  8108.   ULONG ObjectID;
  8109.   HWND  hWndParent;
  8110.   HWND  hWndOwner;
  8111.   HWND  hWndACVP;
  8112. } ACVP;
  8113. typedef ACVP *PACVP;
  8114.  
  8115. BOOL DdfBeginList (HDDF hddf, ULONG ulWidthDT, ULONG fBreakType,
  8116.     ULONG fSpacing);
  8117. BOOL DdfBitmap (HDDF hddf, HBITMAP hbm, ULONG fAlign);
  8118. BOOL DdfEndList (HDDF hddf);
  8119. BOOL DdfHyperText (HDDF hddf, CONSTPSZ pszText, CONSTPSZ pszReference,
  8120.     ULONG fReferenceType);
  8121. BOOL DdfInform (HDDF hddf, CONSTPSZ pszText, ULONG resInformNumber);
  8122. HDDF DdfInitialize (HWND hwndHelpInstance, ULONG cbBuffer, ULONG ulIncrement);
  8123. BOOL DdfListItem (HDDF hddf, CONSTPSZ pszTerm, CONSTPSZ pszDescription);
  8124. BOOL DdfMetafile (HDDF hddf, HMF hmf, __const__ RECTL *prclRect);
  8125. BOOL DdfPara (HDDF hddf);
  8126. BOOL DdfSetColor (HDDF hddf, COLOR fBackColor, COLOR fForColor);
  8127. BOOL DdfSetFont (HDDF hddf, CONSTPSZ pszFaceName, ULONG ulWidth,
  8128.     ULONG ulHeight);
  8129. BOOL DdfSetFontStyle (HDDF hddf, ULONG fFontStyle);
  8130. BOOL DdfSetFormat (HDDF hddf, ULONG fFormatType);
  8131. BOOL DdfSetTextAlign (HDDF hddf, ULONG fAlign);
  8132. BOOL DdfText (HDDF hddf, CONSTPSZ pszText);
  8133.  
  8134. BOOL WinAssociateHelpInstance (HWND hwndHelpInstance, HWND hwndApp);
  8135. HWND WinCreateHelpInstance (HAB hab, PHELPINIT phinitHMInitStructure);
  8136. BOOL WinCreateHelpTable (HWND hwndHelpInstance,
  8137.     __const__ HELPTABLE *phtHelpTable);
  8138. BOOL WinDestroyHelpInstance (HWND hwndHelpInstance);
  8139. BOOL WinLoadHelpTable (HWND hwndHelpInstance, ULONG idHelpTable,
  8140.     HMODULE Module);
  8141. HWND WinQueryHelpInstance (HWND hwndApp);
  8142.  
  8143. /* ---------------------- Advanced Video ---------------------------------- */
  8144.  
  8145. #if defined (INCL_AVIO)
  8146.  
  8147. typedef USHORT HVPS;
  8148. typedef HVPS *PHVPS;
  8149.  
  8150. USHORT VioAssociate (HDC hdc, HVPS hvps);
  8151. USHORT VioCreateLogFont (PFATTRS pfatattrs, LONG llcid, PSTR8 pName,
  8152.     HVPS hvps);
  8153. USHORT VioCreatePS (PHVPS phvps, SHORT sDepth, SHORT sWidth, SHORT sFormat,
  8154.     SHORT sAttrs, HVPS hvpsReserved);
  8155. USHORT VioDeleteSetId (LONG llcid, HVPS hvps);
  8156. USHORT VioDestroyPS (HVPS hvps);
  8157. USHORT VioGetDeviceCellSize (PSHORT psHeight, PSHORT psWidth, HVPS hvps);
  8158. USHORT VioGetOrg (PSHORT psRow, PSHORT psColumn, HVPS hvps);
  8159. USHORT VioQueryFonts (PLONG plRemfonts, PFONTMETRICS afmMetrics,
  8160.     LONG lMetricsLength, PLONG plFonts, PSZ pszFacename, ULONG flOptions,
  8161.     HVPS hvps);
  8162. USHORT VioQuerySetIds (PLONG allcids, PSTR8 pNames, PLONG alTypes, LONG lcount,
  8163.     HVPS hvps);
  8164. USHORT VioSetDeviceCellSize (SHORT sHeight, SHORT sWidth, HVPS hvps);
  8165. USHORT VioSetOrg (SHORT sRow, SHORT sColumn, HVPS hvps);
  8166. USHORT VioShowPS (SHORT sDepth, SHORT sWidth, SHORT soffCell, HVPS hvps);
  8167.  
  8168. MRESULT WinDefAVioWindowProc (HWND hwnd, USHORT msg, ULONG mp1, ULONG mp2);
  8169.  
  8170. #endif /* INCL_AVIO */
  8171.  
  8172. /* -------------------------- SUBSYSTEMS ---------------------------------- */
  8173.  
  8174. #if defined (INCL_SUB)
  8175. #define INCL_KBD
  8176. #define INCL_VIO
  8177. #define INCL_MOU
  8178. #endif
  8179.  
  8180. #if defined (INCL_KBD)
  8181.  
  8182. #define IO_WAIT                         0
  8183. #define IO_NOWAIT                       1
  8184.  
  8185. #define KBDSTF_RIGHTSHIFT               0x0001
  8186. #define KBDSTF_LEFTSHIFT                0x0002
  8187. #define KBDSTF_CONTROL                  0x0004
  8188. #define KBDSTF_ALT                      0x0008
  8189. #define KBDSTF_SCROLLLOCK_ON            0x0010
  8190. #define KBDSTF_NUMLOCK_ON               0x0020
  8191. #define KBDSTF_CAPSLOCK_ON              0x0040
  8192. #define KBDSTF_INSERT_ON                0x0080
  8193. #define KBDSTF_LEFTCONTROL              0x0100
  8194. #define KBDSTF_LEFTALT                  0x0200
  8195. #define KBDSTF_RIGHTCONTROL             0x0400
  8196. #define KBDSTF_RIGHTALT                 0x0800
  8197. #define KBDSTF_SCROLLLOCK               0x1000
  8198. #define KBDSTF_NUMLOCK                  0x2000
  8199. #define KBDSTF_CAPSLOCK                 0x4000
  8200. #define KBDSTF_SYSREQ                   0x8000
  8201.  
  8202. #define KBDTRF_SHIFT_KEY_IN             0x01
  8203. #define KBDTRF_EXTENDED_CODE            0x02
  8204. #define KBDTRF_CONVERSION_REQUEST       0x20
  8205. #define KBDTRF_FINAL_CHAR_IN            0x40
  8206. #define KBDTRF_INTERIM_CHAR_IN          0x80
  8207.  
  8208. #define KEYBOARD_ECHO_ON                0x0001
  8209. #define KEYBOARD_ECHO_OFF               0x0002
  8210. #define KEYBOARD_BINARY_MODE            0x0004
  8211. #define KEYBOARD_ASCII_MODE             0x0008
  8212. #define KEYBOARD_MODIFY_STATE           0x0010
  8213. #define KEYBOARD_MODIFY_INTERIM         0x0020
  8214. #define KEYBOARD_MODIFY_TURNAROUND      0x0040
  8215. #define KEYBOARD_2B_TURNAROUND          0x0080
  8216. #define KEYBOARD_SHIFT_REPORT           0x0100
  8217.  
  8218. #define KR_KBDCHARIN                    0x00000001
  8219. #define KR_KBDPEEK                      0x00000002
  8220. #define KR_KBDFLUSHBUFFER               0x00000004
  8221. #define KR_KBDGETSTATUS                 0x00000008
  8222. #define KR_KBDSETSTATUS                 0x00000010
  8223. #define KR_KBDSTRINGIN                  0x00000020
  8224. #define KR_KBDOPEN                      0x00000040
  8225. #define KR_KBDCLOSE                     0x00000080
  8226. #define KR_KBDGETFOCUS                  0x00000100
  8227. #define KR_KBDFREEFOCUS                 0x00000200
  8228. #define KR_KBDGETCP                     0x00000400
  8229. #define KR_KBDSETCP                     0x00000800
  8230. #define KR_KBDXLATE                     0x00001000
  8231. #define KR_KBDSETCUSTXT                 0x00002000
  8232.  
  8233. typedef USHORT HKBD;
  8234. typedef HKBD *PHKBD;
  8235.  
  8236. typedef struct
  8237. {
  8238.   UCHAR  chChar;
  8239.   UCHAR  chScan;
  8240.   UCHAR  fbStatus;
  8241.   UCHAR  bNlsShift;
  8242.   USHORT fsState;
  8243.   ULONG  time;
  8244. } KBDKEYINFO;
  8245. typedef KBDKEYINFO *PKBDKEYINFO;
  8246.  
  8247. typedef struct
  8248. {
  8249.   USHORT cb;
  8250.   USHORT fsMask;
  8251.   USHORT chTurnAround;
  8252.   USHORT fsInterim;
  8253.   USHORT fsState;
  8254. } KBDINFO;
  8255. typedef KBDINFO *PKBDINFO;
  8256.  
  8257. typedef struct
  8258. {
  8259.   USHORT cb;
  8260.   USHORT idKbd;
  8261.   USHORT usReserved1;
  8262.   USHORT usReserved2;
  8263. } KBDHWID;
  8264. typedef KBDHWID *PKBDHWID;
  8265.  
  8266. typedef struct
  8267. {
  8268.   UCHAR  chChar;
  8269.   UCHAR  chScan;
  8270.   UCHAR  fbStatus;
  8271.   UCHAR  bNlsShift;
  8272.   USHORT fsState;
  8273.   ULONG  time;
  8274.   USHORT fsDD;
  8275.   USHORT fsXlate;
  8276.   USHORT fsShift;
  8277.   USHORT sZero;
  8278. } KBDTRANS;
  8279. typedef KBDTRANS *PKBDTRANS;
  8280.  
  8281. typedef struct
  8282. {
  8283.   USHORT cb;
  8284.   USHORT cchIn;
  8285. } STRINGINBUF;
  8286. typedef STRINGINBUF *PSTRINGINBUF;
  8287.  
  8288. USHORT KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd);
  8289. USHORT KbdClose (HKBD hkbd);
  8290. USHORT KbdDeRegister (VOID);
  8291. USHORT KbdFlushBuffer (HKBD hkbd);
  8292. USHORT KbdFreeFocus (HKBD hkbd);
  8293. USHORT KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd);
  8294. USHORT KbdGetFocus (USHORT fWait, HKBD hkbd);
  8295. USHORT KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
  8296. USHORT KbdGetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
  8297. USHORT KbdOpen (PHKBD phkbd);
  8298. USHORT KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd);
  8299. USHORT KbdRegister (CONSTPSZ pszModName, CONSTPSZ pszEntryName,
  8300.     ULONG ulFunMask);
  8301. USHORT KbdSetCp (USHORT usReserved, USHORT idCP, HKBD hkbd);
  8302. USHORT KbdSetCustXt (PUSHORT pusCodePage, HKBD hkbd);
  8303. USHORT KbdSetFgnd (VOID);
  8304. USHORT KbdSetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
  8305. USHORT KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
  8306. USHORT KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fWait, HKBD hkbd);
  8307. USHORT KbdSynch (USHORT fWait);
  8308. USHORT KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd);
  8309.  
  8310. #endif /* INCL_KBD */
  8311.  
  8312. #if defined (INCL_VIO)
  8313.  
  8314. #define ANSI_OFF                        0
  8315. #define ANSI_ON                         1
  8316.  
  8317. #define COLORS_2                        0x01
  8318. #define COLORS_4                        0x02
  8319. #define COLORS_16                       0x04
  8320.  
  8321. #define VGMT_OTHER                      0x01
  8322. #define VGMT_GRAPHICS                   0x02
  8323. #define VGMT_DISABLEBURST               0x04
  8324.  
  8325. #define VP_NOWAIT                       0x0000
  8326. #define VP_WAIT                         0x0001
  8327. #define VP_OPAQUE                       0x0000
  8328. #define VP_TRANSPARENT                  0x0002
  8329.  
  8330. #define VMWR_POPUP                      0
  8331. #define VMWN_POPUP                      0
  8332.  
  8333. #define VSRWI_SAVEANDREDRAW             0
  8334. #define VSRWI_REDRAW                    1
  8335.  
  8336. #define VSRWN_SAVE                      0
  8337. #define VSRWN_REDRAW                    1
  8338.  
  8339. #define UNDOI_GETOWNER                  0
  8340. #define UNDOI_RELEASEOWNER              1
  8341.  
  8342. #define UNDOK_ERRORCODE                 0
  8343. #define UNDOK_TERMINATE                 1
  8344.  
  8345. #define LOCKIO_NOWAIT                   0
  8346. #define LOCKIO_WAIT                     1
  8347.  
  8348. #define LOCK_SUCCESS                    0
  8349. #define LOCK_FAIL                       1
  8350.  
  8351. #define VCC_SBCSCHAR                    0
  8352. #define VCC_DBCSFULLCHAR                1
  8353. #define VCC_DBCS1STHALF                 2
  8354. #define VCC_DBCS2NDHALF                 3
  8355.  
  8356. #define VGFI_GETCURFONT                 0
  8357. #define VGFI_GETROMFONT                 1
  8358.  
  8359. #define VIO_CONFIG_CURRENT              0
  8360. #define VIO_CONFIG_PRIMARY              1
  8361. #define VIO_CONFIG_SECONDARY            2
  8362.  
  8363. #define DISPLAY_MONOCHROME              0
  8364. #define DISPLAY_CGA                     1
  8365. #define DISPLAY_EGA                     2
  8366. #define DISPLAY_VGA                     3
  8367. #define DISPLAY_8514A                   7
  8368. #define DISPLAY_IMAGEADAPTER            8
  8369. #define DISPLAY_XGA                     9
  8370.  
  8371. #define MONITOR_MONOCHROME              0x0000
  8372. #define MONITOR_COLOR                   0x0001
  8373. #define MONITOR_ENHANCED                0x0002
  8374. #define MONITOR_8503                    0x0003
  8375. #define MONITOR_851X_COLOR              0x0004
  8376. #define MONITOR_8514                    0x0009
  8377. #define MONITOR_FLATPANEL               0x000a
  8378. #define MONITOR_8507_8604               0x000b
  8379. #define MONITOR_8515                    0x000c
  8380. #define MONITOR_9515                    0x000f
  8381. #define MONITOR_9517                    0x0011
  8382. #define MONITOR_9518                    0x0012
  8383.  
  8384. #define VR_VIOGETCURPOS                 0x00000001
  8385. #define VR_VIOGETCURTYPE                0x00000002
  8386. #define VR_VIOGETMODE                   0x00000004
  8387. #define VR_VIOGETBUF                    0x00000008
  8388. #define VR_VIOGETPHYSBUF                0x00000010
  8389. #define VR_VIOSETCURPOS                 0x00000020
  8390. #define VR_VIOSETCURTYPE                0x00000040
  8391. #define VR_VIOSETMODE                   0x00000080
  8392. #define VR_VIOSHOWBUF                   0x00000100
  8393. #define VR_VIOREADCHARSTR               0x00000200
  8394. #define VR_VIOREADCELLSTR               0x00000400
  8395. #define VR_VIOWRTNCHAR                  0x00000800
  8396. #define VR_VIOWRTNATTR                  0x00001000
  8397. #define VR_VIOWRTNCELL                  0x00002000
  8398. #define VR_VIOWRTTTY                    0x00004000
  8399. #define VR_VIOWRTCHARSTR                0x00008000
  8400. #define VR_VIOWRTCHARSTRATT             0x00010000
  8401. #define VR_VIOWRTCELLSTR                0x00020000
  8402. #define VR_VIOSCROLLUP                  0x00040000
  8403. #define VR_VIOSCROLLDN                  0x00080000
  8404. #define VR_VIOSCROLLLF                  0x00100000
  8405. #define VR_VIOSCROLLRT                  0x00200000
  8406. #define VR_VIOSETANSI                   0x00400000
  8407. #define VR_VIOGETANSI                   0x00800000
  8408. #define VR_VIOPRTSC                     0x01000000
  8409. #define VR_VIOSCRLOCK                   0x02000000
  8410. #define VR_VIOSCRUNLOCK                 0x04000000
  8411. #define VR_VIOSAVREDRAWWAIT             0x08000000
  8412. #define VR_VIOSAVREDRAWUNDO             0x10000000
  8413. #define VR_VIOPOPUP                     0x20000000
  8414. #define VR_VIOENDPOPUP                  0x40000000
  8415. #define VR_VIOPRTSCTOGGLE               0x80000000
  8416.  
  8417. #define VR_VIOMODEWAIT                  0x00000001
  8418. #define VR_VIOMODEUNDO                  0x00000002
  8419. #define VR_VIOGETFONT                   0x00000004
  8420. #define VR_VIOGETCONFIG                 0x00000008
  8421. #define VR_VIOSETCP                     0x00000010
  8422. #define VR_VIOGETCP                     0x00000020
  8423. #define VR_VIOSETFONT                   0x00000040
  8424. #define VR_VIOGETSTATE                  0x00000080
  8425. #define VR_VIOSETSTATE                  0x00000100
  8426.  
  8427.  
  8428. typedef USHORT HVIO;
  8429. typedef HVIO *PHVIO;
  8430.  
  8431.  
  8432. typedef struct
  8433. {
  8434.   USHORT cb;
  8435.   UCHAR  fbType;
  8436.   UCHAR  color;
  8437.   USHORT col;
  8438.   USHORT row;
  8439.   USHORT hres;
  8440.   USHORT vres;
  8441.   UCHAR  fmt_ID;
  8442.   UCHAR  attrib;
  8443.   ULONG  buf_addr;
  8444.   ULONG  buf_length;
  8445.   ULONG  full_length;
  8446.   ULONG  partial_length;
  8447.   PCH    ext_data_addr;
  8448. } VIOMODEINFO;
  8449. typedef VIOMODEINFO *PVIOMODEINFO;
  8450.  
  8451. typedef struct
  8452. {
  8453.   USHORT cb;
  8454.   USHORT adapter;
  8455.   USHORT display;
  8456.   ULONG  cbMemory;
  8457.   USHORT Configuration;
  8458.   USHORT VDHVersion;
  8459.   USHORT Flags;
  8460.   ULONG  HWBufferSize;
  8461.   ULONG  FullSaveSize;
  8462.   ULONG  PartSaveSize;
  8463.   USHORT EMAdaptersOFF;
  8464.   USHORT EMDisplaysOFF;
  8465. } VIOCONFIGINFO;
  8466. typedef VIOCONFIGINFO *PVIOCONFIGINFO;
  8467.  
  8468. typedef struct
  8469. {
  8470.   PBYTE pBuf;
  8471.   ULONG cb;
  8472.   SEL   asel[1];
  8473. } VIOPHYSBUF;
  8474. typedef VIOPHYSBUF *PVIOPHYSBUF;
  8475.  
  8476. typedef struct
  8477. {
  8478.   USHORT cb;
  8479.   USHORT type;
  8480.   USHORT iFirst;
  8481.   USHORT acolor[1];
  8482. } VIOPALSTATE;
  8483. typedef VIOPALSTATE *PVIOPALSTATE;
  8484.  
  8485. typedef struct
  8486. {
  8487.   USHORT cb;
  8488.   USHORT type;
  8489.   USHORT color;
  8490. } VIOOVERSCAN;
  8491. typedef VIOOVERSCAN *PVIOOVERSCAN;
  8492.  
  8493. typedef struct
  8494. {
  8495.   USHORT cb;
  8496.   USHORT type;
  8497.   USHORT fs;
  8498. } VIOINTENSITY;
  8499. typedef VIOINTENSITY *PVIOINTENSITY;
  8500.  
  8501. typedef struct
  8502. {
  8503.   USHORT cb;
  8504.   USHORT type;
  8505.   USHORT firstcolorreg;
  8506.   USHORT numcolorregs;
  8507.   PCH    colorregaddr;
  8508. } VIOCOLORREG;
  8509. typedef VIOCOLORREG *PVIOCOLORREG;
  8510.  
  8511. typedef struct
  8512. {
  8513.   USHORT cb;
  8514.   USHORT type;
  8515.   USHORT scanline;
  8516. } VIOSETULINELOC;
  8517. typedef VIOSETULINELOC *PVIOSETULINELOC;
  8518.  
  8519. typedef struct
  8520. {
  8521.   USHORT cb;
  8522.   USHORT type;
  8523.   USHORT defaultalgorithm;
  8524. } VIOSETTARGET;
  8525. typedef VIOSETTARGET *PVIOSETTARGET;
  8526.  
  8527. typedef struct
  8528. {
  8529.   USHORT yStart;
  8530.   USHORT cEnd;
  8531.   USHORT cx;
  8532.   USHORT attr;
  8533. } VIOCURSORINFO;
  8534. typedef VIOCURSORINFO *PVIOCURSORINFO;
  8535.  
  8536. typedef struct
  8537. {
  8538.   USHORT cb;
  8539.   USHORT type;
  8540.   USHORT cxCell;
  8541.   USHORT cyCell;
  8542.   ULONG  pbData;                /* PVOID / _far16ptr */
  8543.   USHORT cbData;
  8544. } VIOFONTINFO;
  8545. typedef VIOFONTINFO *PVIOFONTINFO;
  8546.  
  8547.  
  8548. USHORT VioCheckCharType (PUSHORT pType, USHORT usRow, USHORT usColumn,
  8549.     HVIO hvio);
  8550. USHORT VioDeRegister (VOID);
  8551. USHORT VioEndPopUp (HVIO hvio);
  8552. USHORT VioGetAnsi (PUSHORT pfAnsi, HVIO hvio);
  8553. USHORT VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio);
  8554. USHORT VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin, HVIO hvio);
  8555. USHORT VioGetCp (USHORT usReserved, PUSHORT pusCodePage, HVIO hvio);
  8556. USHORT VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio);
  8557. USHORT VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
  8558. USHORT VioGetFont (PVIOFONTINFO pviofi, HVIO hvio);
  8559. USHORT VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
  8560. USHORT VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved);
  8561. USHORT VioGlobalReg (CONSTPSZ pszModName, CONSTPSZ pszEntryName,
  8562.     ULONG ulFunMask1, ULONG ulFunMask2, USHORT usReturn);
  8563. USHORT VioModeUndo (USHORT usOwnerInd, USHORT usKillInd, USHORT usReserved);
  8564. USHORT VioModeWait (USHORT usReqType, PUSHORT pNotifyType, USHORT usReserved);
  8565. USHORT VioPopUp (PUSHORT pfWait, HVIO hvio);
  8566. USHORT VioPrtSc (HVIO hvio);
  8567. USHORT VioPrtScToggle (HVIO hvio);
  8568. USHORT VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow,
  8569.     USHORT usColumn, HVIO hvio);
  8570. USHORT VioReadCharStr (PCH pch, PUSHORT pcb, USHORT usRow, USHORT usColumn,
  8571.     HVIO hvio);
  8572. USHORT VioRegister (CONSTPSZ pszModName, CONSTPSZ pszEntryName,
  8573.     ULONG ulFunMask1, ULONG ulFunMask2);
  8574. USHORT VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd,
  8575.     USHORT usReserved);
  8576. USHORT VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pusNotifyType,
  8577.     USHORT usReserved);
  8578. USHORT VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio);
  8579. USHORT VioScrollDn (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
  8580.     USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio);
  8581. USHORT VioScrollLf (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
  8582.     USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio);
  8583. USHORT VioScrollRt (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
  8584.     USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio);
  8585. USHORT VioScrollUp (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
  8586.     USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio);
  8587. USHORT VioScrUnLock (HVIO hvio);
  8588. USHORT VioSetAnsi (USHORT fAnsi, HVIO hvio);
  8589. USHORT VioSetCp (USHORT usReserved, USHORT usCodePage, HVIO hvio);
  8590. USHORT VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio);
  8591. USHORT VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
  8592. USHORT VioSetFont (PVIOFONTINFO pviofi, HVIO hvio);
  8593. USHORT VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
  8594. USHORT VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio);
  8595. USHORT VioWrtCellStr (CONSTPCH pchCellStr, USHORT cb, USHORT usRow,
  8596.     USHORT usColumn, HVIO hvio);
  8597. USHORT VioWrtCharStr (CONSTPCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
  8598.     HVIO hvio);
  8599. USHORT VioWrtCharStrAtt (CONSTPCH pch, USHORT cb, USHORT usRow,
  8600.     USHORT usColumn, PBYTE pAttr, HVIO hvio);
  8601. USHORT VioWrtNAttr (__const__ BYTE *pAttr, USHORT cb, USHORT usRow,
  8602.     USHORT usColumn, HVIO hvio);
  8603. USHORT VioWrtNCell (__const__ BYTE *pCell, USHORT cb, USHORT usRow,
  8604.     USHORT usColumn, HVIO hvio);
  8605. USHORT VioWrtNChar (CONSTPCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
  8606.     HVIO hvio);
  8607. USHORT VioWrtTTY (CONSTPCH pch, USHORT cb, HVIO hvio);
  8608.  
  8609. #endif /* INCL_VIO */
  8610.  
  8611. #if defined (INCL_MOU)
  8612.  
  8613. #define MHK_BUTTON1                     0x0001
  8614. #define MHK_BUTTON2                     0x0002
  8615. #define MHK_BUTTON3                     0x0004
  8616.  
  8617. #define MOU_NOWAIT                      0x0000
  8618. #define MOU_WAIT                        0x0001
  8619.  
  8620. #define MOUSE_MOTION                    0x0001
  8621. #define MOUSE_MOTION_WITH_BN1_DOWN      0x0002
  8622. #define MOUSE_BN1_DOWN                  0x0004
  8623. #define MOUSE_MOTION_WITH_BN2_DOWN      0x0008
  8624. #define MOUSE_BN2_DOWN                  0x0010
  8625. #define MOUSE_MOTION_WITH_BN3_DOWN      0x0020
  8626. #define MOUSE_BN3_DOWN                  0x0040
  8627.  
  8628. #define MOUSE_QUEUEBUSY                 0x0001
  8629. #define MOUSE_BLOCKREAD                 0x0002
  8630. #define MOUSE_FLUSH                     0x0004
  8631. #define MOUSE_UNSUPPORTED_MODE          0x0008
  8632. #define MOUSE_DISABLED                  0x0100
  8633. #define MOUSE_MICKEYS                   0x0200
  8634.  
  8635. #define MOU_NODRAW                      0x0001
  8636. #define MOU_DRAW                        0x0000
  8637. #define MOU_MICKEYS                     0x0002
  8638. #define MOU_PELS                        0x0000
  8639.  
  8640. #define MR_MOUGETNUMBUTTONS             0x00000001
  8641. #define MR_MOUGETNUMMICKEYS             0x00000002
  8642. #define MR_MOUGETDEVSTATUS              0x00000004
  8643. #define MR_MOUGETNUMQUEEL               0x00000008
  8644. #define MR_MOUREADEVENTQUE              0x00000010
  8645. #define MR_MOUGETSCALEFACT              0x00000020
  8646. #define MR_MOUGETEVENTMASK              0x00000040
  8647. #define MR_MOUSETSCALEFACT              0x00000080
  8648. #define MR_MOUSETEVENTMASK              0x00000100
  8649. #define MR_MOUOPEN                      0x00000800
  8650. #define MR_MOUCLOSE                     0x00001000
  8651. #define MR_MOUGETPTRSHAPE               0x00002000
  8652. #define MR_MOUSETPTRSHAPE               0x00004000
  8653. #define MR_MOUDRAWPTR                   0x00008000
  8654. #define MR_MOUREMOVEPTR                 0x00010000
  8655. #define MR_MOUGETPTRPOS                 0x00020000
  8656. #define MR_MOUSETPTRPOS                 0x00040000
  8657. #define MR_MOUINITREAL                  0x00080000
  8658. #define MR_MOUSETDEVSTATUS              0x00100000
  8659.  
  8660.  
  8661. typedef USHORT HMOU;
  8662. typedef HMOU *PHMOU;
  8663.  
  8664.  
  8665. typedef struct
  8666. {
  8667.   USHORT fs;
  8668.   ULONG  time;
  8669.   SHORT  row;
  8670.   SHORT  col;
  8671. } MOUEVENTINFO;
  8672. typedef MOUEVENTINFO *PMOUEVENTINFO;
  8673.  
  8674. typedef struct
  8675. {
  8676.   USHORT cEvents;
  8677.   USHORT cmaxEvents;
  8678. } MOUQUEINFO;
  8679. typedef MOUQUEINFO *PMOUQUEINFO;
  8680.  
  8681. typedef struct
  8682. {
  8683.   USHORT row;
  8684.   USHORT col;
  8685. } PTRLOC;
  8686. typedef PTRLOC *PPTRLOC;
  8687.  
  8688. typedef struct
  8689. {
  8690.   USHORT row;
  8691.   USHORT col;
  8692.   USHORT cRow;
  8693.   USHORT cCol;
  8694. } NOPTRRECT;
  8695. typedef NOPTRRECT *PNOPTRRECT;
  8696.  
  8697. typedef struct
  8698. {
  8699.   USHORT cb;
  8700.   USHORT col;
  8701.   USHORT row;
  8702.   USHORT colHot;
  8703.   USHORT rowHot;
  8704. } PTRSHAPE;
  8705. typedef PTRSHAPE *PPTRSHAPE;
  8706.  
  8707. typedef struct
  8708. {
  8709.   USHORT rowScale;
  8710.   USHORT colScale;
  8711. } SCALEFACT;
  8712. typedef SCALEFACT *PSCALEFACT;
  8713.  
  8714. typedef struct
  8715. {
  8716.   USHORT Length;
  8717.   USHORT Level1;
  8718.   USHORT Lev1Mult;
  8719.   USHORT Level2;
  8720.   USHORT lev2Mult;
  8721. } THRESHOLD;
  8722. typedef THRESHOLD *PTHRESHOLD;
  8723.  
  8724.  
  8725. USHORT MouClose (HMOU hmou);
  8726. USHORT MouDeRegister (VOID);
  8727. USHORT MouDrawPtr (HMOU hmou);
  8728. USHORT MouFlushQue (HMOU hmou);
  8729. USHORT MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
  8730. USHORT MouGetEventMask (PUSHORT pfsEvents, HMOU hmou);
  8731. USHORT MouGetNumButtons (PUSHORT pcButtons, HMOU hmou);
  8732. USHORT MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou);
  8733. USHORT MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou);
  8734. USHORT MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
  8735. USHORT MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
  8736. USHORT MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
  8737. USHORT MouGetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
  8738. USHORT MouInitReal (CONSTPSZ pszDriverName);
  8739. USHORT MouOpen (CONSTPSZ pszDvrName, PHMOU phmou);
  8740. USHORT MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait, HMOU hmou);
  8741. USHORT MouRegister (CONSTPSZ pszModName, CONSTPSZ pszEntryName,
  8742.     ULONG ulFunMask);
  8743. USHORT MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou);
  8744. USHORT MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
  8745. USHORT MouSetEventMask (PUSHORT pfsEvents, HMOU hmou);
  8746. USHORT MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
  8747. USHORT MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
  8748. USHORT MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
  8749. USHORT MouSetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
  8750. USHORT MouSynch (USHORT fWait);
  8751.  
  8752. #endif /* INCL_MOU */
  8753.  
  8754. /* ------------------------------ THE END --------------------------------- */
  8755.  
  8756. #pragma pack(4)
  8757.  
  8758. #endif /* !defined (_OS2EMX_H) */
  8759.