Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1793 lines
52 KiB

  1. /*++ BUILD Version: 0002
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 1991, Microsoft Corporation
  6. *
  7. * WOW.H
  8. * Constants, macros, etc common to WOW16/WOW32
  9. *
  10. * History:
  11. * Created 25-Jan-1991 by Jeff Parsons (jeffpar)
  12. * Added SHELL defines 14-April-92 Chandan Chauhan (ChandanC)
  13. * and Win 31 parameter validation support.
  14. * Modified 12-May-1992 by Mike Tricker (MikeTri) Added MultiMedia declarations
  15. * and callback support
  16. *
  17. --*/
  18. #define WIN31
  19. #include <mvdm.h>
  20. #include <bop.h>
  21. #ifndef NOEXTERNS
  22. #include <softpc.h>
  23. #endif
  24. #include <wownt32.h>
  25. #ifdef i386
  26. #ifndef DEBUG // should be DEBUG_OR_WOWPROFILE, but
  27. // that won't work for assembler as things are.
  28. //
  29. // Flag to control enable/disable W32TryCall function.
  30. //
  31. #define NO_W32TRYCALL 1
  32. #endif
  33. #endif
  34. /* WOW constants
  35. */
  36. #define MAX_VDMFILENAME 144 // must be >= 144 (see GetTempFileName)
  37. #define GRAINYTIC_RES 0x3f // will truncate to lower multiple of 64
  38. /* Logging/debugging macros
  39. */
  40. /* XLATOFF */
  41. #define GRAINYTICS(dwordtickcount) ((dwordtickcount) & (~GRAINYTIC_RES))
  42. #define IFLOG(l) if (l==iLogLevel && (iLogLevel&1) || l<=iLogLevel && !(iLogLevel&1) || l == 0)
  43. #define OPENLOG() (hfLog != (HANDLE)-1?hfLog:(hfLog=CreateFile("log",GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL)))
  44. #define APPENDLOG() if (hfLog == (HANDLE)-1) {hfLog=CreateFile("log",GENERIC_WRITE,FILE_SHARE_READ,NULL,OPEN_ALWAYS,0,NULL) ; SetFilePointer (hfLog,0,NULL,FILE_END); }
  45. #define CLOSELOG() if (hfLog != (HANDLE)-1) {CloseHandle(hfLog); hfLog=(HANDLE)-1;}
  46. #undef LOG
  47. #ifdef NOLOG
  48. #define LOG(l,args)
  49. #define SETREQLOG(l)
  50. #else
  51. #define SETREQLOG(l) iReqLogLevel = (l)
  52. #define LOG(l,args) {SETREQLOG(l) ; logprintf args;}
  53. #endif
  54. #define MODNAME(module)
  55. #ifdef DEBUG
  56. #define STATIC
  57. #define INT3() _asm int 3
  58. #define IFDEBUG(f) if (f)
  59. #define ELSEDEBUG else
  60. #define LOGDEBUG(l,args) LOG(l,args)
  61. #else
  62. #define STATIC static
  63. #define INT3()
  64. #define IFDEBUG(f)
  65. #define ELSEDEBUG
  66. #define LOGDEBUG(l,args)
  67. #endif
  68. /* XLATON */
  69. /* 16-bit Windows constants
  70. */
  71. #define CW_USEDEFAULT16 ((SHORT)0x8000)
  72. /* 16-bit Windows types
  73. */
  74. typedef WORD HAND16;
  75. typedef WORD HTASK16;
  76. typedef WORD HINST16;
  77. typedef WORD HMOD16;
  78. typedef WORD HRES16;
  79. typedef WORD HRESI16;
  80. typedef WORD HRESD16;
  81. typedef WORD HWND16;
  82. typedef WORD HMENU16;
  83. typedef WORD HDC16;
  84. typedef WORD HRGN16;
  85. typedef WORD HICON16;
  86. typedef WORD HCUR16;
  87. typedef WORD HBRSH16;
  88. typedef WORD HPAL16;
  89. typedef WORD HBM16;
  90. typedef WORD HFONT16;
  91. typedef WORD HMEM16;
  92. typedef DWORD HHOOK16;
  93. typedef WORD HMMIO16; // for MultiMedia - MikeTri 12-May-1992
  94. typedef WORD HMIDIIN16;
  95. typedef WORD HMIDIOUT16;
  96. typedef WORD HWAVEIN16;
  97. typedef WORD HWAVEOUT16;
  98. typedef WORD HDRVR16;
  99. typedef DWORD HPSTR16;
  100. typedef SHORT INT16;
  101. typedef SHORT BOOL16;
  102. /* 16-bit pointer types (VP == VDM Ptr)
  103. */
  104. typedef DWORD VPVOID; // VDM address (seg:off)
  105. typedef VPVOID VPBYTE; //
  106. typedef VPVOID VPWORD; //
  107. typedef VPVOID VPDWORD; //
  108. typedef VPVOID VPSHORT; //
  109. typedef VPVOID VPLONG; //
  110. typedef VPVOID VPSTR; // should use VPSZ or VPBYTE instead, as approp.
  111. typedef VPVOID VPSZ; //
  112. typedef VPVOID VPPROC; //
  113. typedef VPVOID VPWNDPROC; //
  114. typedef VPVOID VPINT16; //
  115. typedef VPVOID VPBOOL16; //
  116. typedef VPVOID *PVPVOID; // pointer to VDM address
  117. typedef VPVOID VPCSTR; // MultiMedia Extensions - MikeTri 12-May-1992
  118. typedef VPVOID VPMMIOPROC16;
  119. typedef VPVOID VPHMIDIIN16;
  120. typedef VPVOID VPHMIDIOUT16;
  121. typedef VPVOID VPPATCHARRAY16;
  122. typedef VPVOID VPKEYARRAY16;
  123. typedef VPVOID VPHWAVEIN16;
  124. typedef VPVOID VPHWAVEOUT16;
  125. typedef VPVOID VPTIMECALLBACK16;
  126. typedef VPVOID VPTASKCALLBACK16;
  127. /* Types
  128. */
  129. typedef ULONG (FASTCALL *LPFNW32)(PVDMFRAME);
  130. /* Dispatch table entry
  131. **
  132. */
  133. typedef struct _W32 { /* w32 */
  134. LPFNW32 lpfnW32; // function address
  135. #ifdef DEBUG_OR_WOWPROFILE
  136. LPSZ lpszW32; // function name (DEBUG version only)
  137. DWORD cbArgs; // # of bytes of arguments (DEBUG version only)
  138. DWORD cCalls; // # of times this API called
  139. LONGLONG cTics; // sum total # of tics ellapsed for all invocations
  140. #endif // DEBUG_OR_WOWPROFILE
  141. } W32, *PW32;
  142. /* XLATOFF */
  143. #pragma pack(1)
  144. /* XLATON */
  145. /* Window proc/dialog box callback function parameter format
  146. */
  147. typedef struct _PARMWP { /* wp */
  148. LONG lParam; //
  149. WORD wParam; //
  150. WORD wMsg; //
  151. WORD hwnd; //
  152. WORD hInst; // hInstance of window that we are returning to
  153. } PARMWP;
  154. /* EnumPropsProc callback function parameter format
  155. */
  156. typedef struct _PARMEPP { /* epp */
  157. HAND16 hData;
  158. VPVOID vpString;
  159. HWND16 hwnd;
  160. } PARMEPP;
  161. /* EnumWindows/EnumChildWindows/EnumTaskWindows callback function parameter format
  162. */
  163. typedef struct _PARMEWP { /* ewp */
  164. LONG lParam; // app-defined data
  165. HWND16 hwnd; // 16-bit window handle
  166. } PARMEWP;
  167. /* EnumFonts callback function parameter format
  168. */
  169. typedef struct _PARMEFP { /* efp */
  170. VPVOID vpData; // app-defined data
  171. SHORT nFontType; //
  172. VPVOID vpTextMetric; // pointer to TEXTMETRIC16
  173. VPVOID vpLogFont; // pointer to LOGFONT16
  174. } PARMEFP;
  175. /* EnumObj callback function parameter format
  176. */
  177. typedef struct _PARMEOP { /* eop */
  178. VPVOID vpData; // app-defined data
  179. VPVOID vpLogObject;
  180. } PARMEOP;
  181. /* EnumMetaFile callback function parameter format
  182. */
  183. typedef struct _PARMEMP { /* emp */
  184. VPVOID vpData; // app-defined data
  185. SHORT nObjects; // # objects
  186. VPVOID vpMetaRecord; // pointer to METARECORD16
  187. VPVOID vpHandleTable; // pointer to HANDLETABLE16
  188. HDC16 hdc; // hdc
  189. } PARMEMP;
  190. /* Hook Callback function parameter format
  191. */
  192. typedef struct _PARMHKP { /* hkp */
  193. VPVOID lParam;
  194. SHORT wParam;
  195. SHORT nCode; // action code
  196. } PARMHKP;
  197. /* Subclass Callback function parameter format
  198. */
  199. typedef struct _PARMSCP { /* scp */
  200. SHORT iOrdinal; // oridnal number;
  201. } PARMSCP;
  202. /* LineDDA Callback function parameter format
  203. */
  204. typedef struct _PARMDDA { /* dda */
  205. VPVOID vpData;
  206. SHORT y;
  207. SHORT x;
  208. } PARMDDA;
  209. /* Graystring callback function parameter format
  210. */
  211. typedef struct _PARMGST { /* gst */
  212. SHORT n;
  213. DWORD data;
  214. HDC16 hdc;
  215. } PARMGST;
  216. typedef struct _PARMDIR { /* cdir */
  217. SHORT wDrive;
  218. VPSZ vpDir; // directory name
  219. } PARMDIR;
  220. typedef struct _PARMSAP { /* sap */
  221. SHORT code; //
  222. HAND16 hPr;
  223. } PARMSAP;
  224. /* WordBreakProc callback function parameter format
  225. */
  226. typedef struct _PARMWBP { /* wbp */
  227. SHORT action;
  228. SHORT cbEditText;
  229. SHORT ichCurrentWord;
  230. VPVOID lpszEditText;
  231. } PARMWBP;
  232. /*++
  233. MultiMedia callback definitions added, and also to _PARM16 - MikeTri
  234. --*/
  235. /* midiInOpen (MidiInFunc) Callback function parameter format
  236. */
  237. typedef struct _PARMMIF { /* mif */
  238. DWORD dwParam2;
  239. DWORD dwParam1;
  240. DWORD dwInstance;
  241. WORD wMsg;
  242. HMIDIIN16 hMidiIn;
  243. } PARMMIF;
  244. /* midiOutOpen (MidiOutFunc) Callback function parameter format
  245. */
  246. typedef struct _PARMMOF { /* mof */
  247. DWORD dwParam2;
  248. DWORD dwParam1;
  249. DWORD dwInstance;
  250. WORD wMsg;
  251. HMIDIOUT16 hMidiOut;
  252. } PARMMOF;
  253. /* mmioInstallIOProc (IOProc) Callback function parameter format
  254. */
  255. typedef struct _PARMIOP { /* iop */
  256. LONG lParam2;
  257. LONG lParam1;
  258. WORD wMsg;
  259. VPVOID lpmmioinfo;
  260. } PARMIOP;
  261. /* timeSetEvent (TimeFunc) Callback function parameter format
  262. */
  263. typedef struct _PARMTIF { /* tif */
  264. DWORD dw2;
  265. DWORD dw1;
  266. DWORD dwUser;
  267. WORD wMsg;
  268. WORD wID;
  269. } PARMTIF;
  270. /* waveInOpen (WaveInFunc) Callback function parameter format
  271. */
  272. typedef struct _PARMWIF { /* wif */
  273. DWORD dwParam2;
  274. DWORD dwParam1;
  275. DWORD dwInstance;
  276. WORD wMsg;
  277. HWAVEIN16 hWaveIn;
  278. } PARMWIF;
  279. /* waveOutOpen (WaveOutFunc) Callback function parameter format
  280. */
  281. typedef struct _PARMWOF { /* wof */
  282. DWORD dwParam2;
  283. DWORD dwParam1;
  284. DWORD dwInstance;
  285. WORD wMsg;
  286. HWAVEOUT16 hWaveOut;
  287. } PARMWOF;
  288. /* WOWCallback16 function parameter format
  289. */
  290. typedef struct _PARMWCB16 { /* wcb16 */
  291. WORD wArgs[8];
  292. } PARMWCB16;
  293. typedef struct _PARMLSTRCMP { /* lstrcmp16 */
  294. VPVOID lpstr1;
  295. VPVOID lpstr2;
  296. } PARMLSTRCMP;
  297. /* PARM16 is the union of all the callback parameter structures
  298. */
  299. typedef union _PARM16 { /* parm16 */
  300. PARMWP WndProc; // for window procs
  301. PARMEWP EnumWndProc; // for window enum functions
  302. PARMEFP EnumFontProc; // for font enum functions
  303. PARMEOP EnumObjProc; // for obj enum functions
  304. PARMEMP EnumMetaProc; // for metafile enum functions
  305. PARMEPP EnumPropsProc; // for properties
  306. PARMHKP HookProc; // for Hooks
  307. PARMSCP SubClassProc; // for subclass thunks
  308. PARMDDA LineDDAProc; // for LineDDA
  309. PARMGST GrayStringProc; // for GrayString
  310. PARMDIR CurDir;
  311. PARMSAP SetAbortProc; // for SetAbortProc
  312. PARMMIF MidiInFunc; // for midiInOpen functions - MikeTri 27-Mar-1992
  313. PARMMOF MidiOutFunc; // for midiOutOpen functions
  314. PARMIOP IOProc; // for mmioInstallIOProc functions
  315. PARMTIF TimeFunc; // for timeSetEvent functions
  316. PARMWIF WaveInFunc; // for waveInOpen functions
  317. PARMWOF WaveOutFunc; // for waveOutOpen functions
  318. PARMWBP WordBreakProc; // for WordBreakProc
  319. PARMWCB16 WOWCallback16; // for WOWCallback16
  320. PARMLSTRCMP lstrcmpParms; // for WOWlstrcmp16 (pfnWowIlstrsmp to user32)
  321. } PARM16, *PPARM16;
  322. /* VDMFRAME is built by wow16cal.asm in the kernel, and is utilized
  323. * by all the WOW32 thunks
  324. */
  325. typedef struct _VDMFRAME { /* vf */
  326. WORD wTDB; // 16-bit kernel handle for calling task
  327. WORD wRetID; // internal call-back function ID Do NOT Move
  328. WORD wLocalBP; //
  329. WORD wDI; //
  330. WORD wSI; //
  331. WORD wAX; //
  332. WORD wDX; // keep DX right after AX!!!
  333. WORD wAppDS; // app DS at time of call
  334. WORD wGS;
  335. WORD wFS;
  336. WORD wCX; // REMOVE LATER
  337. WORD wES; // REMOVE LATER
  338. WORD wBX; // REMOVE LATER
  339. WORD wBP; // BP Chain +1
  340. VPVOID wThunkCSIP; // ret addr of THUNK
  341. DWORD wCallID; // internal WOW16 module/function ID
  342. WORD cbArgs; // byte count of args pushed
  343. VPVOID vpCSIP; // far return address to app
  344. BYTE bArgs; // start of arguments from app
  345. } VDMFRAME;
  346. typedef VDMFRAME UNALIGNED *PVDMFRAME;
  347. /* CBVDMFRAME is built by callback16 in wow32.dll and in wow16cal.asm
  348. * the definition of VDMFRAME and CBACKVDMFRAME must be in sync
  349. */
  350. typedef struct _CBVDMFRAME { /* cvf */
  351. WORD wTDB; // must match VDMFRAME
  352. WORD wRetID; // must match VDMFRAME
  353. WORD wLocalBP; // must match VDMFRAME
  354. PARM16 Parm16; // space for window/enum proc parameters
  355. VPVOID vpfnProc; // address of window/enum proc
  356. DWORD vpStack; // orginal ss:sp. used in callback16
  357. WORD wAX; //
  358. WORD wDX; // keep DX right after AX!!!
  359. WORD wGenUse1; // extra words for general use. for convenience
  360. WORD wGenUse2; // extra words for general use. for convenience
  361. } CBVDMFRAME;
  362. typedef CBVDMFRAME UNALIGNED *PCBVDMFRAME;
  363. typedef struct _POINT16 { /* pt16 */
  364. SHORT x;
  365. SHORT y;
  366. } POINT16;
  367. typedef POINT16 UNALIGNED *PPOINT16;
  368. typedef VPVOID VPPOINT16;
  369. /* POINTL16 is new for Win95 and is identical to Win32 POINT/POINTL structures */
  370. typedef struct _POINTL16 { /* ptl16 */
  371. LONG x;
  372. LONG y;
  373. } POINTL16;
  374. typedef POINTL16 UNALIGNED *PPOINTL16;
  375. typedef VPVOID VPPOINTL16;
  376. typedef struct _RASTERIZER_STATUS16 { /* rs16 */
  377. INT16 nSize;
  378. INT16 wFlags;
  379. INT16 nLanguageID;
  380. } RASTERIZER_STATUS16;
  381. typedef RASTERIZER_STATUS16 UNALIGNED *PRASTERIZER_STATUS16;
  382. typedef VPVOID VPRASTERIZER_STATUS16;
  383. typedef struct _GLYPHMETRICS16 { /*glyph16 */
  384. WORD gmBlackBoxX;
  385. WORD gmBlackBoxY;
  386. POINT16 gmptGlyphOrigin;
  387. INT16 gmCellIncX;
  388. INT16 gmCellIncY;
  389. } GLYPHMETRICS16;
  390. typedef GLYPHMETRICS16 UNALIGNED *PGLYPHMETRICS16;
  391. typedef VPVOID VPGLYPHMETRICS16;
  392. typedef struct _ABC16 { /* abc16 */
  393. INT16 abcA;
  394. WORD abcB;
  395. INT16 abcC;
  396. } ABC16;
  397. typedef ABC16 UNALIGNED *PABC16;
  398. typedef VPVOID VPABC16;
  399. typedef struct _FIXED16 { /* fxd16 */
  400. WORD fract;
  401. INT16 value;
  402. } FIXED16;
  403. typedef FIXED16 UNALIGNED *PFIXED16;
  404. typedef VPVOID VPFIXED16;
  405. typedef struct _MAT216 { /* mat216 */
  406. FIXED16 eM11;
  407. FIXED16 eM12;
  408. FIXED16 eM21;
  409. FIXED16 eM22;
  410. } MAT216;
  411. typedef MAT216 UNALIGNED *PMAT216;
  412. typedef VPVOID VPMAT216;
  413. /* 16-bit API structures, and their pointers
  414. */
  415. typedef struct _RECT16 { /* rc16 */
  416. SHORT left;
  417. SHORT top;
  418. SHORT right;
  419. SHORT bottom;
  420. } RECT16;
  421. typedef RECT16 UNALIGNED *PRECT16;
  422. typedef VPVOID VPRECT16;
  423. /* RECTL16 is new for Win95 and is identical to Win32 RECTL structure */
  424. typedef struct _RECTL16 { /* rcl16 */
  425. LONG left;
  426. LONG top;
  427. LONG right;
  428. LONG bottom;
  429. } RECTL16;
  430. typedef RECTL16 UNALIGNED *PRECTL16;
  431. typedef VPVOID VPRECTL16;
  432. typedef struct _KERNINGPAIR16 { /* k16 */
  433. WORD wFirst;
  434. WORD wSecond;
  435. INT16 iKernAmount;
  436. } KERNINGPAIR16;
  437. typedef KERNINGPAIR16 UNALIGNED *PKERNINGPAIR16;
  438. typedef VPVOID VPKERNINGPAIR16;
  439. typedef struct _MSG16 { /* msg16 */
  440. HWND16 hwnd;
  441. WORD message;
  442. WORD wParam;
  443. LONG lParam;
  444. DWORD time;
  445. POINT16 pt;
  446. } MSG16;
  447. typedef MSG16 UNALIGNED *PMSG16;
  448. typedef VPVOID VPMSG16;
  449. typedef struct _PAINTSTRUCT16 { /* ps16 */
  450. HDC16 hdc;
  451. BOOL16 fErase;
  452. RECT16 rcPaint;
  453. BOOL16 fRestore;
  454. BOOL16 fIncUpdate;
  455. BYTE rgbReserved[16];
  456. } PAINTSTRUCT16;
  457. typedef PAINTSTRUCT16 UNALIGNED *PPAINTSTRUCT16;
  458. typedef VPVOID VPPAINTSTRUCT16;
  459. typedef struct _WNDCLASS16 { /* wc16 */
  460. WORD style;
  461. VPWNDPROC vpfnWndProc;
  462. SHORT cbClsExtra;
  463. SHORT cbWndExtra;
  464. HAND16 hInstance;
  465. HICON16 hIcon;
  466. HCUR16 hCursor;
  467. HBRSH16 hbrBackground;
  468. VPSZ vpszMenuName;
  469. VPSZ vpszClassName;
  470. } WNDCLASS16;
  471. typedef WNDCLASS16 UNALIGNED *PWNDCLASS16;
  472. typedef VPVOID VPWNDCLASS16;
  473. typedef struct _PALETTEENTRY16 { /* pe16 */
  474. BYTE peRed;
  475. BYTE peGreen;
  476. BYTE peBlue;
  477. BYTE peFlags;
  478. } PALETTEENTRY16;
  479. typedef PALETTEENTRY16 UNALIGNED *PPALETTEENTRY16;
  480. typedef VPVOID VPPALETTEENTRY16;
  481. typedef struct _RGBTRIPLE16 { /* rgbt16 */
  482. BYTE rgbtBlue;
  483. BYTE rgbtGreen;
  484. BYTE rgbtRed;
  485. } RGBTRIPLE16;
  486. typedef struct _BITMAPCOREHEADER16 { /* bmch16 */
  487. DWORD bcSize;
  488. WORD bcWidth;
  489. WORD bcHeight;
  490. WORD bcPlanes;
  491. WORD bcBitCount;
  492. } BITMAPCOREHEADER16;
  493. typedef BITMAPCOREHEADER16 UNALIGNED *PBITMAPCOREHEADER16;
  494. typedef struct _BITMAPCOREINFO16 { /* bmci16 */
  495. BITMAPCOREHEADER16 bmciHeader;
  496. RGBTRIPLE16 bmciColors[1];
  497. } BITMAPCOREINFO16;
  498. typedef BITMAPCOREINFO16 UNALIGNED *PBITMAPCOREINFO16;
  499. typedef struct _CLIENTCREATESTRUCT16 { /* ccs16 */
  500. HMENU16 hWindowMenu;
  501. WORD idFirstChild;
  502. } CLIENTCREATESTRUCT16;
  503. typedef CLIENTCREATESTRUCT16 UNALIGNED *PCLIENTCREATESTRUCT16;
  504. typedef struct _LOGPALETTE16 { /* logpal16 */
  505. WORD palVersion;
  506. WORD palNumEntries;
  507. PALETTEENTRY16 palPalEntry[1];
  508. } LOGPALETTE16;
  509. typedef LOGPALETTE16 UNALIGNED *PLOGPALETTE16;
  510. typedef VPVOID VPLOGPALETTE16;
  511. typedef SHORT CATCHBUF16[9]; /* cb16 */
  512. typedef VPSHORT VPCATCHBUF16;
  513. typedef struct _OFSTRUCT16 { /* of16 */
  514. BYTE cBytes;
  515. BYTE fFixedDisk;
  516. WORD nErrCode;
  517. BYTE reserved[4];
  518. BYTE szPathName[128];
  519. } OFSTRUCT16;
  520. typedef OFSTRUCT16 UNALIGNED *POFSTRUCT16;
  521. typedef VPVOID VPOFSTRUCT16;
  522. typedef struct _DCB16 { /* dcb16 */
  523. BYTE Id; // Internal Device ID
  524. WORD BaudRate; // Baudrate at which runing
  525. BYTE ByteSize; // Number of bits/byte, 4-8
  526. BYTE Parity; // 0-4=None,Odd,Even,Mark,Space
  527. BYTE StopBits; // 0,1,2 = 1, 1.5, 2
  528. WORD RlsTimeout; // Timeout for RLSD to be set
  529. WORD CtsTimeout; // Timeout for CTS to be set
  530. WORD DsrTimeout; // Timeout for DSR to be set
  531. WORD wFlags; // Bitfield flags
  532. /*+++ These are the bitfield definitions in wFlags above --
  533. BYTE fBinary: 1; // Binary Mode (skip EOF check
  534. BYTE fRtsDisable:1; // Don't assert RTS at init time
  535. BYTE fParity: 1; // Enable parity checking
  536. BYTE fOutxCtsFlow:1; // CTS handshaking on output
  537. BYTE fOutxDsrFlow:1; // DSR handshaking on output
  538. BYTE fDummy: 2; // Reserved
  539. BYTE fDtrDisable:1; // Don't assert DTR at init time
  540. BYTE fOutX: 1; // Enable output X-ON/X-OFF
  541. BYTE fInX: 1; // Enable input X-ON/X-OFF
  542. BYTE fPeChar: 1; // Enable Parity Err Replacement
  543. BYTE fNull: 1; // Enable Null stripping
  544. BYTE fChEvt: 1; // Enable Rx character event.
  545. BYTE fDtrflow: 1; // DTR handshake on input
  546. BYTE fRtsflow: 1; // RTS handshake on input
  547. BYTE fDummy2: 1; //
  548. ---*/
  549. CHAR XonChar; // Tx and Rx X-ON character
  550. CHAR XoffChar; // Tx and Rx X-OFF character
  551. WORD XonLim; // Transmit X-ON threshold
  552. WORD XoffLim; // Transmit X-OFF threshold
  553. CHAR PeChar; // Parity error replacement char
  554. CHAR EofChar; // End of Input character
  555. CHAR EvtChar; // Recieved Event character
  556. WORD TxDelay; // Amount of time between chars
  557. } DCB16;
  558. typedef DCB16 UNALIGNED *PDCB16;
  559. typedef VPVOID VPDCB16;
  560. typedef struct _COMSTAT16 { /* cs16 */
  561. BYTE status;
  562. /*+++ These are bitfield definitions defined in status above --
  563. BYTE fCtsHold: 1; // transmit is on CTS hold
  564. BYTE fDsrHold: 1; // transmit is on DSR hold
  565. BYTE fRlsdHold: 1; // transmit is on RLSD hold
  566. BYTE fXoffHold: 1; // received handshake
  567. BYTE fXoffSent: 1; // issued handshake
  568. BYTE fEof: 1; // end of file character found
  569. BYTE fTxim: 1; // character being transmitted
  570. ---*/
  571. WORD cbInQue; // count of characters in Rx Queue
  572. WORD cbOutQue; // count of characters in Tx Queue
  573. } COMSTAT16;
  574. typedef COMSTAT16 UNALIGNED *PCOMSTAT16;
  575. typedef VPVOID VPCOMSTAT16;
  576. #ifdef FE_SB // wowfax support for Japanese
  577. typedef struct _DEV_BITMAP16 { /* devbm16 */
  578. SHORT bmType;
  579. SHORT bmWidth;
  580. SHORT bmHeight;
  581. SHORT bmWidthBytes;
  582. BYTE bmPlanes;
  583. BYTE bmBitsPixel;
  584. VPBYTE bmBits;
  585. LONG bmWidthPlanes;
  586. LONG bmlpPDevice;
  587. SHORT bmSegmentIndex;
  588. SHORT bmScanSegment;
  589. SHORT bmFillBytes;
  590. SHORT reserved1;
  591. SHORT reserved2;
  592. } DEV_BITMAP16;
  593. typedef DEV_BITMAP16 UNALIGNED *PDEV_BITMAP16;
  594. typedef VPVOID VPDEV_BITMAP16;
  595. #endif // FE_SB
  596. typedef struct _BITMAP16 { /* bm16 */
  597. SHORT bmType;
  598. SHORT bmWidth;
  599. SHORT bmHeight;
  600. SHORT bmWidthBytes;
  601. BYTE bmPlanes;
  602. BYTE bmBitsPixel;
  603. VPBYTE bmBits;
  604. } BITMAP16;
  605. typedef BITMAP16 UNALIGNED *PBITMAP16;
  606. typedef VPVOID VPBITMAP16;
  607. typedef struct _LOGBRUSH16 { /* lb16 */
  608. WORD lbStyle;
  609. DWORD lbColor;
  610. SHORT lbHatch;
  611. } LOGBRUSH16;
  612. typedef LOGBRUSH16 UNALIGNED *PLOGBRUSH16;
  613. typedef VPVOID VPLOGBRUSH16;
  614. /* ASM
  615. LF_FACESIZE equ 32
  616. */
  617. typedef struct _LOGFONT16 { /* lf16 */
  618. SHORT lfHeight;
  619. SHORT lfWidth;
  620. SHORT lfEscapement;
  621. SHORT lfOrientation;
  622. SHORT lfWeight;
  623. BYTE lfItalic;
  624. BYTE lfUnderline;
  625. BYTE lfStrikeOut;
  626. BYTE lfCharSet;
  627. BYTE lfOutPrecision;
  628. BYTE lfClipPrecision;
  629. BYTE lfQuality;
  630. BYTE lfPitchAndFamily;
  631. BYTE lfFaceName[LF_FACESIZE];
  632. } LOGFONT16;
  633. typedef LOGFONT16 UNALIGNED *PLOGFONT16;
  634. typedef VPVOID VPLOGFONT16;
  635. /* ASM
  636. LF_FULLFACESIZE equ 64
  637. */
  638. /* Structure passed to FONTENUMPROC */
  639. typedef struct _ENUMLOGFONT16 { /* elp16 */
  640. LOGFONT16 elfLogFont;
  641. char elfFullName[LF_FULLFACESIZE];
  642. char elfStyle[LF_FACESIZE];
  643. } ENUMLOGFONT16;
  644. typedef ENUMLOGFONT16 UNALIGNED *PENUMLOGFONT16;
  645. typedef VPVOID VPENUMLOGFONT16;
  646. typedef struct _LOGPEN16 { /* lp16 */
  647. WORD lopnStyle;
  648. POINT16 lopnWidth;
  649. DWORD lopnColor;
  650. } LOGPEN16;
  651. typedef LOGPEN16 UNALIGNED *PLOGPEN16;
  652. typedef VPVOID VPLOGPEN16;
  653. typedef struct _RGBQUAD16 { /* rgbq16 */
  654. BYTE rgbBlue;
  655. BYTE rgbGreen;
  656. BYTE rgbRed;
  657. BYTE rgbReserved;
  658. } RGBQUAD16;
  659. typedef RGBQUAD16 UNALIGNED *PRGBQUAD16;
  660. typedef VPVOID VPRGBQUAD16;
  661. typedef BITMAPINFOHEADER BITMAPINFOHEADER16;
  662. typedef BITMAPINFOHEADER16 UNALIGNED *PBITMAPINFOHEADER16;
  663. typedef VPVOID VPBITMAPINFOHEADER16;
  664. typedef BITMAPINFO BITMAPINFO16;
  665. typedef BITMAPINFO16 UNALIGNED *PBITMAPINFO16;
  666. typedef VPVOID VPBITMAPINFO16;
  667. typedef struct _TEXTMETRIC16 { /* tm16 */
  668. SHORT tmHeight;
  669. SHORT tmAscent;
  670. SHORT tmDescent;
  671. SHORT tmInternalLeading;
  672. SHORT tmExternalLeading;
  673. SHORT tmAveCharWidth;
  674. SHORT tmMaxCharWidth;
  675. SHORT tmWeight;
  676. BYTE tmItalic;
  677. BYTE tmUnderlined;
  678. BYTE tmStruckOut;
  679. BYTE tmFirstChar;
  680. BYTE tmLastChar;
  681. BYTE tmDefaultChar;
  682. BYTE tmBreakChar;
  683. BYTE tmPitchAndFamily;
  684. BYTE tmCharSet;
  685. SHORT tmOverhang;
  686. SHORT tmDigitizedAspectX;
  687. SHORT tmDigitizedAspectY;
  688. } TEXTMETRIC16;
  689. typedef TEXTMETRIC16 UNALIGNED *PTEXTMETRIC16;
  690. typedef VPVOID VPTEXTMETRIC16;
  691. typedef struct _NEWTEXTMETRIC16 { /* ntm16 */
  692. SHORT tmHeight;
  693. SHORT tmAscent;
  694. SHORT tmDescent;
  695. SHORT tmInternalLeading;
  696. SHORT tmExternalLeading;
  697. SHORT tmAveCharWidth;
  698. SHORT tmMaxCharWidth;
  699. SHORT tmWeight;
  700. BYTE tmItalic;
  701. BYTE tmUnderlined;
  702. BYTE tmStruckOut;
  703. BYTE tmFirstChar;
  704. BYTE tmLastChar;
  705. BYTE tmDefaultChar;
  706. BYTE tmBreakChar;
  707. BYTE tmPitchAndFamily;
  708. BYTE tmCharSet;
  709. SHORT tmOverhang;
  710. SHORT tmDigitizedAspectX;
  711. SHORT tmDigitizedAspectY;
  712. DWORD ntmFlags;
  713. WORD ntmSizeEM;
  714. WORD ntmCellHeight;
  715. WORD ntmAvgWidth;
  716. } NEWTEXTMETRIC16;
  717. typedef NEWTEXTMETRIC16 UNALIGNED *PNEWTEXTMETRIC16;
  718. typedef VPVOID VPNEWTEXTMETRIC16;
  719. typedef struct _PANOSE16 { /* pan16 */
  720. BYTE bFamilyType;
  721. BYTE bSerifStyle;
  722. BYTE bWeight;
  723. BYTE bProportion;
  724. BYTE bContrast;
  725. BYTE bStrokeVariation;
  726. BYTE bArmStyle;
  727. BYTE bLetterform;
  728. BYTE bMidline;
  729. BYTE bXHeight;
  730. } PANOSE16;
  731. typedef PANOSE16 UNALIGNED *PPANOSE16;
  732. typedef struct _OUTLINETEXTMETRIC16 { /* otm16 */
  733. WORD otmSize;
  734. TEXTMETRIC16 otmTextMetrics;
  735. BYTE otmFiller;
  736. PANOSE16 otmPanoseNumber;
  737. WORD otmfsSelection;
  738. WORD otmfsType;
  739. SHORT otmsCharSlopeRise;
  740. SHORT otmsCharSlopeRun;
  741. SHORT otmItalicAngle;
  742. WORD otmEMSquare;
  743. SHORT otmAscent;
  744. SHORT otmDescent;
  745. WORD otmLineGap;
  746. WORD otmsCapEmHeight;
  747. WORD otmsXHeight;
  748. RECT16 otmrcFontBox;
  749. SHORT otmMacAscent;
  750. SHORT otmMacDescent;
  751. WORD otmMacLineGap;
  752. WORD otmusMinimumPPEM;
  753. POINT16 otmptSubscriptSize;
  754. POINT16 otmptSubscriptOffset;
  755. POINT16 otmptSuperscriptSize;
  756. POINT16 otmptSuperscriptOffset;
  757. WORD otmsStrikeoutSize;
  758. SHORT otmsStrikeoutPosition;
  759. SHORT otmsUnderscorePosition;
  760. SHORT otmsUnderscoreSize;
  761. WORD otmpFamilyName;
  762. WORD otmpFaceName;
  763. WORD otmpStyleName;
  764. WORD otmpFullName;
  765. } OUTLINETEXTMETRIC16;
  766. typedef OUTLINETEXTMETRIC16 UNALIGNED *POUTLINETEXTMETRIC16;
  767. typedef VPVOID VPOUTLINETEXTMETRIC16;
  768. typedef struct _HANDLETABLE16 { /* ht16 */
  769. HAND16 objectHandle[1];
  770. } HANDLETABLE16;
  771. typedef HANDLETABLE16 UNALIGNED *PHANDLETABLE16;
  772. typedef VPVOID VPHANDLETABLE16;
  773. typedef struct _METARECORD16 { /* mr16 */
  774. DWORD rdSize;
  775. WORD rdFunction;
  776. WORD rdParm[1];
  777. } METARECORD16;
  778. typedef METARECORD16 UNALIGNED *PMETARECORD16;
  779. typedef VPVOID VPMETARECORD16;
  780. typedef struct _DEVMODE16 { /* dm16 */
  781. CHAR dmDeviceName[32];
  782. WORD dmSpecVersion;
  783. WORD dmDriverVersion;
  784. WORD dmSize;
  785. WORD dmDriverExtra;
  786. DWORD dmFields;
  787. SHORT dmOrientation;
  788. SHORT dmPaperSize;
  789. SHORT dmPaperLength;
  790. SHORT dmPaperWidth;
  791. SHORT dmScale;
  792. SHORT dmCopies;
  793. SHORT dmDefaultSource;
  794. SHORT dmPrintQuality;
  795. SHORT dmColor;
  796. SHORT dmDuplex;
  797. } DEVMODE16;
  798. typedef DEVMODE16 UNALIGNED *PDEVMODE16;
  799. typedef VPVOID VPDEVMODE16;
  800. typedef struct _DEVMODE31 { /* dm31 */
  801. CHAR dmDeviceName[32];
  802. WORD dmSpecVersion;
  803. WORD dmDriverVersion;
  804. WORD dmSize;
  805. WORD dmDriverExtra;
  806. DWORD dmFields;
  807. SHORT dmOrientation;
  808. SHORT dmPaperSize;
  809. SHORT dmPaperLength;
  810. SHORT dmPaperWidth;
  811. SHORT dmScale;
  812. SHORT dmCopies;
  813. SHORT dmDefaultSource;
  814. SHORT dmPrintQuality;
  815. SHORT dmColor;
  816. SHORT dmDuplex;
  817. SHORT dmYResolution;
  818. SHORT dmTTOption;
  819. } DEVMODE31;
  820. typedef DEVMODE31 UNALIGNED *PDEVMODE31;
  821. typedef VPVOID VPDEVMODE31;
  822. typedef struct _CREATESTRUCT16 { /* cws16 */
  823. VPBYTE vpCreateParams;
  824. HAND16 hInstance;
  825. HMENU16 hMenu;
  826. HWND16 hwndParent;
  827. SHORT cy;
  828. SHORT cx;
  829. SHORT y;
  830. SHORT x;
  831. DWORD dwStyle;
  832. VPSZ vpszWindow;
  833. VPSZ vpszClass;
  834. DWORD dwExStyle;
  835. } CREATESTRUCT16;
  836. typedef CREATESTRUCT16 UNALIGNED *PCREATESTRUCT16;
  837. typedef VPVOID VPCREATESTRUCT16;
  838. typedef struct _DRAWITEMSTRUCT16 { /* dis16 */
  839. WORD CtlType;
  840. WORD CtlID;
  841. WORD itemID;
  842. WORD itemAction;
  843. WORD itemState;
  844. HWND16 hwndItem;
  845. HDC16 hDC;
  846. RECT16 rcItem;
  847. DWORD itemData;
  848. } DRAWITEMSTRUCT16;
  849. typedef DRAWITEMSTRUCT16 UNALIGNED *PDRAWITEMSTRUCT16;
  850. typedef VPVOID VPDRAWITEMSTRUCT16;
  851. typedef struct _MEASUREITEMSTRUCT16 { /* mis16 */
  852. WORD CtlType;
  853. WORD CtlID;
  854. WORD itemID;
  855. WORD itemWidth;
  856. WORD itemHeight;
  857. DWORD itemData;
  858. } MEASUREITEMSTRUCT16;
  859. typedef MEASUREITEMSTRUCT16 UNALIGNED *PMEASUREITEMSTRUCT16;
  860. typedef VPVOID VPMEASUREITEMSTRUCT16;
  861. typedef struct _DELETEITEMSTRUCT16 { /* des16 */
  862. WORD CtlType;
  863. WORD CtlID;
  864. WORD itemID;
  865. HWND16 hwndItem;
  866. DWORD itemData;
  867. } DELETEITEMSTRUCT16;
  868. typedef DELETEITEMSTRUCT16 UNALIGNED *PDELETEITEMSTRUCT16;
  869. typedef VPVOID VPDELETEITEMSTRUCT16;
  870. typedef struct _COMPAREITEMSTRUCT16 { /* cis16 */
  871. WORD CtlType;
  872. WORD CtlID;
  873. HWND16 hwndItem;
  874. WORD itemID1;
  875. DWORD itemData1;
  876. WORD itemID2;
  877. DWORD itemData2;
  878. } COMPAREITEMSTRUCT16;
  879. typedef COMPAREITEMSTRUCT16 UNALIGNED *PCOMPAREITEMSTRUCT16;
  880. typedef VPVOID VPCOMPAREITEMSTRUCT16;
  881. typedef struct _MDICREATESTRUCT16 { /* mcs16 */
  882. VPSZ vpszClass;
  883. VPSZ vpszTitle;
  884. HTASK16 hOwner;
  885. SHORT x;
  886. SHORT y;
  887. SHORT cx;
  888. SHORT cy;
  889. LONG style;
  890. LONG lParam; // app-defined stuff
  891. } MDICREATESTRUCT16;
  892. typedef MDICREATESTRUCT16 UNALIGNED *PMDICREATESTRUCT16;
  893. typedef VPVOID VPMDICREATESTRUCT16;
  894. typedef struct _WINDOWPOS16 { /* wp16 */
  895. HAND16 hwnd;
  896. HAND16 hwndInsertAfter;
  897. SHORT x;
  898. SHORT y;
  899. SHORT cx;
  900. SHORT cy;
  901. WORD flags;
  902. } WINDOWPOS16;
  903. typedef WINDOWPOS16 UNALIGNED *PWINDOWPOS16;
  904. typedef VPVOID VPWINDOWPOS16;
  905. typedef struct _NCCALCSIZE_PARAMS16 { /* nccsz16 */
  906. RECT16 rgrc[3];
  907. WINDOWPOS16 UNALIGNED FAR *lppos;
  908. } NCCALCSIZE_PARAMS16;
  909. typedef NCCALCSIZE_PARAMS16 UNALIGNED *PNCCALCSIZE_PARAMS16;
  910. typedef VPVOID VPNCCALCSIZE_PARAMS16;
  911. /*
  912. * Used by Hook Procs.
  913. */
  914. typedef struct _EVENTMSG16 { /* evmsg16 */
  915. WORD message;
  916. WORD paramL;
  917. WORD paramH;
  918. DWORD time;
  919. } EVENTMSG16;
  920. typedef EVENTMSG16 UNALIGNED *PEVENTMSG16;
  921. typedef VPVOID VPEVENTMSG16;
  922. typedef struct _DEBUGHOOKINFO16 { /*dbgi16 */
  923. HTASK16 hModuleHook;
  924. DWORD reserved;
  925. DWORD lParam;
  926. WORD wParam;
  927. SHORT code;
  928. } DEBUGHOOKINFO16;
  929. typedef DEBUGHOOKINFO16 UNALIGNED *PDEBUGHOOKINFO16;
  930. typedef VPVOID VPDEBUGHOOKINFO16;
  931. typedef struct _MOUSEHOOKSTRUCT16 { /* mhs16 */
  932. POINT16 pt;
  933. HWND16 hwnd;
  934. WORD wHitTestCode;
  935. DWORD dwExtraInfo;
  936. } MOUSEHOOKSTRUCT16;
  937. typedef MOUSEHOOKSTRUCT16 UNALIGNED *PMOUSEHOOKSTRUCT16;
  938. typedef VPVOID VPMOUSEHOOKSTRUCT16;
  939. typedef struct _CWPSTRUCT16 { /* cwps16 */
  940. LONG lParam; //
  941. WORD wParam; //
  942. WORD message; //
  943. WORD hwnd; //
  944. } CWPSTRUCT16;
  945. typedef CWPSTRUCT16 UNALIGNED *PCWPSTRUCT16;
  946. typedef VPVOID VPCWPSTRUCT16;
  947. typedef struct _CBT_CREATEWND16 { /* cbtcw16 */
  948. VPCREATESTRUCT16 vpcs;
  949. HWND16 hwndInsertAfter;
  950. } CBT_CREATEWND16;
  951. typedef CBT_CREATEWND16 UNALIGNED *PCBT_CREATEWND16;
  952. typedef VPVOID VPCBT_CREATEWND16;
  953. typedef struct _CBTACTIVATESTRUCT16 { /* cbtas16 */
  954. BOOL16 fMouse;
  955. HWND16 hWndActive;
  956. } CBTACTIVATESTRUCT16;
  957. typedef CBTACTIVATESTRUCT16 UNALIGNED *PCBTACTIVATESTRUCT16;
  958. typedef VPVOID VPCBTACTIVATESTRUCT16;
  959. /* 16-bit resource structures, and their pointers
  960. *
  961. * Note that some are the same as the 32-bit definition (eg, menus)
  962. */
  963. typedef MENUITEMTEMPLATEHEADER MENUITEMTEMPLATEHEADER16;
  964. typedef MENUITEMTEMPLATE MENUITEMTEMPLATE16;
  965. typedef MENUITEMTEMPLATEHEADER16 *PMENUITEMTEMPLATEHEADER16;
  966. typedef MENUITEMTEMPLATE16 *PMENUITEMTEMPLATE16;
  967. typedef struct _DLGTEMPLATE16 { /* dt16 */
  968. DWORD style; //
  969. BYTE cdit; // this is a WORD in WIN32
  970. WORD x; //
  971. WORD y; //
  972. WORD cx; //
  973. WORD cy; //
  974. // CHAR szMenuName[]; // potential pad byte in WIN32
  975. // CHAR szClassName[]; // potential pad byte in WIN32
  976. // CHAR szCaptionText[]; // potential pad byte in WIN32
  977. } DLGTEMPLATE16;
  978. typedef DLGTEMPLATE16 UNALIGNED *PDLGTEMPLATE16;
  979. typedef VPVOID VPDLGTEMPLATE16;
  980. typedef struct _FONTINFO16 { /* fi16 */
  981. SHORT cPoints; // present if DS_SETFONT in dt16.style
  982. // CHAR szTypeFace[]; // potential pad byte in WIN32
  983. } FONTINFO16;
  984. typedef FONTINFO16 UNALIGNED *PFONTINFO16;
  985. typedef VPVOID VPFONTINFO16;
  986. typedef struct _DLGITEMTEMPLATE16 { /* dit16 */
  987. WORD x; // structure dword-aligned in WIN32
  988. WORD y; //
  989. WORD cx; //
  990. WORD cy; //
  991. WORD id; //
  992. DWORD style; // this was moved to the top in WIN32
  993. // CHAR szClass[]; // potential pad byte in WIN32
  994. // CHAR szText[]; // potential pad byte in WIN32
  995. // BYTE cbExtra; //
  996. // BYTE abExtra[]; //
  997. } DLGITEMTEMPLATE16;
  998. typedef DLGITEMTEMPLATE16 UNALIGNED *PDLGITEMTEMPLATE16;
  999. typedef VPVOID VPDLGITEMTEMPLATE16;
  1000. typedef struct _RESDIRHEADER16 { /* hdir16 */
  1001. WORD reserved; //
  1002. WORD rt; //
  1003. WORD cResources; // pad word in WIN32 (for size == 8)
  1004. } RESDIRHEADER16;
  1005. typedef RESDIRHEADER16 UNALIGNED *PRESDIRHEADER16;
  1006. typedef VPVOID VPRESDIRHEADER16;
  1007. typedef struct _ICONDIR16 { /* idir16 */
  1008. BYTE Width; // 16, 32, 64
  1009. BYTE Height; // 16, 32, 64
  1010. BYTE ColorCount; // 2, 8, 16
  1011. BYTE reserved; //
  1012. } ICONDIR16;
  1013. typedef ICONDIR16 UNALIGNED *PICONDIR16;
  1014. typedef VPVOID VPICONDIR16;
  1015. typedef struct _CURSORDIR16 { /* cdir16 */
  1016. WORD Width; //
  1017. WORD Height; //
  1018. } CURSORDIR16;
  1019. typedef CURSORDIR16 UNALIGNED *PCURSORDIR16;
  1020. typedef VPVOID VPCURSORDIR16;
  1021. /* XLATOFF */
  1022. typedef struct _RESDIR16 { /* rdir16 */
  1023. union { //
  1024. ICONDIR16 Icon; //
  1025. CURSORDIR16 Cursor; //
  1026. } ResInfo; //
  1027. WORD Planes; //
  1028. WORD BitCount; //
  1029. DWORD BytesInRes; //
  1030. WORD idIcon; // pad word in WIN32 (for size == 16)
  1031. } RESDIR16;
  1032. typedef RESDIR16 UNALIGNED *PRESDIR16;
  1033. typedef VPVOID VPRESDIR16;
  1034. typedef struct _COPYDATASTRUCT16 {
  1035. DWORD dwData;
  1036. DWORD cbData;
  1037. PVOID lpData;
  1038. } COPYDATASTRUCT16;
  1039. typedef COPYDATASTRUCT16 UNALIGNED *PCOPYDATASTRUCT16;
  1040. typedef VPVOID VPCOPYDATASTRUCT16;
  1041. typedef struct _DROPSTRUCT16 {
  1042. HWND16 hwndSource;
  1043. HWND16 hwndSink;
  1044. WORD wFmt;
  1045. DWORD dwData;
  1046. POINT16 ptDrop;
  1047. DWORD dwControlData;
  1048. } DROPSTRUCT16;
  1049. typedef DROPSTRUCT16 UNALIGNED *PDROPSTRUCT16;
  1050. typedef VPVOID VPDROPSTRUCT16;
  1051. typedef struct _DROPFILESTRUCT16 {
  1052. WORD pFiles;
  1053. SHORT x;
  1054. SHORT y;
  1055. BOOL16 fNC;
  1056. } DROPFILESTRUCT16;
  1057. typedef DROPFILESTRUCT16 UNALIGNED *PDROPFILESTRUCT16;
  1058. typedef VPVOID VPDROPFILESTRUCT16;
  1059. typedef BITMAPINFOHEADER ICONRESOURCE;
  1060. typedef ICONRESOURCE *PICONRESOURCE;
  1061. typedef BITMAPINFOHEADER16 ICONRESOURCE16;
  1062. typedef ICONRESOURCE16 UNALIGNED *PICONRESOURCE16;
  1063. typedef VPVOID VPICONRESOURCE16;
  1064. typedef struct _CURSORRESOURCE { /* cres */
  1065. WORD xHotspot;
  1066. WORD yHotspot;
  1067. BITMAPINFOHEADER bmih;
  1068. } CURSORRESOURCE;
  1069. typedef CURSORRESOURCE UNALIGNED *PCURSORRESOURCE;
  1070. typedef CURSORRESOURCE CURSORRESOURCE16;
  1071. typedef CURSORRESOURCE16 UNALIGNED *PCURSORRESOURCE16;
  1072. typedef VPVOID VPCURSORRESOURCE16;
  1073. // This describes the header of the old 2.x cursor/icon resource format;
  1074. // the header should be followed by an AND mask and then an XOR mask, where:
  1075. //
  1076. // Bit value Bit value Bit value Bit value
  1077. // AND Mask 0 0 1 1
  1078. // XOR Mask 0 1 0 1
  1079. // ---------------------------------------------------------
  1080. // Result Black White Transparent Inverted
  1081. //
  1082. // Note that we wouldn't have to worry about this old resource format if apps
  1083. // like WinWord (which apparently weren't fully converted to 3.x) didn't use it! -JTP
  1084. typedef struct _OLDCURSORICONRESOURCE16 { /* oci16 */
  1085. BYTE bFigure; // 1: cursor, 2: bitmap, 3: icon
  1086. BYTE bIndependent; // 0: device-dependent, 1: independent
  1087. SHORT xHotspot; //
  1088. SHORT yHotspot; //
  1089. SHORT cx; // x-extent
  1090. SHORT cy; // y-extent
  1091. SHORT cbWidth; // bytes per row (rows are word-aligned)
  1092. SHORT clr; // # color planes (should always be 0)
  1093. } OLDCURSORICONRESOURCE16;
  1094. typedef OLDCURSORICONRESOURCE16 UNALIGNED *POLDCURSORICONRESOURCE16;
  1095. typedef VPVOID VPOLDCURSORICONRESOURCE16;
  1096. /* XLATON */
  1097. /* XLATOFF */
  1098. #pragma pack()
  1099. /* XLATON */
  1100. /* Undocumented(?) window messages
  1101. */
  1102. #define WM_SETVISIBLE 0x0009
  1103. #define WM_ALTTABACTIVE 0x0029
  1104. #define WM_ISACTIVEICON 0x0035
  1105. #define WM_QUERYPARKICON 0x0036
  1106. #define WM_SYNCPAINT 0x0088
  1107. #define WM_SYSTIMER 0x0118
  1108. #define WM_LBTRACKPOINT 0x0131
  1109. #define WM_ENTERMENULOOP 0x0211
  1110. #define WM_EXITMENULOOP 0x0212
  1111. #define WM_NEXTMENU 0x0213
  1112. #define WM_DROPOBJECT 0x022A
  1113. #define WM_QUERYDROPOBJECT 0x022B
  1114. #define WM_BEGINDRAG 0x022C
  1115. #define WM_DRAGLOOP 0x022D
  1116. #define WM_DRAGSELECT 0x022E
  1117. #define WM_DRAGMOVE 0x022F
  1118. #define WM_ENTERSIZEMOVE 0x0231
  1119. #define WM_EXITSIZEMOVE 0x0232
  1120. /* Old window messages (changed from Win 3.x)
  1121. */
  1122. #ifndef WM_USER
  1123. #define WM_USER 0x0400
  1124. #endif
  1125. #define OLDEM_GETSEL (WM_USER+0)
  1126. #define OLDEM_SETSEL (WM_USER+1)
  1127. #define OLDEM_GETRECT (WM_USER+2)
  1128. #define OLDEM_SETRECT (WM_USER+3)
  1129. #define OLDEM_SETRECTNP (WM_USER+4)
  1130. #define OLDEM_SCROLL (WM_USER+5)
  1131. #define OLDEM_LINESCROLL (WM_USER+6)
  1132. #define OLDEM_GETMODIFY (WM_USER+8)
  1133. #define OLDEM_SETMODIFY (WM_USER+9)
  1134. #define OLDEM_GETLINECOUNT (WM_USER+10)
  1135. #define OLDEM_LINEINDEX (WM_USER+11)
  1136. #define OLDEM_SETHANDLE (WM_USER+12)
  1137. #define OLDEM_GETHANDLE (WM_USER+13)
  1138. #define OLDEM_GETTHUMB (WM_USER+14)
  1139. #define OLDEM_LINELENGTH (WM_USER+17)
  1140. #define OLDEM_REPLACESEL (WM_USER+18)
  1141. #define OLDEM_SETFONT (WM_USER+19)
  1142. #define OLDEM_GETLINE (WM_USER+20)
  1143. #define OLDEM_LIMITTEXT (WM_USER+21)
  1144. #define OLDEM_CANUNDO (WM_USER+22)
  1145. #define OLDEM_UNDO (WM_USER+23)
  1146. #define OLDEM_FMTLINES (WM_USER+24)
  1147. #define OLDEM_LINEFROMCHAR (WM_USER+25)
  1148. #define OLDEM_SETWORDBREAK (WM_USER+26)
  1149. #define OLDEM_SETTABSTOPS (WM_USER+27)
  1150. #define OLDEM_SETPASSWORDCHAR (WM_USER+28)
  1151. #define OLDEM_EMPTYUNDOBUFFER (WM_USER+29)
  1152. #ifndef WIN31
  1153. #define OLDEM_MSGMAX (WM_USER+30)
  1154. #else
  1155. #define OLDEM_GETFIRSTVISIBLELINE (WM_USER+30)
  1156. #define OLDEM_SETREADONLY (WM_USER+31)
  1157. #define OLDEM_SETWORDBREAKPROC (WM_USER+32)
  1158. #define OLDEM_GETWORDBREAKPROC (WM_USER+33)
  1159. #define OLDEM_GETPASSWORDCHAR (WM_USER+34)
  1160. #define OLDEM_MSGMAX (WM_USER+35)
  1161. #endif
  1162. #define OLDBM_GETCHECK (WM_USER+0)
  1163. #define OLDBM_SETCHECK (WM_USER+1)
  1164. #define OLDBM_GETSTATE (WM_USER+2)
  1165. #define OLDBM_SETSTATE (WM_USER+3)
  1166. #define OLDBM_SETSTYLE (WM_USER+4)
  1167. #define OLDCB_GETEDITSEL (WM_USER+0)
  1168. #define OLDCB_LIMITTEXT (WM_USER+1)
  1169. #define OLDCB_SETEDITSEL (WM_USER+2)
  1170. #define OLDCB_ADDSTRING (WM_USER+3)
  1171. #define OLDCB_DELETESTRING (WM_USER+4)
  1172. #define OLDCB_DIR (WM_USER+5)
  1173. #define OLDCB_GETCOUNT (WM_USER+6)
  1174. #define OLDCB_GETCURSEL (WM_USER+7)
  1175. #define OLDCB_GETLBTEXT (WM_USER+8)
  1176. #define OLDCB_GETLBTEXTLEN (WM_USER+9)
  1177. #define OLDCB_INSERTSTRING (WM_USER+10)
  1178. #define OLDCB_RESETCONTENT (WM_USER+11)
  1179. #define OLDCB_FINDSTRING (WM_USER+12)
  1180. #define OLDCB_SELECTSTRING (WM_USER+13)
  1181. #define OLDCB_SETCURSEL (WM_USER+14)
  1182. #define OLDCB_SHOWDROPDOWN (WM_USER+15)
  1183. #define OLDCB_GETITEMDATA (WM_USER+16)
  1184. #define OLDCB_SETITEMDATA (WM_USER+17)
  1185. #define OLDCB_GETDROPPEDCONTROLRECT (WM_USER+18)
  1186. #ifndef WIN31
  1187. #define OLDCB_MSGMAX (WM_USER+19)
  1188. #else
  1189. #define OLDCB_SETITEMHEIGHT (WM_USER+19)
  1190. #define OLDCB_GETITEMHEIGHT (WM_USER+20)
  1191. #define OLDCB_SETEXTENDEDUI (WM_USER+21)
  1192. #define OLDCB_GETEXTENDEDUI (WM_USER+22)
  1193. #define OLDCB_GETDROPPEDSTATE (WM_USER+23)
  1194. #define OLDCB_FINDSTRINGEXACT (WM_USER+24)
  1195. #define OLDCB_MSGMAX (WM_USER+25) /* ;Internal */
  1196. #define OLDCBEC_SETCOMBOFOCUS (WM_USER+26) /* ;Internal */
  1197. #define OLDCBEC_KILLCOMBOFOCUS (WM_USER+27) /* ;Internal */
  1198. #endif
  1199. #define OLDLB_ADDSTRING (WM_USER+1)
  1200. #define OLDLB_INSERTSTRING (WM_USER+2)
  1201. #define OLDLB_DELETESTRING (WM_USER+3)
  1202. #define OLDLB_RESETCONTENT (WM_USER+5)
  1203. #define OLDLB_SETSEL (WM_USER+6)
  1204. #define OLDLB_SETCURSEL (WM_USER+7)
  1205. #define OLDLB_GETSEL (WM_USER+8)
  1206. #define OLDLB_GETCURSEL (WM_USER+9)
  1207. #define OLDLB_GETTEXT (WM_USER+10)
  1208. #define OLDLB_GETTEXTLEN (WM_USER+11)
  1209. #define OLDLB_GETCOUNT (WM_USER+12)
  1210. #define OLDLB_SELECTSTRING (WM_USER+13)
  1211. #define OLDLB_DIR (WM_USER+14)
  1212. #define OLDLB_GETTOPINDEX (WM_USER+15)
  1213. #define OLDLB_FINDSTRING (WM_USER+16)
  1214. #define OLDLB_GETSELCOUNT (WM_USER+17)
  1215. #define OLDLB_GETSELITEMS (WM_USER+18)
  1216. #define OLDLB_SETTABSTOPS (WM_USER+19)
  1217. #define OLDLB_GETHORIZONTALEXTENT (WM_USER+20)
  1218. #define OLDLB_SETHORIZONTALEXTENT (WM_USER+21)
  1219. #define OLDLB_SETCOLUMNWIDTH (WM_USER+22)
  1220. #define OLDLB_ADDFILE (WM_USER+23) /* ;Internal */
  1221. #define OLDLB_SETTOPINDEX (WM_USER+24)
  1222. #define OLDLB_GETITEMRECT (WM_USER+25)
  1223. #define OLDLB_GETITEMDATA (WM_USER+26)
  1224. #define OLDLB_SETITEMDATA (WM_USER+27)
  1225. #define OLDLB_SELITEMRANGE (WM_USER+28)
  1226. #define OLDLB_SETANCHORINDEX (WM_USER+29) /* ;Internal */
  1227. #define OLDLB_GETANCHORINDEX (WM_USER+30) /* ;Internal */
  1228. #ifndef WIN31
  1229. #define OLDLB_MSGMAX (WM_USER+33)
  1230. #else
  1231. #define OLDLB_SETCARETINDEX (WM_USER+31)
  1232. #define OLDLB_GETCARETINDEX (WM_USER+32)
  1233. #define OLDLB_SETITEMHEIGHT (WM_USER+33)
  1234. #define OLDLB_GETITEMHEIGHT (WM_USER+34)
  1235. #define OLDLB_FINDSTRINGEXACT (WM_USER+35)
  1236. #define OLDLBCB_CARETON (WM_USER+36) /* ;Internal */
  1237. #define OLDLBCB_CARETOFF (WM_USER+37) /* ;Internal */
  1238. #define OLDLB_MSGMAX (WM_USER+38) /* ;Internal */
  1239. #endif
  1240. #define OLDSBM_SETPOS (WM_USER+0)
  1241. #define OLDSBM_GETPOS (WM_USER+1)
  1242. #define OLDSBM_SETRANGE (WM_USER+2)
  1243. #define OLDSBM_GETRANGE (WM_USER+3)
  1244. #define OLDSBM_ENABLEARROWS (WM_USER+4)
  1245. /* WOW Return IDs - Ordering must match wow16cal.asm table
  1246. */
  1247. #define RET_RETURN 0 // return to app
  1248. #define RET_DEBUGRETURN 1 // return to app after breakpoint
  1249. #define RET_DEBUG 2 // execute breakpoint, return to WOW
  1250. #define RET_WNDPROC 3 // IN:all
  1251. // OUT:DX:AX=wndproc return code
  1252. #define RET_ENUMFONTPROC 4 // IN:all
  1253. // OUT:DX:AX=wndproc return code
  1254. #define RET_ENUMWINDOWPROC 5 // IN:all
  1255. // OUT:DX:AX=wndproc return code
  1256. #define RET_LOCALALLOC 6 // IN:wParam=wFlags, lParam=wBytes
  1257. // OUT:AX=hMem (zero if error)
  1258. #define RET_LOCALREALLOC 7 // IN:wMsg=hMem, wParam=wFlags, lParam=wBytes
  1259. // OUT:AX=hMem (zero if error)
  1260. #define RET_LOCALLOCK 8 // IN:wParam=hMem
  1261. // OUT:DX:AX=address (zero if error), CX=size
  1262. #define RET_LOCALUNLOCK 9 // IN:wParam=hMem
  1263. // OUT:AX=TRUE (FALSE if error)
  1264. #define RET_LOCALSIZE 10 // IN:wParam=hMem
  1265. // OUT:AX=size (zero if error)
  1266. #define RET_LOCALFREE 11 // IN:wParam=hMem
  1267. // OUT:AX=TRUE (FALSE if error)
  1268. #define RET_GLOBALALLOCLOCK 12 // IN:wParam=wFlags, lParam=dwBytes
  1269. // OUT:DX:AX=address (zero if error), BX=hMem
  1270. #define RET_GLOBALLOCK 13 // IN:wParam=hMem
  1271. // OUT:DX:AX=address (zero if error), CX=size
  1272. #define RET_GLOBALUNLOCK 14 // IN:wParam=hMem
  1273. // OUT:AX=TRUE (FALSE if error)
  1274. #define RET_GLOBALUNLOCKFREE 15 // IN:lParam=address
  1275. // OUT:AX=TRUE (FALSE if error)
  1276. #define RET_FINDRESOURCE 16 // IN:wParam=hTask, lParam=vpName, hwnd/wMsg=vpType
  1277. // OUT:AX=hResInfo (zero if not found)
  1278. #define RET_LOADRESOURCE 17 // IN:wParam=hTask, lParam=hResInfo
  1279. // OUT:AX=hResData
  1280. #define RET_FREERESOURCE 18 // IN:wParam=hResData
  1281. // OUT:AX=TRUE (zero if failed)
  1282. #define RET_LOCKRESOURCE 19 // IN:wParam=hResData
  1283. // OUT:DX:AX=address (zero if error), CX=size
  1284. #define RET_UNLOCKRESOURCE 20 // IN:wParam=hResData
  1285. // OUT:AX=TRUE (zero if resource still locked)
  1286. #define RET_SIZEOFRESOURCE 21 // IN:wParam=hTask, lParam=hResInfo
  1287. // OUT:DX:AX=size (zero if error)
  1288. #define RET_LOCKSEGMENT 22 // IN:wParam=wSeg
  1289. // OUT:AX=TRUE (FALSE if error)
  1290. #define RET_UNLOCKSEGMENT 23 // IN:wParam=wSeg
  1291. // OUT:AX=TRUE (zero if segment still locked)
  1292. #define RET_ENUMMETAFILEPROC 24 // IN:all
  1293. // OUT:DX:AX=wndproc return cod
  1294. #define RET_TASKSTARTED 25 // None
  1295. #define RET_HOOKPROC 26 // IN:all
  1296. // OUT:DX:AX=hookproc return code
  1297. #define RET_SUBCLASSPROC 27 // IN:None
  1298. // OUT: DX:AX=thunkproc return code
  1299. #define RET_LINEDDAPROC 28
  1300. #define RET_GRAYSTRINGPROC 29
  1301. #define RET_FORCETASKEXIT 30 // IN:None
  1302. // OUT: Does not return
  1303. #define RET_SETCURDIR 31 // IN:Current Dir
  1304. // OUT: ax
  1305. #define RET_ENUMOBJPROC 32 // IN:all
  1306. // OUT:DX:AX=wndproc return code
  1307. #define RET_SETCURSORICONFLAG 33 // IN: none
  1308. #define RET_SETABORTPROC 34
  1309. #define RET_ENUMPROPSPROC 35
  1310. #define RET_FORCESEGMENTFAULT 36 // Make a segment present
  1311. #define RET_LSTRCMP 37 // for user32 listbox code
  1312. // 38 FREE
  1313. // 39 FREE
  1314. // 40 FREE
  1315. // 41 FREE
  1316. #define RET_GETEXEPTR 42 // Call KRNL286:GetExePtr
  1317. // 43 FREE
  1318. #define RET_FORCETASKFAULT 44 // Force a Fault
  1319. #define RET_GETEXPWINVER 45 // Call KRNL286:GetExpWinVer
  1320. #define RET_GETCURDIR 46 //
  1321. #define RET_GETDOSPDB 47 // IN: nothing
  1322. // OUT: DX:AX = DOS Win_PDB
  1323. #define RET_GETDOSSFT 48 // IN: nothing
  1324. // OUT: DX:AX = DOS SFT (pFileTable)
  1325. #define RET_FOREGROUNDIDLE 49 // IN: nothing
  1326. // OUT: NOTHING
  1327. #define RET_WINSOCKBLOCKHOOK 50 // IN: nothing
  1328. // OUT: DX:AX = BOOL ret value
  1329. #define RET_WOWDDEFREEHANDLE 51
  1330. #define RET_CHANGESELECTOR 52 // IN: wParam = Segment
  1331. #define RET_GETMODULEFILENAME 53 // IN: wParam = hInst, lParam = 16:16 Buffer
  1332. // wMsg = cbBuffer
  1333. // OUT: AX = length of returned modulename
  1334. #define RET_SETWORDBREAKPROC 54 //
  1335. #define RET_WINEXEC 55
  1336. #define RET_WOWCALLBACK16 56 // Used by public WOWCallback16 routine
  1337. #define RET_GETDIBSIZE 57
  1338. #define RET_GETDIBFLAGS 58
  1339. #define RET_SETDIBSEL 59
  1340. #define RET_FREEDIBSEL 60
  1341. #ifdef FE_SB
  1342. #define RET_SETFNOTEPAD 61 // sync GetModuleUsage16 API for Lotus FLW
  1343. #define RET_MAX 61
  1344. #else // !FE_SB
  1345. #define RET_MAX 60
  1346. #endif // !FE_SB
  1347. /* Module IDs
  1348. *
  1349. * Module IDs are OR'ed with API IDs to produce Call IDs
  1350. */
  1351. #define MOD_MASK 0xF000
  1352. #define FUN_MASK 0x0FFF
  1353. #define MOD_KERNEL 0x0000
  1354. #define MOD_DKERNEL 0X0000 // for parameter validation layer
  1355. #define MOD_USER 0x1000 //
  1356. #define MOD_DUSER 0x1000 // for parameter validation layer
  1357. #define MOD_GDI 0x2000 //
  1358. #define MOD_DGDI 0x2000 // for parameter validation layer
  1359. #define MOD_KEYBOARD 0x3000
  1360. #define MOD_SOUND 0x4000
  1361. #define MOD_SHELL 0x5000 // SHELL APIs
  1362. #define MOD_WINSOCK 0x6000
  1363. #define MOD_TOOLHELP 0x7000
  1364. #define MOD_MMEDIA 0x8000
  1365. #define MOD_COMMDLG 0x9000
  1366. #ifdef FE_SB
  1367. #define MOD_WINNLS 0xA000
  1368. #define MOD_WIFEMAN 0xB000
  1369. #define MOD_LAST 0xC000 // Add New Module ID before this one
  1370. #else // !FE_SB
  1371. #define MOD_LAST 0xA000 // Add New Module ID before this one
  1372. #endif // !FE_SB
  1373. /* Special Function IDs
  1374. *
  1375. * This is used by WIN16 whenever we are returning from a window proc;
  1376. * see the various include files (wowkrn.h, wowgdi.h, etc) for all the other
  1377. * function IDs.
  1378. */
  1379. #define FUN_RETURN 0
  1380. /*
  1381. * hiword of wcallID in VDMFRAME -
  1382. */
  1383. #define HI_WCALLID 0x0000
  1384. /* Macros for WOW16 DLLs
  1385. *
  1386. * Note for GDIThunk args is the metafile function number
  1387. * and val denotes if function has a DC
  1388. *
  1389. */
  1390. /* ASM
  1391. Thunk macro mod,func,callfirst,args,val,emptybuf
  1392. ifidni <args>,<abs>
  1393. public func
  1394. ifb <val>
  1395. func = 0
  1396. else
  1397. func = val
  1398. endif
  1399. else
  1400. externA __MOD_KERNEL
  1401. externA __MOD_DKERNEL
  1402. externA __MOD_USER
  1403. externA __MOD_DUSER
  1404. externA __MOD_GDI
  1405. externA __MOD_DGDI
  1406. externA __MOD_KEYBOARD
  1407. externA __MOD_SOUND
  1408. externA __MOD_SHELL
  1409. externA __MOD_WINSOCK
  1410. externA __MOD_TOOLHELP
  1411. externA __MOD_MMEDIA
  1412. externA __MOD_COMMDLG
  1413. ifdef FE_SB
  1414. externA __MOD_WINNLS
  1415. externA __MOD_WIFEMAN
  1416. endif ; FE_SB
  1417. ifidni <mod>,<USER>
  1418. cProc I&func,<PUBLIC,FAR,PASCAL,NODATA,WIN>
  1419. cBegin <nogen>
  1420. else
  1421. ifidni <mod>,<GDI>
  1422. cProc I&func,<PUBLIC,FAR,PASCAL,NODATA,WIN>
  1423. cBegin <nogen>
  1424. else
  1425. ifidni <mod>,<KERNEL>
  1426. cProc I&func,<PUBLIC,FAR,PASCAL,NODATA,WIN>
  1427. cBegin <nogen>
  1428. else
  1429. cProc func,<PUBLIC,FAR,PASCAL,NODATA,WIN>
  1430. cBegin <nogen>
  1431. endif
  1432. endif
  1433. endif
  1434. ; Make the passed in buffer into an empty string by writing null
  1435. ; to the first position. Win 3.1 IGetWindowText does this, and
  1436. ; WinFax Pro depends on this behaviour.
  1437. ifnb <emptybuf>
  1438. push bp
  1439. mov bp, sp
  1440. mov bx, [bp+8]
  1441. mov es, [bp+0Ah]
  1442. mov byte ptr es:[bx], 0
  1443. pop bp
  1444. endif
  1445. ifdifi <callfirst>,<0>
  1446. call callfirst
  1447. endif
  1448. ifnb <args>
  1449. push args
  1450. else
  1451. ifdef func&16
  1452. push size func&16
  1453. else
  1454. if1
  1455. %out Warning: assuming null arg frame for &mod:&func
  1456. endif
  1457. push 0
  1458. endif
  1459. endif
  1460. t_&func:
  1461. push word ptr HI_WCALLID
  1462. push __MOD_&mod + FUN_&func
  1463. call WOW16Call
  1464. ; assert that this is constant size code. 5bytes for 'call wow16call'
  1465. ; and 3bytes each for the 'push ...'. We use this info in wow32
  1466. ; to patchcodewithlpfnw32.
  1467. .erre (($ - t_&func) EQ (05h + 03h + 03h))
  1468. cEnd <nogen>
  1469. endif
  1470. endm
  1471. KernelThunk macro func,args,val
  1472. Thunk KERNEL,func,0,args,val
  1473. endm
  1474. DKernelThunk macro func,args,val
  1475. Thunk DKERNEL,func,0,args,val
  1476. endm
  1477. PKernelThunk macro func,callfirst,args,val
  1478. Thunk KERNEL,func,callfirst,args,val
  1479. endm
  1480. UserThunk macro func,args,val
  1481. Thunk USER,func,0,args,val
  1482. endm
  1483. DUserThunk macro func,args,val
  1484. Thunk DUSER,func,0,args,val
  1485. endm
  1486. PUserThunk macro func,callfirst,args,val
  1487. Thunk USER,func,callfirst,args,val
  1488. endm
  1489. PDUserThunk macro func,callfirst,args,val
  1490. Thunk DUSER,func,callfirst,args,val
  1491. endm
  1492. EUserThunk macro func,args,val
  1493. Thunk USER,func,0,args,val,0
  1494. endm
  1495. GDIThunk macro func,args,val
  1496. Thunk GDI,func,0,args,val
  1497. endm
  1498. DGDIThunk macro func,args,val
  1499. Thunk DGDI,func,0,args,val
  1500. endm
  1501. PGDIThunk macro func,callfirst,args,val
  1502. Thunk GDI,func,callfirst,args,val
  1503. endm
  1504. KbdThunk macro func,args,val
  1505. Thunk KEYBOARD,func,0,args,val
  1506. endm
  1507. SoundThunk macro func,args,val
  1508. Thunk SOUND,func,0,args,val
  1509. endm
  1510. SHELLThunk macro func,args,val
  1511. Thunk SHELL,func,0,args,val
  1512. endm
  1513. MMediaThunk macro func,args,val
  1514. Thunk MMEDIA,func,0,args,val
  1515. endm
  1516. WinsockThunk macro func,args,val
  1517. Thunk WINSOCK,func,0,args,val
  1518. endm
  1519. ToolHelpThunk macro func,args,val
  1520. Thunk TOOLHELP,func,0,args,val
  1521. endm
  1522. CommdlgThunk macro func,args,val
  1523. Thunk COMMDLG,func,SetWowCommDlg,args,val
  1524. endm
  1525. ifdef FE_SB
  1526. WINNLSThunk macro func,args,val
  1527. Thunk WINNLS,func,0,args,val
  1528. endm
  1529. WifeManThunk macro func,args,val
  1530. Thunk WIFEMAN,func,0,args,val
  1531. endm
  1532. endif ; FE_SB
  1533. */