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