Source code of Windows XP (NT5)
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.

3036 lines
60 KiB

  1. ;===========================================================================
  2. ;
  3. ; Validation constants
  4. ;
  5. DCX_VALID_L equ 004fbh
  6. DCX_VALID_H equ 00001h
  7. WS_VALID_L equ 00000h
  8. WS_VALID_H equ 0ffffh
  9. WS_EX_VALID_L equ 07fffh
  10. WS_EX_VALID_H equ 00007h
  11. GND_VALID_L equ 00003h
  12. GND_VALID_H equ 00000h
  13. DT_VALID equ 0ffffh
  14. CS_VALID equ 07fefh
  15. SWP_VALID equ 03fffh
  16. QS_VALID equ 000ffh
  17. TPM_VALID equ 0000fh
  18. RDW_VALID equ 00fffh
  19. SW_VALID equ 08007h
  20. MB_VALID equ 0b377h
  21. IDC_VALID equ 00007h
  22. MF_VALID equ 04fffh
  23. MF_CHANGE_VALID equ 05fffh
  24. EV_VALID equ 03fffh
  25. SPIF_VALID equ 00003h
  26. DDL_VALID equ 0e03fh
  27. PM_VALID equ 00003h
  28. WPF_VALID equ 00003h
  29. SB_MAX equ 3
  30. ESB_MAX equ 3
  31. SB_CMD_MAX equ 8
  32. SW_MAXIMIZE equ 3
  33. SW_MAX equ 9
  34. SM_MAX equ 80
  35. CTLCOLOR_MAX equ 8
  36. COLOR_MAX equ 20
  37. GW_MAX equ 5
  38. WH_MIN equ -1
  39. WH_MAX equ 10
  40. MSGF_MAX equ 7
  41. SPI_MAX equ 65
  42. PWR_MAX equ 3
  43. HHOOK_MAGIC equ ('H' or ('K' * 256))
  44. WS_CHILD equ 4000h
  45. ;=======================================================================
  46. ;
  47. ; GDI types
  48. ;
  49. IFNDEF WOW
  50. ; ExternFP <IsGDIObject>
  51. ENDIF
  52. ;
  53. ; Generate a GDI object validation macro.
  54. ;
  55. ; If nullok is 1, allow NULL.
  56. ; min & max are the allowed OBJ_* range.
  57. ; except, if specified, is an OBJ_* value within the range to reject.
  58. ;
  59. _GenHGDI macro name,nullok,htype,min,max,except
  60. name &macro hObj,opts
  61. local badobj
  62. local objok
  63. _GenParm <hObj>,2,<opts>
  64. if VLgen
  65. IFNDEF WOW
  66. if nullok
  67. mov cx,_P_&&hObj
  68. jcxz objok
  69. push cx
  70. else
  71. push _P_&&hObj
  72. endif
  73. ; call IsGDIObject
  74. ifnb <except>
  75. cmp al,except
  76. jz badobj
  77. endif
  78. ife min-max
  79. cmp al,min
  80. je objok
  81. else
  82. cmp al,min
  83. jb badobj
  84. cmp al,max
  85. jbe objok
  86. endif
  87. badobj:
  88. mov ax,_P_&&hObj
  89. mov bx,ERR_BAD_&htype
  90. lcall Inval_Param_
  91. objok:
  92. ENDIF
  93. endif
  94. &endm
  95. endm
  96. OBJ_PEN equ 1
  97. OBJ_BRUSH equ 2
  98. OBJ_FONT equ 3
  99. OBJ_PALETTE equ 4
  100. OBJ_BITMAP equ 5
  101. OBJ_RGN equ 6
  102. OBJ_DC equ 7
  103. OBJ_IC equ 8
  104. OBJ_DISABLED_DC equ 9
  105. OBJ_METADC equ 10
  106. OBJ_METAFILE equ 11
  107. _GenHGDI <P_HDC>,0,HDC,OBJ_DC,OBJ_METAFILE
  108. _GenHGDI <P_HDC0>,1,HDC,OBJ_DC,OBJ_METAFILE
  109. _GenHGDI <P_HPEN>,0,HPEN,OBJ_PEN,OBJ_PEN
  110. _GenHGDI <P_HPEN0>,1,HPEN,OBJ_PEN,OBJ_PEN
  111. _GenHGDI <P_HBRUSH>,0,HBRUSH,OBJ_BRUSH,OBJ_BRUSH
  112. _GenHGDI <P_HBRUSH0>,1,HBRUSH,OBJ_BRUSH,OBJ_BRUSH
  113. _GenHGDI <P_HFONT>,0,HFONT,OBJ_FONT,OBJ_FONT
  114. _GenHGDI <P_HFONT0>,1,HFONT,OBJ_FONT,OBJ_FONT
  115. _GenHGDI <P_HPALETTE>,0,HPALETTE,OBJ_PALETTE,OBJ_PALETTE
  116. _GenHGDI <P_HPALETTE0>,1,HPALETTE,OBJ_PALETTE,OBJ_PALETTE
  117. _GenHGDI <P_HBITMAP>,0,HBITMAP,OBJ_BITMAP,OBJ_BITMAP
  118. _GenHGDI <P_HBITMAP0>,1,HBITMAP,OBJ_BITMAP,OBJ_BITMAP
  119. _GenHGDI <P_HRGN>,0,HRGN,OBJ_RGN,OBJ_RGN
  120. _GenHGDI <P_HRGN0>,1,HRGN,OBJ_RGN,OBJ_RGN
  121. P_HBITMAP01 macro hbm,opts
  122. _GenParm <hbm>,2,<opts>
  123. if VLgen
  124. IFNDEF WOW
  125. mov ax, _P_&hbm
  126. cmp ax, 1 ; allow NULL or (HBITMAP)1
  127. jbe @F
  128. push ax
  129. push ax
  130. ; call IsGDIObject
  131. cmp al, OBJ_BITMAP
  132. pop ax
  133. jz @F
  134. mov bx,ERR_BAD_HBITMAP
  135. lcall Inval_Param_
  136. @@:
  137. ENDIF
  138. endif
  139. endm
  140. ;============================================================================
  141. ;
  142. ; USER types
  143. ;
  144. ExternFP <IsMenu>
  145. ExternFP <IsWindow>
  146. sBegin TEXT
  147. ExternNP <ValidateMessage> TEMPLY!!!! ChandanC
  148. sEnd TEXT
  149. sBegin DATA
  150. IFNDEF WOW
  151. ExternW <hMenuHeap>
  152. ExternW <cInstalledDrivers>
  153. ENDIF
  154. sEnd DATA
  155. DGROUP group _DATA
  156. P_HWND macro h,opts
  157. _GenParm <h>,2,<opts>
  158. if VLgen
  159. IFNDEF WOW
  160. mov bx,_P_&h
  161. lcall VHWND
  162. _gensub VHWND
  163. ENDIF
  164. endif
  165. endm
  166. P_HWND0 macro h,opts
  167. _GenParm <h>,2,<opts>
  168. if VLgen
  169. IFNDEF WOW
  170. mov bx,_P_&h
  171. lcall VHWND0
  172. _gensub VHWND
  173. ENDIF
  174. endif
  175. endm
  176. P_HWNDNOFAIL macro h,opts
  177. _GenParm <h>,2,<opts>
  178. if VLgen
  179. IFNDEF WOW
  180. lea bx, _P_&h
  181. lcall VHWNDNOFAIL
  182. _gensub VHWNDNOFAIL
  183. @@:
  184. ENDIF
  185. endif
  186. endm
  187. P_HWNDNOFAIL0 macro h,opts
  188. _GenParm <h>,2,<opts>
  189. if VLgen
  190. IFNDEF WOW
  191. lea bx, _P_&h
  192. lcall VHWNDNOFAIL0
  193. _gensub VHWNDNOFAIL
  194. @@:
  195. ENDIF
  196. endif
  197. endm
  198. P_HWNDINSERT macro h,opts
  199. _GenParm <h>,2,<opts>
  200. if VLgen
  201. IFNDEF WOW
  202. mov bx,_P_&h
  203. inc bx
  204. inc bx
  205. cmp bx,3 ; accept HWND_TOP (0), HWND_BOTTOM (1),
  206. jbe @F ; HWND_NOTOPMOST (0xfffe) HWND_TOPMOST (0xffff)
  207. dec bx
  208. dec bx
  209. lcall VHWND
  210. _gensub VHWND
  211. @@:
  212. ENDIF
  213. endif
  214. endm
  215. P_HWNDFFFF macro h,opts
  216. _GenParm <h>,2,<opts>
  217. if VLgen
  218. IFNDEF WOW
  219. mov bx,_P_&h
  220. inc bx ;; accept hwnd == 0xffff
  221. jz @F
  222. dec bx
  223. lcall VHWND
  224. _gensub VHWND
  225. @@:
  226. ENDIF
  227. endif
  228. endm
  229. P_HOOK_HK macro name,opts
  230. _GenParm <name>,4,<opts>
  231. if VLgen
  232. IFNDEF WOW
  233. mov ax,_P_&name+2
  234. cmp ax, HHOOK_MAGIC ; magic for unhook
  235. jz @F
  236. mov ax,_P_&name
  237. mov cx,_P_&name+2
  238. lcall LPFN
  239. _gensub LPFN
  240. @@:
  241. ENDIF
  242. endif
  243. endm
  244. ;
  245. ; CreateWindow and CreateWindowEx HMENU parameter. If WS_CHILD, then
  246. ; hMenu is an ID, else it's a menu handle.
  247. ;
  248. P_HMENU0CW macro style, x, y, cx, cy, hwndParent, hMenu, opts
  249. local hmenu0cw_exit
  250. _GenParm <style>,4,<opts>
  251. _GenParm <x>,2,<opts>
  252. _GenParm <y>,2,<opts>
  253. _GenParm <cx>,2,<opts>
  254. _GenParm <cy>,2,<opts>
  255. _GenParm <hwndParent>,2,<opts>
  256. _GenParm <hMenu>,2,<opts>
  257. if VLgen
  258. IFNDEF WOW
  259. mov bx,_P_&hwndParent ;validate parent window handle (can be NULL)
  260. lcall VHWND0
  261. _gensub VHWND
  262. test word ptr _P_&style+2, WS_CHILD
  263. jnz hmenu0cw_exit ;if this is a child window, we're done...
  264. mov bx,_P_&hMenu ;...else verify menu handle (can be NULL)
  265. lcall VHMENU0
  266. _gensub VHMENU
  267. hmenu0cw_exit:
  268. ENDIF
  269. endif
  270. endm
  271. P_HMENU macro hMenu,opts
  272. _GenParm <hMenu>,2,<opts>
  273. if VLgen
  274. IFNDEF WOW
  275. mov bx,_P_&hMenu
  276. lcall VHMENU
  277. _gensub VHMENU
  278. ENDIF
  279. endif
  280. endm
  281. P_HMENU0 macro hMenu,opts
  282. _GenParm <hMenu>,2,<opts>
  283. if VLgen
  284. IFNDEF WOW
  285. mov bx,_P_&hMenu
  286. lcall VHMENU0
  287. _gensub VHMENU
  288. ENDIF
  289. endif
  290. endm
  291. ;
  292. ; HDRVR validation
  293. ;
  294. P_HDRVR macro h,opts
  295. _GenParm <h>,2,<opts>
  296. if VLgen
  297. IFNDEF WOW
  298. mov bx,_P_&h
  299. lcall HDRVR
  300. _gensub HDRVR
  301. ENDIF
  302. endif
  303. endm
  304. P_HDRVR0 macro h,opts
  305. _GenParm <h>,2,<opts>
  306. if VLgen
  307. IFNDEF WOW
  308. mov bx,_P_&h
  309. lcall HDRVR0
  310. _gensub HDRVR
  311. ENDIF
  312. endif
  313. endm
  314. ;
  315. ; HDWP validation
  316. ;
  317. P_HDWP macro h,opts
  318. _GenParm <h>,2,<opts>
  319. if VLgen
  320. IFNDEF WOW
  321. mov bx,_P_&h
  322. lcall HDWP
  323. _gensub HDWP
  324. ENDIF
  325. endif
  326. endm
  327. P_HDWP0 macro h,opts
  328. _GenParm <h>,2,<opts>
  329. if VLgen
  330. IFNDEF WOW
  331. mov bx,_P_&h
  332. lcall HDWP0
  333. _gensub HDWP
  334. ENDIF
  335. endif
  336. endm
  337. ;-----------------------------
  338. ; HICON and HCURSOR validation
  339. P_HICON equ <P_GHANDLE>
  340. P_HCURSOR equ <P_GHANDLE>
  341. P_HCURSOR0 equ <P_GHANDLE0>
  342. STRUCT <CURSORSHAPE>
  343. F_int xHotSpot
  344. F_int yHotSpot
  345. F_int cx
  346. F_int cy
  347. F_int cbWidth
  348. F_BYTE Planes
  349. F_BYTE BitsPixel
  350. ENDSTRUCT
  351. ;----------------------------------
  352. EXTRA_EXPAND macro lseg
  353. IFNDEF WOW
  354. ;
  355. ; HDRVR validation
  356. ;
  357. ifdef genHDRVR&lseg
  358. public HDRVR0&lseg
  359. HDRVR0&lseg:
  360. or bx,bx ; accept NULL
  361. jz HDRVR_ok&lseg
  362. public HDRVR&lseg
  363. HDRVR&lseg:
  364. or bx,bx
  365. jz HDRVR_err&lseg
  366. mov ax,DGROUP
  367. mov es,ax
  368. assume es:DGROUP
  369. cmp bx,es:[_DATA:cInstalledDrivers]
  370. assume es:NOTHING
  371. ja HDRVR_err&lseg
  372. HDRVR_ok&lseg:
  373. ret
  374. HDRVR_err&lseg:
  375. xchg ax,bx
  376. mov bx,ERR_BAD_HDRVR
  377. jmp Inval_Param_&lseg
  378. endif ; genHDRVR&lseg
  379. ; HDWP validation
  380. ;
  381. ifdef genHDWP&lseg
  382. public HDWP0&lseg
  383. HDWP0&lseg:
  384. or bx,bx ; accept NULL
  385. jz HDWP_ok&lseg
  386. public HDWP&lseg
  387. HDWP&lseg:
  388. or bx,bx
  389. jz HDWP_err&lseg
  390. beg_fault_trap HDWP_trap&lseg
  391. mov ax,DGROUP
  392. mov es,ax
  393. assume es:DGROUP
  394. cmp es:[bx].SmwpSignature,SMWP_SIG
  395. assume es:NOTHING
  396. jnz HDWP_err&lseg
  397. end_fault_trap
  398. HDWP_ok&lseg:
  399. ret
  400. HDWP_trap&lseg:
  401. fault_fix_stack
  402. HDWP_err&lseg:
  403. xchg ax,bx
  404. mov bx,ERR_BAD_HDWP
  405. jmp short Inval_Param_&lseg
  406. endif ; genHDWP&lseg
  407. ;
  408. ; HWND validation
  409. ;
  410. ifdef genVHWND&lseg
  411. public VHWND0&lseg
  412. VHWND0&lseg:
  413. or bx,bx ; accept NULL
  414. jz HWND_ok&lseg
  415. public VHWND&lseg
  416. VHWND&lseg:
  417. mov cx,bx ; put copy of window handle into cx
  418. beg_fault_trap HWND_trap&lseg
  419. or bx,bx ; reject NULL without dereferencing
  420. jz HWND_err&lseg
  421. mov ax,_DATA
  422. mov es,ax ; ES = window's DS
  423. mov bx,es:[bx].wndPcls
  424. cmp es:[bx].uclsMagic,'N'+'K'*256
  425. jnz HWND_err&lseg
  426. end_fault_trap
  427. HWND_ok&lseg:
  428. ret
  429. HWND_trap&lseg:
  430. fault_fix_stack
  431. HWND_err&lseg:
  432. xchg ax,cx ; ax = hwnd
  433. mov bx,ERR_BAD_HWND
  434. jmp short Inval_Param_&lseg
  435. endif ; genVHWND&lseg
  436. ;HWND validation no failure. If failure, replace with NULL and warn
  437. ; Takes a ptr on stack to the hwnd parameter.
  438. ifdef genVHWNDNOFAIL&lseg
  439. public VHWNDNOFAIL0&lseg
  440. VHWNDNOFAIL0&lseg:
  441. mov cx,ss:[bx]
  442. jcxz HWNDNOFAIL_ok&lseg ; accept NULL
  443. public VHWNDNOFAIL&lseg
  444. VHWNDNOFAIL&lseg:
  445. mov cx,bx ; put copy of ptr to window handle into cx
  446. mov bx,ss:[bx] ; put window handle in bx
  447. beg_fault_trap HWNDNOFAIL_trap&lseg
  448. or bx,bx ; reject NULL without dereferencing
  449. jz HWNDNOFAIL_err&lseg
  450. mov ax,_DATA
  451. mov es,ax ; ES = window's DS
  452. mov bx,es:[bx].wndPcls
  453. cmp es:[bx].uclsMagic,'N'+'K'*256
  454. jnz HWNDNOFAIL_err&lseg
  455. end_fault_trap
  456. HWNDNOFAIL_ok&lseg:
  457. ret
  458. HWNDNOFAIL_trap&lseg:
  459. fault_fix_stack
  460. HWNDNOFAIL_err&lseg:
  461. mov bx,cx
  462. mov ax,ss:[bx] ; ax = hwnd
  463. mov word ptr ss:[bx],0 ; Patch stack with NULL
  464. mov bx,ERR_BAD_HWND or ERR_WARNING
  465. lcall Inval_Param_
  466. ret
  467. endif ; genVHWNDNOFAIL&lseg
  468. ; HMENU validation
  469. ifdef genVHMENU&lseg
  470. public VHMENU0&lseg
  471. VHMENU0&lseg:
  472. or bx,bx ; Accept NULL
  473. jz HMENU_ok&lseg
  474. public VHMENU&lseg
  475. VHMENU&lseg:
  476. beg_fault_trap HMENU_trap&lseg
  477. or bx,bx ; reject NULL without dereferencing
  478. jz HMENU_err&lseg
  479. mov ax,DGROUP
  480. mov es,ax
  481. assume es:DGROUP
  482. mov es,es:[_DATA:hMenuHeap]
  483. assume es:NOTHING
  484. cmp es:[bx].mnSignature,SIG_MENU
  485. jnz HMENU_err&lseg
  486. end_fault_trap
  487. HMENU_ok&lseg:
  488. ret
  489. HMENU_trap&lseg:
  490. fault_fix_stack
  491. HMENU_err&lseg:
  492. xchg ax,bx
  493. mov bx,ERR_BAD_HMENU
  494. jmp short Inval_Param_&lseg
  495. endif ; genVHMENU&lseg
  496. ENDIF
  497. endm ; EXTRA_EXPAND
  498. P_HACCEL equ <P_GHANDLE>
  499. P_HACCEL0 equ <P_GHANDLE0>
  500. P_HCLIPDATA equ <P_H> ; depends on type.
  501. P_HCLIPDATA0 equ <P_H0>
  502. P_HHOOK macro hhook,opts
  503. local hhook_err
  504. local hhook_ok
  505. _GenParm <hhook>,4,<opts>
  506. if VLgen
  507. IFNDEF WOW
  508. mov cx,_P_&hhook
  509. mov ax,_P_&hhook+2
  510. jcxz hhook_err
  511. cmp ax,HHOOK_MAGIC
  512. je hhook_ok
  513. hhook_err:
  514. mov bx,ERR_BAD_DVALUE
  515. lcall Inval_Param_
  516. hhook_ok:
  517. ENDIF
  518. endif
  519. endm
  520. P_GWWINDEX equ <P_2> ; GetWindowWord index
  521. P_GCWINDEX equ <P_2> ; GetClassWord index
  522. P_CID macro cid,opts
  523. local cid_err
  524. local cid_ok
  525. _GenParm <cid>,2,<opts>
  526. if VLgen
  527. mov ax,_P_&cid
  528. or ah,ah
  529. jz cid_ok
  530. cid_err:
  531. mov bx,ERR_BAD_HANDLE
  532. lcall Inval_Param_
  533. cid_ok:
  534. endif
  535. endm
  536. ; Field types
  537. _DefSimpleF F_HDC,2
  538. _DefSimpleF F_HWND,2
  539. _DefSimpleF F_CID,2
  540. _DefSimpleF F_HINSTANCE,2
  541. _DefSimpleF F_HICON0,2
  542. _DefSimpleF F_HCURSOR0,2
  543. _DefSimpleF F_HBRUSHVAL0,2
  544. _DefSimpleF F_LPFNWP,4
  545. _DefSimpleF F_LPFNWND,4
  546. _DefSimpleF F_CLPSTRRSRC,4
  547. _DefSimpleF F_CLPSTRRSRC0,4
  548. _DefSimpleF F_CLPSTRATOM,4
  549. _DefSimpleF F_RGB16,16
  550. STRUCT <MSG>
  551. F_HWND hwnd
  552. F_WORD message
  553. F_WORD wParam
  554. F_LONG lParam
  555. F_DWORD time
  556. F_POINT pt
  557. ENDSTRUCT
  558. _GenLP <P_LPMSG>,<LP>,%VLcbsMSG
  559. _GenLP <P_LPMSG0>,<LP0>,%VLcbsMSG
  560. P_CLPMSG macro lpmsg,opts
  561. _GenParm <lpmsg>,4,<opts>
  562. if VLgen
  563. mov ax,_P_&lpmsg
  564. mov cx,_P_&lpmsg+2
  565. mov bx,VLcbsMSG
  566. lcall CLP
  567. _gensub LP
  568. ifdef DEBUG
  569. IFNDEF WOW
  570. mov es,cx
  571. mov bx,ax
  572. mov bx,es:[bx]._F_hwnd ; DEBUG: just validate the hwnd.
  573. lcall VHWND0
  574. _gensub VHWND
  575. ENDIF
  576. else
  577. mov es,cx
  578. mov bx,ax
  579. mov cx,es:[bx]._F_hwnd ; accept hwnd == NULL
  580. jcxz @F
  581. push cx
  582. push es:[bx]._F_message
  583. push es:[bx]._F_wParam
  584. push es:[bx]._F_lParam+2
  585. push es:[bx]._F_lParam
  586. call far ptr ValidateMessage
  587. or ax,ax
  588. jnz @F
  589. mov ax,_P_&lpmsg ; report error.
  590. mov cx,_P_&lpmsg+2
  591. mov bx,ERR_BAD_PTR
  592. lcall Inval_Param_
  593. @@:
  594. endif
  595. endif
  596. endm
  597. STRUCT <PAINTSTRUCT>
  598. F_HDC hdc
  599. F_BOOL fErase
  600. F_RECT rcPaint
  601. F_BOOL fRestore
  602. F_BOOL fIncUpdate
  603. F_RGB16 rgbReserved ;16 reserved bytes
  604. ENDSTRUCT
  605. _GenLP <P_LPPAINTSTRUCT>,<LP>,%VLcbsPAINTSTRUCT
  606. _GenLP <P_LPPAINTSTRUCT0>,<LP0>,%VLcbsPAINTSTRUCT
  607. _GenLP <P_CLPPAINTSTRUCT>,<CLP>,%VLcbsPAINTSTRUCT
  608. _GenLP <P_CLPPAINTSTRUCT0>,<CLP0>,%VLcbsPAINTSTRUCT
  609. STRUCT <WNDCLASS>
  610. F_FLAGS style, CS_VALID
  611. F_LPFNWP lpfnWndProc ;** check for nop/nop/nop or mov ax.
  612. F_int cbClsExtra
  613. F_int cbWndExtra
  614. F_HINSTANCE hInstance
  615. F_HICON0 hIcon
  616. F_HCURSOR0 hCursor
  617. F_HBRUSHVAL0 hbrBackground ;** hBrush, color value or NULL
  618. F_CLPSTRRSRC0 lpMenuName ;** integer or ptr to null-term. string
  619. ;If integer, HIWORD must be 0
  620. F_CLPSTRATOM lpszClassName
  621. ENDSTRUCT
  622. _GenLP <P_LPWNDCLASS>,<LP>,%VLcbsWNDCLASS
  623. _GenLP <P_LPWNDCLASS0>,<LP0>,%VLcbsWNDCLASS
  624. ;ExternFP <ValidateWNDCLASS>
  625. P_CLPWNDCLASS macro lpwc,opts
  626. _GenParm <lpwc>,4,<opts>
  627. if VLgen
  628. ; push _P_&lpwc+2
  629. ; push _P_&lpwc
  630. ; call ValidateWNDCLASS
  631. ; or ax,ax
  632. ; jnz @F
  633. ; mov cx,_P_&lpwc+2
  634. ; mov ax,_P_&lpwc
  635. ; mov bx,ERR_BAD_PTR
  636. ; lcall Inval_Param_
  637. ; @@:
  638. endif
  639. endm
  640. STRUCT <DCB>
  641. F_CID Id ;comm. device ID
  642. F_WORD BaudRate
  643. F_BYTE ByteSize ;** BYTE. Range 4-8
  644. F_BYTE Parity ;** BYTE. Range 0-4
  645. F_BYTE StopBits ;** BYTE. Range 0-2
  646. F_WORD RlsTimeout
  647. F_WORD CtsTimeout
  648. F_WORD DsrTimeout
  649. F_WORD flags ; room for the fXXX bitfields
  650. F_char XonChar
  651. F_char XoffChar
  652. F_WORD XonLim
  653. F_WORD XoffLim
  654. F_char PeChar
  655. F_char EofChar
  656. F_char EvtChar
  657. F_WORD TxDelay
  658. ENDSTRUCT
  659. _GenLP <P_LPDCB>,<LP>,%VLcbsDCB
  660. _GenLP <P_LPDCB0>,<LP0>,%VLcbsDCB
  661. _GenLP <P_CLPDCB>,<CLP>,%VLcbsDCB
  662. _GenLP <P_CLPDCB0>,<CLP0>,%VLcbsDCB
  663. _GenLP <P_CLPDT>,<CLP>,4 ; dialog template ptr
  664. _GenLP <P_CLPMT>,<CLP>,4 ; menu template ptr
  665. P_CLPMENUSTR equ <P_DWORD> ; menu string ptr: type depends on MF_*
  666. _GenLP <P_LPKBDSTATE>,<LP>,256
  667. _GenLP <P_CLPKBDSTATE>,<CLP>,256
  668. STRUCT <COMSTAT>
  669. F_BYTE flags
  670. F_WORD cbInQue
  671. F_WORD cbOutQue
  672. ENDSTRUCT
  673. _GenLP <P_LPCOMSTAT0>,<LP0>,%VLcbsCOMSTAT
  674. _DefSimpleF F_HDRVR,2
  675. _DefSimpleF F_HMODULE,2
  676. _DefSimpleF F_RGB128,128
  677. STRUCT <DRIVERINFOSTRUCT>
  678. F_WORD length
  679. F_HDRVR hDriver
  680. F_HMODULE hModule
  681. F_RGB128 szAliasName
  682. ENDSTRUCT
  683. P_LPDRIVERINFOSTRUCT macro lpdi,opts
  684. _GenParm <lpdi>,4,<opts>
  685. if VLgen
  686. mov ax,_P_&lpdi
  687. mov cx,_P_&lpdi+2
  688. lcall LP0
  689. _gensub LP
  690. mov es,cx
  691. mov bx,ax
  692. cmp word ptr es:[bx]._F_length,VLcbsDRIVERINFOSTRUCT
  693. jz @F
  694. mov bx,ERR_BAD_PTR
  695. lcall Inval_Param_
  696. @@:
  697. endif
  698. endm
  699. STRUCT <WINDOWPLACEMENT>
  700. F_WORD length
  701. F_FLAGS flags, WPF_VALID
  702. F_WORD showCmd
  703. F_POINT ptMinPosition
  704. F_POINT ptMaxPosition
  705. F_RECT rcNormalPosition
  706. ENDSTRUCT
  707. P_LPWINDOWPLACEMENT macro lpwp,opts
  708. _GenParm <lpwp>,4,<opts>
  709. if VLgen
  710. mov ax,_P_&lpwp
  711. mov cx,_P_&lpwp+2
  712. mov bx,VLcbsWINDOWPLACEMENT
  713. lcall LP
  714. _gensub LP
  715. mov es,cx
  716. mov bx,ax
  717. cmp word ptr es:[bx]._F_length,VLcbsWINDOWPLACEMENT
  718. jz @F
  719. mov bx,ERR_BAD_PTR
  720. lcall Inval_Param_
  721. @@:
  722. endif
  723. endm
  724. P_CLPWINDOWPLACEMENT macro lpwp,opts
  725. _GenParm <lpwp>,4,<opts>
  726. if VLgen
  727. mov ax,_P_&lpwp
  728. mov cx,_P_&lpwp+2
  729. mov bx,VLcbsWINDOWPLACEMENT
  730. lcall CLP
  731. _gensub CLP
  732. mov es,cx
  733. mov bx,ax
  734. cmp word ptr es:[bx]._F_length,VLcbsWINDOWPLACEMENT
  735. jz @F
  736. mov bx,ERR_BAD_PTR
  737. lcall Inval_Param_
  738. @@:
  739. endif
  740. endm
  741. ; Function pointers
  742. ;
  743. P_LPFNWP equ <P_LPFN> ; Window proc
  744. P_LPFNDP equ <P_LPFN> ; dialog proc
  745. P_LPFNDP0 equ <P_LPFN0>
  746. P_LPFNWENUM equ <P_LPFN> ; EnumWindows() enumeration proc
  747. P_LPFNTIMER equ <P_LPFN> ; Timer proc
  748. P_LPFNTIMER0 equ <P_LPFN0>
  749. P_LPFNPENUM equ <P_LPFN> ; EnumProps() enumeration proc
  750. P_LPFNEVENTPROC0 equ <P_LPFN0> ; SetEventHook proc
  751. P_HOOKPROC equ <P_LPFN> ; SetWindowsHookEx() hook function
  752. _GenLP <P_LPHOOKPROC>,<LP>,4 ; Pointer to pointer to function
  753. P_HOTKEYPROC equ <P_LPFN>
  754. ; SystemParametersInfo arguments
  755. P_SPIPARAMS macro id,wParam,lpParam,flags,opts
  756. P_UVALUE <id>,SPI_MAX,<opts>
  757. P_WORD <wParam>,<opts>
  758. P_LPVOID0 <lpParam>,<opts>
  759. P_FLAGS <flags>,SPIF_VALID,<opts>
  760. endm
  761. ;
  762. ; SetSysColors() parameters
  763. ;
  764. P_CLPSYSCLRBUF macro count, lpIds, lpColors
  765. P_int <count>, <opts>
  766. P_CLPINT <id>, <opts>
  767. P_CLPLONG <lpColors>, <opts>
  768. endm
  769. ;
  770. ; TabbedTextOut, et al
  771. ;
  772. P_CLPTABBUF0 macro cTabStops, lpTabStops
  773. _DefParm <cTabStops>,2,<opts>
  774. _DefParm <lpTabStops>,4,<opts>
  775. if VLgen
  776. _FlsFrame
  777. mov ax,_P_&lpTabStops
  778. mov cx,_P_&lpTabStops+2
  779. mov bx,_P_&cTabStops
  780. add bx,bx
  781. lcall CLP0
  782. _gensub LP
  783. endif
  784. endm
  785. ;
  786. ; DrawText() lpch, cch
  787. ;
  788. ; if cch == -1, then lpch is a pointer to a zero-terminated string.
  789. ;
  790. P_CLPBUFFERM1 macro lpch, cch, opts
  791. local dt_chkstr
  792. local dt_ok
  793. _DefParm <lpch>,4,<opts>
  794. _DefParm <cch>,2,<opts>
  795. if VLgen
  796. _FlsFrame
  797. mov ax,_P_&lpch
  798. mov cx,_P_&lpch+2
  799. mov bx,_P_&cch
  800. inc bx ;; if cch == -1, check zero-terminated string
  801. jz dt_chkstr
  802. dec bx
  803. lcall CLP
  804. _gensub LP
  805. jmp short dt_ok
  806. dt_chkstr:
  807. mov bx,-1
  808. lcall CLPSZ
  809. _gensub LPSZ
  810. dt_ok:
  811. endif
  812. endm
  813. ;
  814. ; Buffer of words
  815. ;
  816. P_LPWBUFFER macro lpw, cw, opts
  817. _DefParm <lpw>,4,<opts>
  818. _DefParm <cw>,2,<opts>
  819. if VLgen
  820. _FlsFrame
  821. mov ax,_P_&lpw
  822. mov cx,_P_&lpw+2
  823. mov bx,_P_&cw
  824. add bx,bx
  825. lcall LP
  826. _gensub LP
  827. endif
  828. endm
  829. .list
  830. .lall
  831. ;===========================================================================
  832. ;
  833. ; API Descriptions
  834. ;
  835. ; in CTLMGR.C
  836. API int, DrawText, TEXT
  837. P_HDC hdc
  838. P_CLPBUFFERM1 lpszText, cchText ; cchText == -1 means do strlen.
  839. P_LPRECT lprc
  840. P_FLAGS flags,DT_VALID ; if DT_TABSTOP, then hi byte is val.
  841. ; in wTEXT.c
  842. API int, wvsprintf, TEXT
  843. P_LPSTR lpOut
  844. P_CLPSTR lpFmt
  845. P_CLPSTR0 lpParams
  846. APIERR
  847. E_SETEMPTYNC lpOut
  848. APIEND
  849. ;;;;;;;;ChandanC TEMPLY!!! FIX ME
  850. ; in wsprintf.c
  851. ;API int, wsprintf, TEXT
  852. ;P_LPSTR lpOut
  853. ;P_CLPSTR lpFmt
  854. ;APIERR
  855. ;E_SETEMPTYNC lpOut
  856. ;APIEND
  857. ; in CTLMGR.C
  858. API DWORD, GetTabbedTextExtent, TEXT
  859. P_HDC hdc
  860. P_CLPBUFFER lpchText, cchText
  861. P_CLPTABBUF0 cTabStops, lpTabStops
  862. ; in CTLMGR.C
  863. API LONG, TabbedTextOut, TEXT
  864. P_HDC hdc
  865. P_int x
  866. P_int y
  867. P_CLPBUFFER lpchText, cchText
  868. P_CLPTABBUF0 cTabStops, lpTabStops
  869. P_int xTabOrigin
  870. ; in WMICON.C
  871. API BOOL, DrawIcon, TEXT
  872. P_HDC hdc
  873. P_int x
  874. P_int y
  875. P_HICON hIcon
  876. ; in WMDC.C
  877. API HDC, GetWindowDC, TEXT ; ** calls GetDCEx directly
  878. P_HWND0 hwnd ; obsolete NULL - source of errors
  879. ; in WMDC.C
  880. API HDC, GetDC, TEXT ; ** calls GetDCEx directly
  881. P_HWND0 hwnd ; obsolete NULL - source of errors
  882. ; in WMDC.C
  883. API BOOL, ReleaseDC, TEXT ; return type is int in windows.h -- fix it
  884. P_HWND0 hwnd ; not used at all
  885. P_HDC hdc ; only used for comparison
  886. ; in WMDC.C
  887. API HDC, GetDCEx, TEXT
  888. P_HWND hwnd ; Must be a real window.
  889. P_HRGN0 hrgn ; Can be NULL, what about (HRGN)1???
  890. P_DFLAGS flags,DCX_VALID_L,DCX_VALID_H
  891. ; in WINLOOP3.ASM
  892. API WORD, RegisterWindowMessage, TEXT, <ASM, NOGEN> ; <WIN> calls AddAtom
  893. P_CLPSTRATOM lpszName ; const
  894. ; in WINLOOP1.ASM
  895. API BOOL, GetMessage, TEXT, <ASM, FUNNYFRAME>
  896. P_LPMSG lpmsg ; Compound parameter
  897. P_HWND0 hwndFilter
  898. P_WORD msgFilterFirst
  899. P_WORD msgFilterLast
  900. APIERR
  901. mov ax, -1 ;0 return indicates WM_QUIT was retrieved.
  902. APIEND ;so return -1 instead
  903. ; in WINLOOP1.ASM
  904. API BOOL, TranslateMessage, TEXT, <ASM> ; <WIN>
  905. P_CLPMSG lpmsg
  906. ; in WINLOOP1.ASM
  907. API LONG, DispatchMessage, TEXT, <ASM> ; <WIN>
  908. P_CLPMSG lpmsg ; const
  909. ; in WINLOOP1.ASM
  910. API BOOL, PeekMessage, TEXT, <ASM, FUNNYFRAME>
  911. P_LPMSG lpmsg
  912. P_HWND0 hwndFilter
  913. P_WORD msgFilterFirst
  914. P_WORD msgFilterLast
  915. P_FLAGS flags,PM_VALID
  916. ; in WINLANG.ASM
  917. API int, lstrcmp, TEXT, <ASM> ;error return value ?? (0 is valid)
  918. P_CLPSTR lpsz1, -1, DEBUGONLY
  919. P_CLPSTR lpsz2, -1, DEBUGONLY
  920. ; in WINLANG.ASM
  921. API int, lstrcmpi, TEXT, <ASM>
  922. P_CLPSTR lpsz1, -1, DEBUGONLY ;error return value ?? (0 is valid)
  923. P_CLPSTR lpsz2, -1, DEBUGONLY
  924. ; in INEXIT.C
  925. API BOOL, ExitWindows, TEXT, <NOGEN>
  926. P_DWORD errorCode
  927. P_WORDMBZ unused ; must be 0.
  928. ; in INEXIT.C
  929. API BOOL, ExitWindowsExec, TEXT
  930. P_CLPSTR lpExeName
  931. P_CLPSTR0 lpParams
  932. ; in WINMISC2.ASM
  933. API BOOL, SwapMouseButton, TEXT, <NOGEN, ASM, FUNNYFRAME>
  934. P_BOOL fSwap
  935. ; in WINLOOP3.ASM
  936. API DWORD, GetMessagePos, TEXT, <VOID, ASM, FUNNYFRAME>
  937. ; in WINLOOP3.ASM
  938. API LONG, GetMessageTime, TEXT, <VOID, ASM, FUNNYFRAME>
  939. ; in WINLOOP3.ASM
  940. API LONG, GetMessageExtraInfo, TEXT, <VOID, ASM, FUNNYFRAME>
  941. ; in WINMISC1.ASM
  942. API HWND, GetSysModalWindow, TEXT, <VOID, ASM, FUNNYFRAME>
  943. ; in WINMISC1.ASM
  944. API HWND, SetSysModalWindow, TEXT, <ASM> ; <SMALL>
  945. P_HWND0 hwnd
  946. ; SendMessage/PostMessage parameters
  947. ;
  948. P_SMPARMS macro hwnd, msg, wParam, lParam, opts
  949. _DefParm <hwnd>,2,<opts>
  950. _DefParm <msg>,2,<opts>
  951. _DefParm <wParam>,2,<opts>
  952. _DefParm <lParam>,4,<opts>
  953. if VLgen
  954. _FlsFrame
  955. mov ax,_P_&hwnd ;; If hwnd == 0xFFFF, skip validation
  956. inc ax
  957. jz @F
  958. push _P_&hwnd
  959. push _P_&msg
  960. push _P_&wParam
  961. push _P_&lParam+2
  962. push _P_&lParam
  963. call far ptr ValidateMessage
  964. or ax,ax
  965. jnz @F
  966. pop bx ; pop off error handler addr addr
  967. pop bp ; and saved bp
  968. cwd ; dx:ax = 0
  969. jmp bx ; jump to error handler
  970. @@:
  971. endif
  972. endm
  973. ; in WINSEND.ASM
  974. API LONG, SendMessage, TEXT, <ASM, FUNNYFRAME>
  975. P_SMPARMS hwnd, <msg>, wParam, lParam
  976. ; in WINLOOP1.ASM
  977. API BOOL, PostMessage, TEXT, <ASM, FUNNYFRAME>
  978. P_SMPARMS hwnd, <msg>, wParam, lParam
  979. ; in WINLOOP1.ASM
  980. API BOOL, PostAppMessage, TEXT, <ASM, FUNNYFRAME>
  981. P_HTASK hTask
  982. P_WORD <msg>
  983. P_WORD wParam
  984. P_LONG lParam
  985. ; in WINSEND.ASM
  986. API void, ReplyMessage, TEXT, <NOGEN, ASM>
  987. P_LONG result
  988. ; in WINSEND.ASM
  989. API void, WaitMessage, TEXT, <VOID, ASM>
  990. P_MSGPARMS macro hwnd, msg, wParam, lParam, opts
  991. _DefParm <hwnd>,2,<opts>
  992. _DefParm <msg>,2,<opts>
  993. _DefParm <wParam>,2,<opts>
  994. _DefParm <lParam>,4,<opts>
  995. if VLgen
  996. _FlsFrame
  997. push _P_&hwnd
  998. push _P_&msg
  999. push _P_&wParam
  1000. push _P_&lParam+2
  1001. push _P_&lParam
  1002. call far ptr ValidateMessage
  1003. or ax,ax
  1004. jnz @F
  1005. pop bx ; pop off error handler addr addr
  1006. pop bp ; and saved bp
  1007. cwd
  1008. jmp bx ; jump to error handler
  1009. @@:
  1010. endif
  1011. endm
  1012. ; in MSDWP.C
  1013. API LONG, DefWindowProc, TEXT
  1014. P_MSGPARMS hwnd,<msg>,wParam,lParam
  1015. ; in WINLOOP3.ASM
  1016. API void, PostQuitMessage, TEXT, <NOGEN, ASM>
  1017. P_int exitCode
  1018. ; in WINLOOP1.ASM
  1019. API LONG, CallWindowProc, TEXT, <ASM> ; <WIN>
  1020. P_LPFNWP lpfnWndProc
  1021. P_MSGPARMS hwnd,<msg>,wParam,lParam
  1022. ; in WINSEND.ASM
  1023. API BOOL, InSendMessage, TEXT, <VOID, ASM, FUNNYFRAME>
  1024. ; in WINLOOP3.ASM
  1025. API WORD, GetDoubleClickTime, TEXT, <VOID, ASM, FUNNYFRAME>
  1026. ; in WINLOOP3.ASM
  1027. API void, SetDoubleClickTime, TEXT, <NOGEN, ASM, FUNNYFRAME>
  1028. P_WORD ticks
  1029. ; in WMCLASS.C
  1030. API BOOL, RegisterClass, TEXT
  1031. P_CLPWNDCLASS lpwcls ; const
  1032. ; in WMCLASS.C
  1033. API BOOL, UnregisterClass, TEXT
  1034. P_CLPSTRATOM lpszClass
  1035. P_HINSTANCE32 hInstance
  1036. ; in WMCLASS.C
  1037. API BOOL, GetClassInfo, TEXT
  1038. P_HINSTANCE0 hInstance
  1039. P_CLPSTRATOM lpszClass
  1040. P_LPWNDCLASS lpwcls
  1041. ; in WMCLASS.C
  1042. API int, GetClassName, TEXT
  1043. P_HWND hwnd
  1044. P_LPBUFFER lpszName, cchName
  1045. APIERR
  1046. E_SETEMPTY lpszName, cchName
  1047. APIEND
  1048. ; in WINQ.ASM
  1049. API BOOL, SetMessageQueue, TEXT, <NOGEN, ASM>
  1050. P_int cMsgs
  1051. ; in TMSWITCH.C
  1052. API HWND, GetNextQueueWindow, TEXT
  1053. P_HWND hwnd
  1054. P_BOOL fPrevious ;; ??? HEADER FILE ERROR: should be BOOL
  1055. ; in CLASS.ASM
  1056. API HWND, CreateWindow, TEXT, <ASM, FUNNYFRAME>
  1057. P_CLPSTRATOM lpszClass
  1058. P_CLPSTR0 lpszText
  1059. P_HMENU0CW style, x, y, cx, cy, hwndParent, hMenu
  1060. P_HINSTANCE0 hInstance ; Need to allow 0 because IdleWild Bozos didn't initialize some variables
  1061. P_DWORD lpCreateParams ; Should be CLPVOID0, but sometimes people pass other stuff
  1062. ; in WMCREATE.C
  1063. API HWND, CreateWindowEx, TEXT
  1064. P_DFLAGS exStyle, WS_EX_VALID_L, WS_EX_VALID_H
  1065. P_CLPSTRATOM lpszClass
  1066. P_CLPSTR0 lpszText
  1067. P_HMENU0CW style, x, y, cx, cy, hwndParent, hMenu
  1068. P_HINSTANCE hInstance
  1069. P_DWORD lpCreateParams ; Should be CLPVOID0, but sometimes people pass other stuff
  1070. ; in WINMISC1.ASM
  1071. API BOOL, IsWindow, TEXT, <NOGEN, ASM, FUNNYFRAME> ; No validation needed
  1072. P_HWND hwnd
  1073. ; in WINMISC2.ASM
  1074. API BOOL, IsChild, TEXT, <ASM, FUNNYFRAME, DEBUGONLY>
  1075. P_HWND hwndParent, DEBUGONLY ;used for comparison only
  1076. P_HWND0 hwndChild ; allow NULL for backward compatibility
  1077. ; in WMDSTROY.C
  1078. API BOOL, DestroyWindow, TEXT
  1079. P_HWND hwnd
  1080. ; in WINOBJ.C
  1081. API BOOL, DragDetect, TEXT
  1082. P_HWND hwndFrom
  1083. P_POINT ptScreen
  1084. API LRESULT, DragObject, TEXT
  1085. P_HWND hwndParent
  1086. P_HWND0 hwndFrom
  1087. P_WORD wFmt
  1088. P_LONG dwData
  1089. P_HCURSOR0 hCursor
  1090. ; in WMSTATE.C
  1091. API BOOL, GetWindowPlacement, TEXT
  1092. P_HWND hwnd
  1093. P_LPWINDOWPLACEMENT lpp
  1094. ; in WMSTATE.C
  1095. API BOOL, SetWindowPlacement, TEXT
  1096. P_HWND hwnd
  1097. P_CLPWINDOWPLACEMENT lpp
  1098. ; in WMSHOW.C
  1099. API BOOL, ShowWindow, TEXT
  1100. P_HWND hwnd
  1101. P_VALUE cmd,SW_MAX
  1102. ; in WMFLASH.C
  1103. API BOOL, FlashWindow, TEXT
  1104. P_HWND hwnd
  1105. P_BOOL fFlash
  1106. ; in WMSHOW.C
  1107. API void, ShowOwnedPopups, TEXT
  1108. P_HWND hwnd
  1109. P_BOOL fShow
  1110. ; in WMSHOW.C
  1111. API BOOL, OpenIcon, TEXT
  1112. P_HWND hwnd
  1113. ; in WMSHOW.C
  1114. API void, CloseWindow, TEXT
  1115. P_HWND hwnd
  1116. ; in WMMOVE.C
  1117. API BOOL, MoveWindow, TEXT
  1118. P_HWND hwnd
  1119. P_int x
  1120. P_int y
  1121. P_int cx
  1122. P_int cy
  1123. P_BOOL fRedraw
  1124. ; in WMSWP.C
  1125. API BOOL, SetWindowPos, TEXT
  1126. P_HWND hwnd
  1127. P_HWNDINSERT hwndInsertAfter
  1128. P_int x
  1129. P_int y
  1130. P_int cx
  1131. P_int cy
  1132. P_FLAGS flags, SWP_VALID
  1133. ; in WMSWP.C
  1134. API HDWP, BeginDeferWindowPos, TEXT, <NOGEN>
  1135. P_int cwndHint
  1136. ; in WMSWP.C
  1137. API HDWP, DeferWindowPos, TEXT,
  1138. P_HDWP hdwp ; must be non-null
  1139. P_HWND hwnd
  1140. P_HWNDINSERT hwndInsertAfter
  1141. P_int x
  1142. P_int y
  1143. P_int cx
  1144. P_int cy
  1145. P_FLAGS flags, SWP_VALID
  1146. ; in WMSWP.C
  1147. API BOOL, EndDeferWindowPos, TEXT
  1148. P_HDWP hdwp ; must be non-null
  1149. ; in WMSWP.C
  1150. API BOOL, BringWindowToTop, TEXT
  1151. P_HWND hwnd
  1152. ; in WINMISC2.ASM
  1153. API BOOL, IsWindowVisible, TEXT, <ASM, FUNNYFRAME, DEBUGONLY>
  1154. P_HWND hwnd
  1155. ; in WINMISC1.ASM
  1156. API BOOL, IsIconic, TEXT, <ASM, FUNNYFRAME, DEBUGONLY>
  1157. P_HWND hwnd
  1158. ; in WMMISC.C
  1159. API BOOL, AnyPopup, TEXT, <VOID>
  1160. ; in WINMISC1.ASM
  1161. API BOOL, IsZoomed, TEXT, <ASM, FUNNYFRAME, DEBUGONLY>
  1162. P_HWND hwnd
  1163. ; in DLGBEGIN.C
  1164. API HWND, CreateDialog, TEXT ; Calls CreateDialogParam
  1165. P_HINSTANCE hModule
  1166. P_CLPSTRRSRC lpszTemplateName
  1167. P_HWND0 hwndOwner
  1168. P_LPFNDP0 lpfnDlgProc
  1169. ; in DLGBEGIN.C
  1170. API HWND, CreateDialogIndirect, TEXT ; Calls CreateDialogIndirectParam
  1171. P_HINSTANCE hInstance
  1172. P_CLPDT lpDlgTemplate
  1173. P_HWND0 hwndOwner
  1174. P_LPFNDP0 lpfnDlgProc
  1175. ; in DLGBEGIN.C
  1176. API HWND, CreateDialogParam, TEXT
  1177. P_HINSTANCE hInstance
  1178. P_CLPSTRRSRC lpszTemplateName
  1179. P_HWND0 hwndOwner
  1180. P_LPFNDP0 lpfnDlgProc
  1181. P_LONG lParam
  1182. ; in DLGBEGIN.C
  1183. API HWND, CreateDialogIndirectParam, TEXT
  1184. P_HINSTANCE hInstance
  1185. P_CLPDT lpDlgTemplate
  1186. P_HWND0 hwndOwner
  1187. P_LPFNDP0 lpfnDlgProc
  1188. P_LONG lParam
  1189. ; in DLGMGR.C
  1190. API int, DialogBox, TEXT ; Calls DialogBoxParam
  1191. P_HINSTANCE hInstance
  1192. P_CLPSTRRSRC lpszTemplateName
  1193. P_HWND0 hwndOwner
  1194. P_LPFNDP0 lpfnDlgProc
  1195. ; in DLGMGR.C
  1196. API int, DialogBoxIndirect, TEXT ; Calls DialogBoxIndirectParam
  1197. P_HINSTANCE hInstance
  1198. P_GHANDLE hDlgTemplate
  1199. P_HWND0 hwndOwner
  1200. P_LPFNDP0 lpfnDlgProc
  1201. ; in DLGMGR.C
  1202. API int, DialogBoxParam, TEXT
  1203. P_HINSTANCE hInstance
  1204. P_CLPSTRRSRC lpszTemplateName
  1205. P_HWND0 hwndOwner
  1206. P_LPFNDP0 lpfnDlgProc
  1207. P_LONG lParam
  1208. ; in DLGMGR.C
  1209. API int, DialogBoxIndirectParam, TEXT
  1210. P_HINSTANCE hInstance
  1211. P_GHANDLE hDlgTemplate
  1212. P_HWND0 hwndOwner
  1213. P_LPFNDP0 lpfnDlgProc
  1214. P_LONG lParam
  1215. ; in DLGEND.C
  1216. API void, EndDialog, TEXT
  1217. P_HWND hwndDlg
  1218. P_int result
  1219. ; in DLGMGR.C
  1220. API HWND, GetDlgItem, TEXT
  1221. P_HWND hwndDlg
  1222. P_int idItem
  1223. ; in DLGMGR.C
  1224. API void, SetDlgItemInt, TEXT ; calls SetDlgItemText
  1225. P_HWND hwndDlg
  1226. P_int idItem
  1227. P_WORD value
  1228. P_BOOL fSigned
  1229. ; in DLGMGR.C
  1230. API WORD, GetDlgItemInt, TEXT
  1231. P_HWND hwndDlg
  1232. P_int idItem
  1233. P_LPBOOL0 lpfValOk
  1234. P_BOOL fSigned
  1235. ; in DLGMGR.C
  1236. API void, SetDlgItemText, TEXT
  1237. P_HWND hwndDlg
  1238. P_int idItem
  1239. P_CLPSTR0 lpszText
  1240. ifdef DEBUG
  1241. ; in DLGMGR.C
  1242. API int, GetDlgItemText, TEXT
  1243. P_HWND hwndDlg
  1244. P_int idItem
  1245. P_LPBUFFER lpszText, cchText
  1246. APIERR
  1247. E_SETEMPTY lpszText, cchText
  1248. APIEND
  1249. else
  1250. ; in DLGMGR.C
  1251. API int, GetDlgItemText, TEXT
  1252. P_HWND hwndDlg
  1253. P_int idItem
  1254. P_DWORD lpszText
  1255. P_WORD cchText
  1256. endif
  1257. ; in DLGMGR.C
  1258. API void, CheckDlgButton, TEXT
  1259. P_HWND hwndDlg
  1260. P_int idItem
  1261. P_WORD checkState
  1262. ; in DLGMGR.C
  1263. API void, CheckRadioButton, TEXT ; calls CheckDlgButton
  1264. P_HWND hwndDlg
  1265. P_int idFirst
  1266. P_int idLast
  1267. P_int idCheck
  1268. ; in DLGMGR.C
  1269. API WORD, IsDlgButtonChecked, TEXT
  1270. P_HWND hwndDlg
  1271. P_int idItem
  1272. ; in DLGMGR.C
  1273. API LONG, SendDlgItemMessage, TEXT
  1274. P_HWND hwndDlg
  1275. P_int idItem
  1276. P_WORD <msg>
  1277. P_WORD wParam
  1278. P_LONG lParam
  1279. ; in DMGROUP.C
  1280. API HWND, GetNextDlgGroupItem, TEXT
  1281. P_HWND hwndDlg
  1282. P_HWND0 hwndCurrent
  1283. P_BOOL fPrev
  1284. ; in DMGROUP.C
  1285. API HWND, GetNextDlgTabItem, TEXT
  1286. P_HWND hwndDlg
  1287. P_HWND0 hwndCurrent
  1288. P_BOOL fPrev
  1289. ; in DLGMGR.C
  1290. API int, GetDlgCtrlID, TEXT
  1291. P_HWND hwndCtl
  1292. ; in DLGBEGIN.C
  1293. API long, GetDialogBaseUnits, TEXT, <VOID> ;??? SHOULD BE DWORD
  1294. ; in DLGMGR.C
  1295. API LONG, DefDlgProc, TEXT
  1296. P_MSGPARMS hwndDlg,<msg>,wParam,lParam
  1297. ;P_HWND hwndDlg
  1298. ;P_WORD <msg> ;??? should be unsigned
  1299. ;P_WORD wParam
  1300. ;P_LONG lParam
  1301. ; in WINHOOK.ASM
  1302. API BOOL, CallMsgFilter, TEXT, <ASM>
  1303. P_LPMSG lpmsg
  1304. P_WORD code
  1305. ; in CLIPBRD.C
  1306. API BOOL, OpenClipboard, TEXT
  1307. P_HWND0 hwnd
  1308. ; in CLIPBRD.C
  1309. API BOOL, CloseClipboard, TEXT, <VOID>
  1310. ; in CLIPBRD.C
  1311. API HWND, GetOpenClipboardWindow, TEXT, <VOID>
  1312. ; in CBVIEWER.C
  1313. API HWND, GetClipboardOwner, TEXT, <VOID>
  1314. ; in CBVIEWER.C
  1315. API HWND, SetClipboardViewer, TEXT
  1316. P_HWND0 hwndViewer
  1317. ; in CBVIEWER.C
  1318. API HWND, GetClipboardViewer, TEXT, <VOID>
  1319. ; in CBVIEWER.C
  1320. API BOOL, ChangeClipboardChain, TEXT
  1321. P_HWND hwndRemove
  1322. P_HWND0 hwndNewNext
  1323. ; in CBMGR.C
  1324. API HANDLE, SetClipboardData, TEXT, <NOGEN>
  1325. P_WORD fmt
  1326. P_HCLIPDATA0 data
  1327. ; in CBMGR.C
  1328. API HCLIPDATA, GetClipboardData, TEXT, <NOGEN>
  1329. P_WORD fmt
  1330. ; in WINLOOP3.ASM
  1331. API WORD, RegisterClipboardFormat, TEXT, <ASM> ; calls AddAtom
  1332. P_CLPSTRATOM lpszName
  1333. ; in CBFORMAT.C
  1334. API int, CountClipboardFormats, TEXT, <VOID>
  1335. ; in CLIPBRD.C
  1336. API WORD, EnumClipboardFormats, TEXT, <NOGEN>
  1337. P_WORD fmtCurrent
  1338. ; in CBFORMAT.C
  1339. API int, GetClipboardFormatName, TEXT
  1340. P_WORD fmt
  1341. P_LPBUFFER lpszName, cchName
  1342. APIERR
  1343. E_SETEMPTY lpszName, cchName
  1344. APIEND
  1345. ; in CBMGR.C
  1346. API BOOL, EmptyClipboard, TEXT, <VOID>
  1347. ; in CBFORMAT.C
  1348. API BOOL, IsClipboardFormatAvailable, TEXT, <NOGEN>
  1349. P_WORD fmt
  1350. ; in CBFORMAT.C
  1351. API int, GetPriorityClipboardFormat, TEXT ;??? Should be WORD return
  1352. P_LPWBUFFER lpFmtList, cFmt
  1353. ; in WINLOOP2.C
  1354. API HWND, SetFocus, TEXT
  1355. P_HWND0 hwndNewFocus
  1356. ; in WINLOOP3.ASM
  1357. API HWND, GetFocus, TEXT, <VOID, ASM, FUNNYFRAME>
  1358. ; in WINLOOP3.ASM
  1359. API HWND, GetActiveWindow, TEXT, <VOID, ASM, FUNNYFRAME>
  1360. ; in WINEVENT.ASM
  1361. API int, GetKeyState, TEXT, <NOGEN, ASM, FUNNYFRAME>
  1362. P_int vkey ;??? SHOULD BE WORD
  1363. ; in WINEVENT.ASM
  1364. API int, GetAsyncKeyState, TEXT, <NOGEN, ASM, FUNNYFRAME>
  1365. P_int vkey ;??? SHOULD BE WORD
  1366. ; in WINEVENT.ASM
  1367. API void, GetKeyboardState, TEXT, <ASM, FUNNYFRAME>
  1368. P_LPKBDSTATE pKbdState
  1369. ; in WINEVENT.ASM
  1370. API void, SetKeyboardState, TEXT, <ASM, FUNNYFRAME>
  1371. P_CLPKBDSTATE pKbdState
  1372. ; in WINEVENT.ASM
  1373. API BOOL, EnableHardwareInput, TEXT, <ASM, FUNNYFRAME, NOGEN> ; <NODATA, ATOMIC>
  1374. P_BOOL fEnable
  1375. ; in WINEVENT.ASM
  1376. API BOOL, GetInputState, TEXT, <ASM, VOID, FUNNYFRAME>
  1377. ; in WINEVENT.ASM
  1378. API FARPROC, SetEventHook, TEXT, <ASM, FUNNYFRAME>
  1379. P_LPFNEVENTPROC0 lpfnEventHookProc
  1380. ; in WINLOOP3.ASM
  1381. API HWND, GetCapture, TEXT, <ASM, VOID, FUNNYFRAME>
  1382. ; in WINLOOP.C
  1383. API HWND, SetCapture, TEXT, <ASM> ; <WIN>
  1384. P_HWND0 hwndCapture
  1385. ; in WINLOOP.C
  1386. API void, ReleaseCapture, TEXT, <ASM, VOID> ; <WIN>
  1387. ; in WINEVENT.ASM
  1388. API DWORD, GetQueueStatus, TEXT, <ASM, FUNNYFRAME>
  1389. P_FLAGS flags, QS_VALID
  1390. ifdef DISABLE
  1391. ; in WINLOOP.C
  1392. API WORD, GetSysInputMode, TEXT, <VOID>
  1393. ; in WINEVENT.ASM
  1394. API BOOL, SetHotKeyHook, TEXT, <ASM> ; <PASCAL>
  1395. P_HOTKEYPROC lpfnHookProc
  1396. P_HINSTANCE hInstance
  1397. P_BOOL fHook
  1398. ; in WINEVENT.ASM
  1399. API BOOL, PostHotKeyEvent, TEXT, <ASM, FUNNYFRAME>
  1400. P_HTASK hTask
  1401. endif
  1402. ; in WINTIMER.ASM
  1403. API WORD, SetTimer, TEXT, <ASM, FUNNYFRAME>
  1404. P_HWND0 hwnd
  1405. P_int id ;??? SHOULD BE WORD?
  1406. P_WORD rate
  1407. P_LPFNTIMER0 lpfnTimer
  1408. ; in WINTIMER.ASM
  1409. API BOOL, KillTimer, TEXT, <ASM, FUNNYFRAME>
  1410. P_HWND0 hwnd
  1411. P_int id
  1412. ; in WMACT.C
  1413. API BOOL, EnableWindow, TEXT
  1414. P_HWND hwnd
  1415. P_BOOL fEnable
  1416. ; in WINMISC1.ASM
  1417. API BOOL, IsWindowEnabled, TEXT, <ASM, FUNNYFRAME, DEBUGONLY>
  1418. P_HWND hwnd
  1419. ; in RMLOAD.ASM
  1420. API HACCEL, LoadAccelerators, TEXT
  1421. P_HINSTANCE hInstance
  1422. P_CLPSTRRSRC lpszTemplateName
  1423. ; in MNACCEL.C
  1424. API int, TranslateAccelerator, TEXT
  1425. P_HWND hwnd
  1426. P_HACCEL haccel
  1427. P_CLPMSG lpmsg
  1428. ; in WINMISC2.ASM
  1429. API int, GetSystemMetrics, TEXT, <ASM, FUNNYFRAME>
  1430. P_VALUE metric,SM_MAX
  1431. ; in MNCREATE.C
  1432. API HMENU, LoadMenu, TEXT
  1433. P_HINSTANCE hInstance
  1434. P_CLPSTRRSRC lpszTemplateName
  1435. ; in MNCREATE.C
  1436. API HMENU, LoadMenuIndirect, TEXT
  1437. P_CLPMT lpMenuTemplate
  1438. ; in WINMISC2.ASM
  1439. API HMENU, GetMenu, TEXT, <ASM>
  1440. P_HWND hwnd
  1441. ; in MNAPI.C
  1442. API BOOL, SetMenu, TEXT
  1443. P_HWND hwnd
  1444. P_HMENU0 hMenu
  1445. ; in MNCHANGE.C
  1446. API BOOL, ChangeMenu, TEXT
  1447. P_HMENU hMenu
  1448. P_WORD cmdInsert
  1449. P_CLPMENUSTR lpNewItem
  1450. P_WORD id
  1451. P_FLAGS flags,MF_CHANGE_VALID
  1452. ; in MNACCEL.C
  1453. API BOOL, HiliteMenuItem, TEXT
  1454. P_HWND hwnd
  1455. P_HMENU hMenu
  1456. P_WORD id
  1457. P_FLAGS flags,MF_VALID
  1458. ; in MNAPI.C
  1459. API int, GetMenuString, TEXT
  1460. P_HMENU hMenu
  1461. P_WORD id
  1462. P_LPBUFFER lpszString, cchString
  1463. P_FLAGS flags,MF_VALID
  1464. APIERR
  1465. E_SETEMPTY lpszString, cchString
  1466. APIEND
  1467. ; in MNAPI2.ASM
  1468. API WORD, GetMenuState, TEXT, <ASM> ; <WIN>
  1469. P_HMENU hMenu
  1470. P_WORD id
  1471. P_FLAGS flags,MF_VALID
  1472. APIERR
  1473. mov ax,-1
  1474. APIEND
  1475. ; in MNDRAW.ASM
  1476. API void, DrawMenuBar, TEXT
  1477. P_HWND hwnd
  1478. ; in MNSYS.C
  1479. API HMENU, GetSystemMenu, TEXT
  1480. P_HWND hwnd
  1481. P_BOOL fRevert
  1482. ; in MNAPI.C
  1483. API BOOL, SetSystemMenu, TEXT
  1484. P_HWND hwnd
  1485. P_HMENU hMenu
  1486. ; in MNCREATE.C
  1487. API HMENU, CreateMenu, TEXT, <VOID>
  1488. ; in MNCREATE.C
  1489. API HMENU, CreatePopupMenu, TEXT, <VOID>
  1490. ; in MNDSTRY.ASM
  1491. API BOOL, DestroyMenu, TEXT, <ASM> ; <WIN>
  1492. P_HMENU hMenu ; Old 3.1 code had HMENU0 here: is this true for 3.0?
  1493. ; in MNAPI2.ASM
  1494. API BOOL, CheckMenuItem, TEXT, <ASM, FUNNYFRAME>
  1495. P_HMENU hMenu
  1496. P_WORD id
  1497. P_FLAGS flags,MF_VALID
  1498. APIERR
  1499. mov ax, -1 ;return -1 (item doesn't exist) instead of 0
  1500. APIEND ;since 0 is a valid return (MF_UNCHECKED)
  1501. ; in MNAPI2.ASM
  1502. API BOOL, EnableMenuItem, TEXT, <ASM, FUNNYFRAME>
  1503. P_HMENU hMenu
  1504. P_WORD id
  1505. P_FLAGS flags,MF_VALID
  1506. APIERR
  1507. mov ax, -1 ;return -1 (item doesn't exist) instead of 0
  1508. APIEND ;since 0 is a valid return (MF_ENABLED)
  1509. ; in MNAPI2.ASM
  1510. API HMENU, GetSubMenu, TEXT, <ASM> ; <WIN>
  1511. P_HMENU hMenu
  1512. P_int index
  1513. ; in MNDSTRY.ASM
  1514. API WORD, GetMenuItemID, TEXT, <ASM> ; <WIN>
  1515. P_HMENU hMenu
  1516. P_int index
  1517. APIERR
  1518. mov ax,-1
  1519. APIEND
  1520. ; in MNAPI.C
  1521. API WORD, GetMenuItemCount, TEXT
  1522. P_HMENU hMenu
  1523. APIERR
  1524. mov ax,-1
  1525. APIEND
  1526. ; in MNCHANGE.C
  1527. API BOOL, InsertMenu, TEXT
  1528. P_HMENU hMenu
  1529. P_WORD id
  1530. P_FLAGS flags,MF_VALID
  1531. P_WORD idNew
  1532. P_CLPMENUSTR lpszNew ; may be bitmap handle or arbitrary long
  1533. ; in MNCHANGE.C
  1534. API BOOL, AppendMenu, TEXT
  1535. P_HMENU hMenu
  1536. P_FLAGS flags,MF_VALID
  1537. P_WORD id
  1538. P_CLPMENUSTR lpsz ; may be bitmap handle or arbitrary long
  1539. ; in MNCHANGE.C
  1540. API BOOL, ModifyMenu, TEXT
  1541. P_HMENU hMenu
  1542. P_WORD id
  1543. P_FLAGS flags,MF_VALID
  1544. P_WORD id
  1545. P_CLPMENUSTR lpsz
  1546. ; in MNCHANGE.C
  1547. API BOOL, RemoveMenu, TEXT
  1548. P_HMENU hMenu
  1549. P_WORD id
  1550. P_FLAGS flags,MF_VALID
  1551. ; in MNCHANGE.C
  1552. API BOOL, DeleteMenu, TEXT
  1553. P_HMENU hMenu
  1554. P_WORD id
  1555. P_FLAGS flags,MF_VALID
  1556. ; in MNCHANGE.C
  1557. API BOOL, SetMenuItemBitmaps, TEXT
  1558. P_HMENU hMenu
  1559. P_WORD id
  1560. P_FLAGS flags,MF_VALID
  1561. P_HBITMAP0 hbmCheckOff
  1562. P_HBITMAP0 hbmCheckOn
  1563. ; in MNCHANGE.C
  1564. API LONG, GetMenuCheckMarkDimensions, TEXT, <VOID> ; should return DWORD
  1565. ; in MNPOPUP.C
  1566. API BOOL, TrackPopupMenu, TEXT
  1567. P_HMENU hMenu
  1568. P_FLAGS flags,TPM_VALID
  1569. P_int x
  1570. P_int y
  1571. P_int cx
  1572. P_HWND hwndOwner
  1573. P_CLPRECT0 lprcClickSlop
  1574. ; in MNGRAY.C
  1575. API BOOL, GrayString, TEXT
  1576. P_HDC hdc ;??? not validated
  1577. P_HBRUSH0 hbr
  1578. P_LPFN0 lpfnPrint
  1579. P_DWORD lpData
  1580. P_int nCount
  1581. P_int x
  1582. P_int y
  1583. P_int cx
  1584. P_int cy
  1585. ; in WINLOOP4.ASM
  1586. API HWND, SetActiveWindow, TEXT, <ASM>
  1587. P_HWND0 hwndActive
  1588. ; in WMUPDATE.C
  1589. API void, UpdateWindow, TEXT
  1590. P_HWND hwnd
  1591. ; in PAINT.ASM
  1592. API HDC, BeginPaint, TEXT, <ASM, FUNNYFRAME>
  1593. P_HWND hwnd
  1594. P_LPPAINTSTRUCT lpps
  1595. ; in WMPAINT.C
  1596. API void, EndPaint, TEXT
  1597. P_HWND hwnd
  1598. P_CLPPAINTSTRUCT lpps
  1599. ; in WMUPDATE.C
  1600. API BOOL, GetUpdateRect, TEXT
  1601. P_HWND hwnd
  1602. P_LPRECT0 lprcUpdate
  1603. P_BOOL fErase
  1604. ; in WMUPDATE.C
  1605. API int, GetUpdateRgn, TEXT
  1606. P_HWND hwnd
  1607. P_HRGN hrgnUpdate
  1608. P_BOOL fErase
  1609. ; in WMUPDATE.C
  1610. API int, ExcludeUpdateRgn, TEXT
  1611. P_HDC hdc
  1612. P_HWND hwnd
  1613. ; in PAINT.ASM
  1614. API void, InvalidateRect, TEXT, <ASM, FUNNYFRAME> ; Calls RedrawWindow
  1615. P_HWND0 hwnd
  1616. P_CLPRECT0 lprcInvalid
  1617. P_BOOL fErase
  1618. ; in PAINT.ASM
  1619. API void, ValidateRect, TEXT, <ASM, FUNNYFRAME> ; Calls RedrawWindow
  1620. P_HWND hwnd
  1621. P_CLPRECT0 lprcValid
  1622. ; in PAINT.ASM
  1623. API void, InvalidateRgn, TEXT, <ASM, FUNNYFRAME>
  1624. P_HWND hwnd
  1625. P_HRGN0 hrgnInvalid
  1626. P_BOOL fErase
  1627. ; in PAINT.ASM
  1628. API void, ValidateRgn, TEXT, <ASM, FUNNYFRAME>
  1629. P_HWND hwnd
  1630. P_HRGN0 hrgnValid
  1631. ; in WMUPDATE.C
  1632. API BOOL, RedrawWindow, TEXT
  1633. P_HWND0 hwnd
  1634. P_CLPRECT0 lprcRedraw
  1635. P_HRGN0 hrgnRedraw
  1636. P_FLAGS flags,RDW_VALID
  1637. ; in WINSPB2.C
  1638. API BOOL, LockWindowUpdate, TEXT
  1639. P_HWND0 hwnd
  1640. ; in WMSCROLL.C
  1641. API void, ScrollWindow, TEXT ; Calls ScrollWindowEx
  1642. P_HWND hwnd
  1643. P_int dx
  1644. P_int dy
  1645. P_CLPRECT0 lprcScroll
  1646. P_CLPRECT0 lprcClip
  1647. ; in WMSCROLL.C
  1648. API BOOL, ScrollDC, TEXT
  1649. P_HDC hdc
  1650. P_int dx
  1651. P_int dy
  1652. P_CLPRECT0 lprcScroll
  1653. P_CLPRECT0 lprcClip
  1654. P_HRGN0 hrgnUpdate
  1655. P_LPRECT0 lprcUpdate
  1656. ; in WMSCROLL.C
  1657. API int, ScrollWindowEx, TEXT
  1658. P_HWND hwnd
  1659. P_int dx
  1660. P_int dy
  1661. P_CLPRECT0 lprcScroll
  1662. P_CLPRECT0 lprcClip
  1663. P_HRGN0 hrgnUpdate
  1664. P_LPRECT0 lprcUpdate
  1665. P_FLAGS flags,SW_VALID
  1666. ; in WINSBCTL.C
  1667. API int, SetScrollPos, TEXT
  1668. P_HWND hwnd
  1669. P_VALUE code,SB_MAX
  1670. P_int pos
  1671. P_BOOL fRedraw
  1672. ; in SBRARE.C
  1673. API int, GetScrollPos, TEXT
  1674. P_HWND hwnd
  1675. P_VALUE code,SB_MAX
  1676. ; in WINSBCTL.C
  1677. API void, SetScrollRange, TEXT
  1678. P_HWND hwnd
  1679. P_VALUE code,SB_MAX
  1680. P_int posMin
  1681. P_int posMax
  1682. P_BOOL fRedraw
  1683. ; in WINSB.C
  1684. API void, GetScrollRange, TEXT
  1685. P_HWND hwnd
  1686. P_VALUE code,SB_MAX
  1687. P_LPINT lpMin
  1688. P_LPINT lpMax
  1689. ; in SBRARE.C
  1690. API void, ShowScrollBar, TEXT
  1691. P_HWND hwnd ;??? not validated
  1692. P_VALUE code,SB_MAX ;??? Should be int in windows.h
  1693. P_BOOL fRedraw
  1694. ; in WINSBCTL.C
  1695. API BOOL, EnableScrollBar, TEXT
  1696. P_HWND hwnd
  1697. P_VALUE code,SB_MAX
  1698. P_FLAGS flags,ESB_MAX
  1699. ; in WINPROPS.C
  1700. API BOOL, SetProp, TEXT
  1701. P_HWND hwnd
  1702. P_CLPSTRATOM lpszName
  1703. P_HANDLE0 hData
  1704. ; in WINMISC2.ASM
  1705. API HANDLE, GetProp, TEXT, <ASM>
  1706. P_HWND hwnd
  1707. P_CLPSTRATOM lpszName
  1708. ; in WINPROPS.C
  1709. API HANDLE, RemoveProp, TEXT
  1710. P_HWND hwnd
  1711. P_CLPSTRATOM lpszName
  1712. ; in WINPROPS.C
  1713. API int, EnumProps, TEXT
  1714. P_HWND hwnd
  1715. P_LPFNPENUM lpfnPropEnum
  1716. ; in WINMISC1.ASM
  1717. API void, SetWindowText, TEXT, <ASM> ; <SMALL>
  1718. P_HWND hwnd
  1719. P_CLPSTR0 lpszText
  1720. ifdef DEBUG
  1721. ; in WINMISC1.ASM
  1722. API int, GetWindowText, TEXT, <ASM> ; <SMALL>
  1723. P_HWND hwnd
  1724. P_LPBUFFER lpszText, cchText
  1725. APIERR
  1726. E_SETEMPTY lpszText, cchText
  1727. APIEND
  1728. else
  1729. ; in WINMISC1.ASM
  1730. API int, GetWindowText, TEXT, <ASM> ; <SMALL>
  1731. P_HWND hwnd
  1732. P_DWORD lpszText
  1733. P_WORD cchText
  1734. APIERR
  1735. E_SETEMPTY lpszText, cchText
  1736. APIEND
  1737. endif
  1738. ; in WINMISC1.ASM
  1739. API int, GetWindowTextLength, TEXT, <ASM> ; <SMALL>
  1740. P_HWND hwnd
  1741. ; in WINMISC1.ASM
  1742. API void, GetClientRect, TEXT, <ASM, FUNNYFRAME>
  1743. P_HWND hwnd
  1744. P_LPRECT lprcClient
  1745. ; in WINMISC1.ASM
  1746. API void, GetWindowRect, TEXT, <ASM, FUNNYFRAME>
  1747. P_HWND hwnd
  1748. P_LPRECT lprcWindow
  1749. ; in MSUTIL.C
  1750. API void, AdjustWindowRect, TEXT ; calls AdjustWindowRectEx
  1751. P_LPRECT lprcAdjust
  1752. P_LONG style
  1753. P_BOOL fMenu
  1754. ; in MSUTIL.C
  1755. API void, AdjustWindowRectEx, TEXT
  1756. P_LPRECT lprcAdjust ;??? not validated
  1757. P_LONG style
  1758. P_BOOL fMenu
  1759. P_DWORD exStyle
  1760. ; in WMSYSERR.C
  1761. API int, MessageBox, TEXT
  1762. P_HWND0 hwndOwner
  1763. P_CLPSTR0 lpszText
  1764. P_CLPSTR0 lpszCaption
  1765. P_FLAGS flags,MB_VALID
  1766. ; in WINMISC2.ASM
  1767. API void, MessageBeep, TEXT, <NOGEN, ASM>
  1768. P_WORD flags
  1769. ; in WMCURSOR.C
  1770. API int, ShowCursor, TEXT, <NOGEN>
  1771. P_BOOL fShow
  1772. ; in WINLOOP3.ASM
  1773. API void, SetCursorPos, TEXT, <NOGEN, ASM, FUNNYFRAME>
  1774. P_int x
  1775. P_int y
  1776. ; in WMCURSOR.C
  1777. API HCURSOR, GetCursor, TEXT, <VOID>
  1778. ; in WMCURSOR.C
  1779. API HCURSOR, SetCursor, TEXT
  1780. P_HCURSOR0 hcsr
  1781. ; in WINLOOP3.ASM
  1782. API void, GetCursorPos, TEXT, <ASM, FUNNYFRAME>
  1783. P_LPPOINT lppt
  1784. ; in WINMOUSE.ASM
  1785. API void, ClipCursor, TEXT, <ASM>
  1786. P_CLPRECT0 lprcClip
  1787. ; in WINMOUSE.ASM
  1788. API void, GetClipCursor, TEXT, <ASM>
  1789. P_LPRECT lprcClip
  1790. ; in WMCARET.C
  1791. API void, CreateCaret, TEXT
  1792. P_HWND hwnd
  1793. P_HBITMAP01 hbmCaret ; can be 0 or 1 (1 for dithered caret)
  1794. P_int x
  1795. P_int y
  1796. ; in WMCARET.C
  1797. API WORD, GetCaretBlinkTime, TEXT, <VOID>
  1798. ; in INCTLPAN.C
  1799. API void, SetCaretBlinkTime, TEXT, <NOGEN>
  1800. P_WORD rate
  1801. ; in WMCARET.C
  1802. API void, DestroyCaret, TEXT, <VOID>
  1803. ; in WMCARET.C
  1804. API void, HideCaret, TEXT
  1805. P_HWND0 hwnd ;??? Why is NULL allowed?
  1806. ; in WMCARET.C
  1807. API void, ShowCaret, TEXT
  1808. P_HWND0 hwnd ;??? Why is NULL allowed?
  1809. ; in WMCARET.C
  1810. API void, SetCaretPos, TEXT, <NOGEN>
  1811. P_int x
  1812. P_int y
  1813. ; in WMCARET.C
  1814. API void, GetCaretPos, TEXT, <NOGEN>
  1815. P_LPPOINT lppt
  1816. ; in WINMISC1.ASM
  1817. API void, ClientToScreen, TEXT, <ASM>
  1818. P_HWND0 hwnd
  1819. P_LPPOINT lppt
  1820. ; in WINMISC1.ASM
  1821. API void, ScreenToClient, TEXT, <ASM>
  1822. P_HWND0 hwnd
  1823. P_LPPOINT lppt
  1824. ; in WINMISC1.C
  1825. API void, MapWindowPoints, TEXT, <ASM>
  1826. P_HWND0 hwndFrom
  1827. P_HWND0 hwndTo
  1828. P_LPPOINT lppt
  1829. P_WORD cpt
  1830. ; in WINWHERE.C
  1831. API HWND, WindowFromPoint, TEXT, <NOGEN>
  1832. P_POINT pt
  1833. ; in WINWHERE.C
  1834. API HWND, ChildWindowFromPoint, TEXT
  1835. P_HWND hwnd
  1836. P_POINT pt
  1837. ; in WINLOOP3.ASM
  1838. API DWORD, GetSysColor, TEXT, <ASM, FUNNYFRAME>
  1839. P_VALUE idColor,COLOR_MAX
  1840. ; in WMCOLOR.C
  1841. API void, SetSysColors, TEXT
  1842. P_CLPSYSCLRBUF count, lpIds, lpColors
  1843. ; in WINRECT.ASM
  1844. API void, DrawFocusRect, TEXT, <ASM, FUNNYFRAME> ; <NODATA>
  1845. P_HDC hdc
  1846. P_CLPRECT lprc
  1847. ; in WINRECT.ASM
  1848. API int, FillRect, TEXT, <ASM, FUNNYFRAME> ; <NODATA>
  1849. P_HDC hdc
  1850. P_CLPRECT lprc
  1851. P_HBRUSH hbr
  1852. ; in WINRECT.ASM
  1853. API int, FrameRect, TEXT, <ASM, FUNNYFRAME> ; <NODATA>
  1854. P_HDC hdc
  1855. P_CLPRECT lprc
  1856. P_HBRUSH hbr
  1857. ; in WINRECT.ASM
  1858. API void, InvertRect, TEXT, <ASM, FUNNYFRAME> ; <NODATA>
  1859. P_HDC hdc
  1860. P_CLPRECT lprc
  1861. ; in WINRECT.ASM
  1862. API void, SetRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ; <NODATA>
  1863. P_LPRECT lprc
  1864. P_int left
  1865. P_int top
  1866. P_int right
  1867. P_int bottom
  1868. ; in WINRECT.ASM
  1869. API void, SetRectEmpty, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ; <NODATA>
  1870. P_LPRECT lprc
  1871. ; in WINRECT.ASM
  1872. API void, CopyRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>
  1873. P_CLPRECT lprcSrc
  1874. P_LPRECT lprcDst
  1875. ; in WINRECT.ASM
  1876. API void, InflateRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>
  1877. P_LPRECT lprc
  1878. P_int dx
  1879. P_int dy
  1880. ; in WINRECT.ASM
  1881. API BOOL IntersectRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>
  1882. P_LPRECT lprcDst
  1883. P_CLPRECT lprc1
  1884. P_CLPRECT lprc2
  1885. ; in WINRECT.ASM
  1886. API BOOL UnionRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>
  1887. P_LPRECT lprcDst
  1888. P_CLPRECT lprc1
  1889. P_CLPRECT lprc2
  1890. ; in WINRECT.ASM
  1891. API int, SubtractRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>, ??? Add to windows.h
  1892. P_LPRECT lprcDst
  1893. P_CLPRECT lprc1
  1894. P_CLPRECT lprc2
  1895. ; in WINRECT.ASM
  1896. API void, OffsetRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>
  1897. P_LPRECT lprcDst
  1898. P_int lprc1
  1899. P_int lprc2
  1900. ; in WINRECT.ASM
  1901. API BOOL, IsRectEmpty, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ;<NODATA>
  1902. P_CLPRECT lprc
  1903. ; in WINRECT.ASM
  1904. API BOOL, EqualRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ; <NODATA>
  1905. P_CLPRECT lprc1
  1906. P_CLPRECT lprc2
  1907. ; in WINRECT.ASM
  1908. API BOOL, PtInRect, TEXT, <ASM, FUNNYFRAME, DEBUGONLY> ; <NODATA>
  1909. P_CLPRECT lprc
  1910. P_POINT pt
  1911. _GenLP <P_CLPANSISTR>,<CLP>,1 ; AnsiNext/Prev string ptr
  1912. P_CLPSTRCHAR macro name, opts
  1913. _GenParm <name>,4,<opts>
  1914. if VLgen
  1915. mov ax,_P_&name ; if it's NULL or char, accept.
  1916. mov cx,_P_&name+2
  1917. jcxz @F
  1918. mov bx,1 ; otherwise make sure there is at least
  1919. lcall CLP ; one byte available.
  1920. _gensub LP
  1921. @@:
  1922. endif
  1923. endm
  1924. ; in winstr.asm
  1925. API LPSTR, AnsiUpper, TEXT, <ASM,FUNNYFRAME>
  1926. P_CLPSTRCHAR lpString
  1927. ; in winstr.asm
  1928. API LPSTR, AnsiLower, TEXT, <ASM,FUNNYFRAME>
  1929. P_CLPSTRCHAR lpString
  1930. ; in winlang.asm
  1931. API LPSTR, AnsiUpperBuff, TEXT, <ASM,FUNNYFRAME>
  1932. P_LPBUFFER lpch, cch
  1933. ; in winlang.asm
  1934. API LPSTR, AnsiLowerBuff, TEXT, <ASM,FUNNYFRAME>
  1935. P_LPBUFFER lpch, cch
  1936. ; in winlang.asm
  1937. API LPSTR, AnsiNext, TEXT, <ASM,FUNNYFRAME>
  1938. P_CLPANSISTR lpString
  1939. ; in winlang.asm
  1940. API LPSTR, AnsiPrev, TEXT, <ASM,FUNNYFRAME>
  1941. P_CLPANSISTR lpString
  1942. P_CLPANSISTR lpCurrentChar
  1943. ; in WINTIMER.ASM
  1944. API DWORD, GetCurrentTime, TEXT, <VOID, ASM, FUNNYFRAME>
  1945. ; in WINTIMER.ASM
  1946. API DWORD, GetTickCount, TEXT, <VOID, ASM, FUNNYFRAME>
  1947. ; in WINTIMER.ASM
  1948. API DWORD, GetTimerResolution, TEXT, <VOID, ASM, FUNNYFRAME>
  1949. ifndef WOW
  1950. ; blow this off, it doesn't do anything but waste 6 instructions
  1951. ; in WINSTRUC.ASM
  1952. API WORD, GetWindowWord, TEXT, <ASM, FUNNYFRAME>
  1953. P_HWND hwnd
  1954. P_GWWINDEX index
  1955. endif
  1956. GWW_HWNDPARENT equ -8
  1957. P_SWWPARMS macro index,value
  1958. _GenParm <index>,2,<opts>
  1959. _GenParm <value>,2,<opts>
  1960. if VLgen
  1961. IFNDEF WOW
  1962. cmp word ptr _P_&index,GWW_HWNDPARENT
  1963. jnz @F
  1964. mov bx,_P_&value ; validate the supplied parent.
  1965. lcall VHWND0
  1966. _gensub VHWND
  1967. @@:
  1968. ENDIF
  1969. endif
  1970. endm
  1971. ; in WINSTRUC.ASM
  1972. API WORD, SetWindowWord, TEXT, <ASM, FUNNYFRAME>
  1973. P_HWND hwnd
  1974. P_SWWPARMS index,value
  1975. ifndef WOW
  1976. ; blow this off, it doesn't do anything but waste 6 instructions
  1977. ; in WINSTRUC.ASM
  1978. API LONG, GetWindowLong, TEXT, <ASM, FUNNYFRAME>
  1979. P_HWND hwnd
  1980. P_GWWINDEX index
  1981. endif
  1982. GWL_WNDPROC equ -4
  1983. GWL_EXSTYLE equ -20
  1984. P_SWLPARMS macro index,value,opts
  1985. local notwndproc,notexstyle,cont
  1986. _DefParm <index>,2,<opts>
  1987. _DefParm <value>,4,<opts>
  1988. if VLgen
  1989. _FlsFrame
  1990. mov ax,word ptr _P_&index
  1991. cmp ax,GWL_WNDPROC ; is he subclassing?
  1992. jnz notwndproc
  1993. mov ax,_P_&value
  1994. mov cx,_P_&value+2
  1995. lcall LPFN
  1996. _gensub LPFN
  1997. if 0 ; Not always a bug,
  1998. ; and too many people get an error.
  1999. ; Could compare DS with hwnd->hInstance
  2000. ; if different: then check.
  2001. ifdef DEBUG
  2002. mov es,cx
  2003. mov bx,ax
  2004. cmp es:[bx],09090h ; nop, nop, nop?
  2005. jnz @F ; that's bogus...
  2006. mov bx,ERR_BAD_PTR or ERR_WARNING
  2007. lcall Inval_Param_
  2008. endif
  2009. endif
  2010. jmp short cont;
  2011. notwndproc:
  2012. cmp word ptr _P_&index,GWL_EXSTYLE
  2013. jnz notexstyle
  2014. IFDEF WOW ; ChandanC
  2015. jmp SHORT notexstyle
  2016. ENDIF
  2017. mov ax,_p_&value
  2018. mov cx,_p_&value+2
  2019. test ax,not WS_EX_VALID_L
  2020. jnz @F
  2021. test cx,not WS_EX_VALID_H
  2022. jnz @F
  2023. jmp notexstyle
  2024. @@:
  2025. mov bx,ERR_BAD_DFLAGS or ERR_WARNING
  2026. lcall Inval_Param_
  2027. notexstyle:
  2028. cont:
  2029. endif
  2030. endm
  2031. ; in WINSTRUC.ASM
  2032. API LONG, SetWindowLong, TEXT, <ASM, FUNNYFRAME>
  2033. P_HWND hwnd
  2034. P_SWLPARMS index, value
  2035. ; in WINSTRUC.ASM
  2036. API WORD, GetClassWord, TEXT, <ASM, FUNNYFRAME>
  2037. P_HWND hwnd
  2038. P_GCWINDEX index
  2039. ; in WINSTRUC.ASM
  2040. API WORD, SetClassWord, TEXT, <ASM, FUNNYFRAME>
  2041. P_HWND hwnd
  2042. P_GCWINDEX index
  2043. P_WORD value
  2044. ; in WINSTRUC.ASM
  2045. API LONG, GetClassLong, TEXT, <ASM, FUNNYFRAME>
  2046. P_HWND hwnd
  2047. P_GCWINDEX index
  2048. ; in WINSTRUC.ASM
  2049. API LONG, SetClassLong, TEXT, <ASM, FUNNYFRAME>
  2050. P_HWND hwnd
  2051. P_GCWINDEX index
  2052. P_LONG value
  2053. ; in WINMISC1.ASM
  2054. API HWND, GetDesktopHwnd, TEXT, <VOID, ASM>
  2055. ; in WINMISC1.ASM
  2056. API HWND, GetDesktopWindow, TEXT, <VOID, ASM>
  2057. ; in WINSHOW.C
  2058. API HWND, GetParent, TEXT
  2059. P_HWND hwnd
  2060. ; in WMMISC.C
  2061. API HWND, SetParent, TEXT
  2062. P_HWND hwnd
  2063. P_HWND0 hwndNewParent ; NULL is allowed here, but not for create. Need hwndObject or something.
  2064. ; in WMLIST.C
  2065. API BOOL, EnumChildWindows, TEXT
  2066. P_HWND hwnd
  2067. P_LPFNWENUM lpfnEnum
  2068. P_LONG lParam
  2069. ; in WMFIND.C
  2070. API HWND, FindWindow, TEXT
  2071. P_CLPSTRATOM0 lpszClass
  2072. P_CLPSTR0 lpszText
  2073. ; in WMLIST.C
  2074. API BOOL, EnumWindows, TEXT
  2075. P_LPFNWENUM lpfnEnum
  2076. P_LONG lParam
  2077. ; in WINMISC1.ASM
  2078. API BOOL, EnumTaskWindows, TEXT, <ASM> ; <SMALL>
  2079. P_HTASK hTask ;??? not validated
  2080. P_LPFNWENUM lpfnEnum
  2081. P_LONG lParam
  2082. ; in WINSHOW.C
  2083. API HWND, GetTopWindow, TEXT
  2084. P_HWND0 hwnd
  2085. ; in WINSHOW.ASM
  2086. API HWND, GetNextWindow, TEXT, <OBSOLETE, NOGEN>
  2087. P_HWND hwnd
  2088. P_UVALUE code,GW_MAX
  2089. ; in WINMISC1.ASM
  2090. API HTASK, GetWindowTask, TEXT, <ASM>
  2091. P_HWND hwnd
  2092. ; in WINSHOW.C
  2093. API HWND, GetLastActivePopup, TEXT
  2094. P_HWND hwnd
  2095. ; in WMDC.C
  2096. API HWND, GetWindow, TEXT
  2097. P_HWND hwnd
  2098. P_UVALUE cmd,GW_MAX
  2099. ; in WINHOOK.ASM
  2100. API HOOKPROC, SetWindowsHook, TEXT, <ASM>
  2101. P_RVALUE idHook,WH_MIN,WH_MAX
  2102. P_HOOK_HK lpfnHook
  2103. ; in WINHOOK.ASM
  2104. API BOOL, UnhookWindowsHook, TEXT, <ASM>
  2105. P_RVALUE idHook,WH_MIN,WH_MAX
  2106. P_HOOKPROC lpfnHook
  2107. ; in WINHOOK.ASM
  2108. API DWORD, DefHookProc, TEXT, <ASM>
  2109. P_int code
  2110. P_WORD wParam
  2111. P_DWORD lParam
  2112. P_LPHOOKPROC lplpfnHook
  2113. ; in WINHOOK.ASM
  2114. API HHOOK, SetWindowsHookEx, TEXT, <ASM, FUNNYFRAME>
  2115. P_RVALUE idHook,WH_MIN,WH_MAX
  2116. P_HOOKPROC lpfnHook
  2117. P_HINSTANCE hInstance
  2118. P_HTASK0 hTask
  2119. ; in WINHOOK.ASM
  2120. API BOOL, UnhookWindowsHookEx, TEXT, <ASM, FUNNYFRAME>
  2121. P_HHOOK hHook
  2122. ; in WINHOOK.ASM
  2123. API DWORD, CallNextHookEx, TEXT, <ASM>
  2124. P_HHOOK hHook
  2125. P_RVALUE idHook,WH_MIN,WH_MAX
  2126. P_WORD wParam
  2127. P_LONG lParam
  2128. ; in RMLOAD.C
  2129. API HBITMAP, LoadBitmap, TEXT
  2130. P_HINSTANCE0 hInstance
  2131. P_CLPSTRRSRC lpszRsrcName
  2132. ; in RMLOAD.C
  2133. API HCURSOR, LoadCursor, TEXT
  2134. P_HINSTANCE0 hInstance
  2135. P_CLPSTRRSRC lpszRsrcName
  2136. ; in RMCREATE.C
  2137. API HCURSOR, CreateCursor, TEXT
  2138. P_HINSTANCE hInstance
  2139. P_int xHotSpot
  2140. P_int yHotSpot
  2141. P_int cx
  2142. P_int cy
  2143. P_CLPBYTE lpAndMask ;??? LPBYTE, not LPSTR
  2144. P_CLPBYTE lpXorMask
  2145. ; in RMCREATE.C
  2146. API BOOL, DestroyCursor, TEXT
  2147. P_HCURSOR hCursor
  2148. ; in RMCREATE.C
  2149. API HCURSOR, CopyCursor, TEXT
  2150. P_HINSTANCE hInstance
  2151. P_HCURSOR hCursor
  2152. ; in RMLOAD.C
  2153. API HICON, LoadIcon, TEXT
  2154. P_HINSTANCE0 hInstance
  2155. P_CLPSTRRSRC lpszRsrcName
  2156. ; in RMCREATE.C
  2157. API HICON, CreateIcon, TEXT
  2158. P_HINSTANCE hInstance
  2159. P_int cx
  2160. P_int cy
  2161. P_BYTE cPlanes
  2162. P_BYTE cBitsPixel
  2163. P_CLPBYTE lpAndMask ;??? LPBYTE, not LPSTR
  2164. P_CLPBYTE lpXorMask
  2165. ; in RMCREATE.C
  2166. API BOOL, DestroyIcon, TEXT
  2167. P_HICON hIcon
  2168. ; in RMCREATE.C
  2169. API HICON, CopyIcon, TEXT
  2170. P_HINSTANCE hInstance
  2171. P_HICON hIcon
  2172. ; in RMCREATE.C
  2173. API void, GetInternalIconHeader, TEXT
  2174. P_CLPBYTE lpHeader
  2175. P_LPBYTE lpDestBuff
  2176. ; in RMLOAD.C
  2177. API int, LoadString, TEXT
  2178. P_HINSTANCE hInstance
  2179. P_WORD idString
  2180. P_LPBUFFER0 lpszString, cchString
  2181. APIERR
  2182. E_SETEMPTY lpszString, cchString
  2183. APIEND
  2184. ; in WINMISC1.ASM
  2185. API BOOL, IsTwoByteCharPrefix, TEXT, <ASM, NOGEN>
  2186. P_char ch
  2187. ; in DLGMGR2.C
  2188. API BOOL, IsDialogMessage, TEXT
  2189. P_HWND hwndDlg
  2190. P_CLPMSG lpmsg
  2191. ; in DLGBEGIN.C
  2192. API void, MapDialogRect, TEXT
  2193. P_HWND hwndDlg
  2194. P_LPRECT lprcMap
  2195. ; in LBOXCTL3.C
  2196. API int, DlgDirList, TEXT
  2197. P_HWNDNOFAIL0 hwndDlg
  2198. P_LPSTR0 lpszPathSpec
  2199. P_int idListBox
  2200. P_int idStatic
  2201. P_FLAGS flags,DDL_VALID ;??? Need constants in windows.h
  2202. ; in LBOXCTL3.C
  2203. API BOOL, DlgDirSelect, TEXT
  2204. P_HWND hwndDlg
  2205. P_LPSTR lpszPathSpec
  2206. P_int idListBox
  2207. API BOOL, DlgDirSelectEx, TEXT
  2208. P_HWND hwndDlg
  2209. P_LPBUFFER lpszPathSpec,cchMax
  2210. P_int idListBox
  2211. ; in COMBODIR.C
  2212. API int, DlgDirListComboBox, TEXT
  2213. P_HWND hwndDlg
  2214. P_LPSTR0 lpszPathSpec
  2215. P_int idComboBox
  2216. P_int idStatic
  2217. P_FLAGS flags,DDL_VALID
  2218. API BOOL, GlobalFindAtom, TEXT
  2219. P_CLPSTR lpszPath
  2220. ; in COMBODIR.C
  2221. API BOOL, DlgDirSelectComboBox, TEXT
  2222. P_HWND hwnd
  2223. P_LPSTR lpszPath
  2224. P_int idComboBox
  2225. API BOOL, DlgDirSelectComboBoxEx, TEXT
  2226. P_HWND hwnd
  2227. P_LPBUFFER lpszPath, cchMax
  2228. P_int idComboBox
  2229. ; in MDIWIN.C
  2230. API LONG, DefFrameProc, TEXT
  2231. P_HWND hwnd ;??? not validated
  2232. P_WORD hwndMDI ;Need to validate specially since not always
  2233. ;used and may be destroyed when DFP is called
  2234. P_WORD <msg> ;??? Should be unsigned
  2235. P_WORD wParam
  2236. P_LONG lParam
  2237. ; in MDIWIN.C
  2238. API LONG, DefMDIChildProc, TEXT
  2239. P_MSGPARMS hwndDlg,<msg>,wParam,lParam
  2240. ;P_HWND hwnd
  2241. ;P_WORD <msg> ;??? Should be unsigned
  2242. ;P_WORD wParam
  2243. ;P_LONG lParam
  2244. ; in MDIWIN.C
  2245. API BOOL, TranslateMDISysAccel, TEXT
  2246. P_HWND hwnd
  2247. P_CLPMSG lpmsg
  2248. ; in DTPARK.C
  2249. API WORD, ArrangeIconicWindows, TEXT
  2250. P_HWND hwnd
  2251. ; in WINRARE.C
  2252. API BOOL, SystemParametersInfo, TEXT
  2253. P_SPIPARAMS id, wParam, lpParam, flags
  2254. ; in HELPCALL.C
  2255. API BOOL, WinHelp, TEXT
  2256. P_HWND0 hwnd ; Allow NULL cause WinHelp.exe uses it internally
  2257. P_CLPSTR0 lpszHelp
  2258. P_WORD cmd
  2259. P_DWORD data
  2260. ; in DRVRRARE.C
  2261. API HDRVR, OpenDriver, TEXT
  2262. P_CLPSTR szDriverName
  2263. P_CLPSTR0 szSectionName
  2264. P_LONG lParam2
  2265. ; in DRVRRARE.C
  2266. API LONG, CloseDriver, TEXT
  2267. P_HDRVR hDriver
  2268. P_LONG lParam1
  2269. P_LONG lParam2
  2270. ; in DRVRRARE.C
  2271. API HMODULE,GetDriverModuleHandle, TEXT
  2272. P_HDRVR hDriver
  2273. ; in DRVR.C
  2274. API LONG, SendDriverMessage, TEXT
  2275. P_HDRVR0 hDriver
  2276. P_WORD message
  2277. P_LONG lParam1
  2278. P_LONG lParam2
  2279. ; in DRVR.C
  2280. API LONG, DefDriverProc, TEXT
  2281. P_DWORD idDriver
  2282. P_HDRVR hDriver ;??? not validated
  2283. P_WORD message
  2284. P_LONG lParam1
  2285. P_LONG lParam2
  2286. ; in DRVR.C
  2287. API HDRVR, GetNextDriver, TEXT
  2288. P_HDRVR0 hDriverCurrent
  2289. P_DFLAGS flags,GND_VALID_L, GND_VALID_H
  2290. ; in DRVR.C
  2291. API BOOL, GetDriverInfo, TEXT
  2292. P_HDRVR hDriver
  2293. P_LPDRIVERINFOSTRUCT lpInfo
  2294. ; in PALETTE.C
  2295. API HPALETTE, SelectPalette, TEXT
  2296. P_HDC hdc
  2297. P_HPALETTE hpal ;??? not validated
  2298. P_BOOL fForceBackground
  2299. ; in PALETTE.C
  2300. API WORD, RealizePalette, TEXT
  2301. P_HDC hdc
  2302. ; in COMDEV.C
  2303. API CID, OpenComm, TEXT
  2304. P_CLPSTR pszComName
  2305. P_WORD cbInQueue
  2306. P_WORD cbOutQueue
  2307. APIERR
  2308. mov ax, -1 ;negative error code
  2309. APIEND
  2310. ; in COMDEV.C
  2311. API int, SetCommState, TEXT
  2312. P_CLPDCB lpdcb
  2313. APIERR
  2314. mov ax, -1 ;negative error code
  2315. APIEND
  2316. ; in COMDEV.C
  2317. API int, GetCommState, TEXT
  2318. P_CID cid
  2319. P_LPDCB lpdcb
  2320. APIERR
  2321. mov ax, -1 ;negative error code
  2322. APIEND ;0 => success
  2323. ; in COMDEV.C
  2324. API int, ReadComm, TEXT
  2325. P_CID cid
  2326. P_LPBUFFER lpBuffer, cbBuffer
  2327. APIERR
  2328. mov ax, -1 ;negative error code
  2329. APIEND
  2330. ; in COMDEV.C
  2331. API int, UngetCommChar, TEXT
  2332. P_CID cid
  2333. P_char ch
  2334. APIERR
  2335. mov ax, -1 ;negative error code
  2336. APIEND
  2337. ; in COMDEV.C
  2338. API int, WriteComm, TEXT
  2339. P_CID cid
  2340. P_CLPBUFFER lpBuffer, cbBuffer
  2341. APIERR
  2342. mov ax, -1 ;negative error code
  2343. APIEND
  2344. ; in COMDEV.C
  2345. API int, CloseComm, TEXT
  2346. P_CID cid
  2347. APIERR
  2348. mov ax, -1 ;negative error code
  2349. APIEND
  2350. ; in COMDEV.C
  2351. API int, GetCommError, TEXT
  2352. P_CID cid
  2353. P_LPCOMSTAT0 lpComStat
  2354. ; in COMDEV.C
  2355. API int, BuildCommDCB, TEXT
  2356. P_CLPSTR lpszDef
  2357. P_LPDCB lpdcb
  2358. APIERR
  2359. mov ax, -1 ;negative error code
  2360. APIEND
  2361. ; in COMDEV.C
  2362. API int, TransmitCommChar, TEXT
  2363. P_CID cid
  2364. P_char ch
  2365. APIERR
  2366. mov ax, -1 ;negative error code
  2367. APIEND
  2368. ; in COMDEV.C
  2369. API LPWORD, SetCommEventMask, TEXT
  2370. P_CID cid
  2371. P_FLAGS evtMask,EV_VALID
  2372. ; in COMDEV.C
  2373. API WORD, GetCommEventMask, TEXT
  2374. P_CID cid
  2375. P_FLAGS evtMask,EV_VALID
  2376. ; in COMDEV.C
  2377. API int, SetCommBreak, TEXT
  2378. P_CID cid
  2379. APIERR
  2380. mov ax, -1 ;negative error code
  2381. APIEND
  2382. ; in COMDEV.C
  2383. API int, ClearCommBreak, TEXT
  2384. P_CID cid
  2385. APIERR
  2386. mov ax, -1 ;negative error code
  2387. APIEND
  2388. ; in COMDEV.C
  2389. API int, FlushComm, TEXT
  2390. P_CID cid
  2391. P_int queue
  2392. APIERR
  2393. mov ax, -1 ;negative error code
  2394. APIEND
  2395. ; in COMDEV.C
  2396. API LONG, EscapeCommFunction, TEXT
  2397. P_CID cid
  2398. P_int fcn
  2399. APIERR
  2400. mov ax, -1 ;negative error code
  2401. cwd
  2402. APIEND
  2403. ; in COMDEV.C
  2404. API BOOL, EnableCommNotification, TEXT
  2405. P_CID cid
  2406. P_HWND0 hwnd
  2407. P_int recvTh
  2408. P_int sendTh
  2409. ;===========================================================================
  2410. ;
  2411. ; WNet API validation
  2412. ;
  2413. WNNC_MIN equ -1
  2414. WNNC_MAX equ 11
  2415. WNBD_CONN_MIN equ 1
  2416. WNBD_CONN_MAX equ 3
  2417. ; error returns (defined in winnet.h)
  2418. WN_BAD_POINTER equ 4
  2419. WN_BAD_VALUE equ 5
  2420. ;-------------------------------
  2421. ; Special-case macro definitions
  2422. P_LPBUFFERLPWSIZE macro lpbuf, lpsize, opts
  2423. _DefParm <lpbuf>,4,<opts>
  2424. _DefParm <lpsize>,4,<opts>
  2425. if VLgen
  2426. _FlsFrame
  2427. mov ax, _P_&lpsize
  2428. mov cx, _P_&lpsize+2
  2429. mov bx, 2
  2430. lcall LP ;first check ptr. to size WORD
  2431. _gensub LP
  2432. les bx,_P_&lpsize
  2433. mov bx,es:[bx] ;ax = size of buffer
  2434. mov ax,_P_&lpbuf
  2435. mov cx,_P_&lpbuf+2
  2436. lcall LP ;check buffer size
  2437. endif
  2438. endm
  2439. ;----------------
  2440. ; API definitions (all in winnet.asm)
  2441. API WORD, WNetGetCaps, TEXT, <ASM, FUNNYFRAME>
  2442. P_RVALUE nIndex, WNNC_MIN, WNNC_MAX
  2443. API WORD, WNetDeviceMode, TEXT, <ASM, FUNNYFRAME>
  2444. P_HWND0 hWndParent ;Driver calls DialogBox with hWndParent as
  2445. ;dialog owner => NULL hWnd is acceptable
  2446. APIERR
  2447. mov ax, WN_BAD_VALUE
  2448. APIEND
  2449. API WORD, WNetBrowseDialog, TEXT, <ASM, FUNNYFRAME>
  2450. P_HWND0 hWndParent
  2451. P_RVALUE wType, WNBD_CONN_MIN, WNBD_CONN_MAX
  2452. P_LPSTR lpPath ;buffer should be at least 128 chars. long
  2453. APIERR
  2454. mov ax, WN_BAD_VALUE
  2455. APIEND
  2456. API WORD, WNetGetUser, TEXT, <ASM, FUNNYFRAME>
  2457. P_LPBUFFERLPWSIZE lpUserName, lpwSize ; lpwSize is far ptr. to WORD
  2458. APIERR
  2459. mov ax, WN_BAD_POINTER
  2460. APIEND
  2461. API WORD, WNetAddConnection, TEXT, <ASM, FUNNYFRAME>
  2462. P_CLPSTR lpNetPath
  2463. P_CLPSTR0 lpPassWd
  2464. P_CLPSTR lpLocal ;"A:"-"Z:", "LPT1:"-"LPT4:"
  2465. APIERR
  2466. mov ax, WN_BAD_POINTER
  2467. APIEND
  2468. API WORD, WNetCancelConnection, TEXT, <ASM, FUNNYFRAME>
  2469. P_CLPSTR lpName
  2470. P_BOOL bForce
  2471. APIERR
  2472. mov ax, WN_BAD_POINTER
  2473. APIEND
  2474. API WORD, WNetGetConnection, TEXT, <ASM, FUNNYFRAME>
  2475. P_CLPSTR lpLocal
  2476. P_LPBUFFERLPWSIZE lpRemoteName, lpwSize ;lpwSize is far ptr. to WORD
  2477. APIERR
  2478. mov ax, WN_BAD_POINTER
  2479. APIEND
  2480. API WORD, WNetWatchQueue, TEXT, <ASM, FUNNYFRAME>
  2481. P_HWND hWndNotify ;can be null?
  2482. P_CLPSTR lpLocal
  2483. P_CLPSTR0 szUSer
  2484. P_WORD nQueue
  2485. APIERR
  2486. mov ax, WN_BAD_VALUE
  2487. APIEND
  2488. API WORD, WNetUnwatchQueue, TEXT,<ASM, FUNNYFRAME>
  2489. P_CLPSTR lpLocal
  2490. APIERR
  2491. mov ax, WN_BAD_POINTER
  2492. APIEND
  2493. API WORD, WNetLockQueueData, TEXT, <ASM, FUNNYFRAME>
  2494. P_CLPSTR szQueue
  2495. P_CLPSTR0 szUser
  2496. P_LPDWORD lplpQueueStruct ;driver returns ptr to QUEUESTRUCT
  2497. APIERR
  2498. mov ax, WN_BAD_POINTER
  2499. APIEND
  2500. API WORD, WNetUnlockQueueData, TEXT, <ASM, FUNNYFRAME>
  2501. P_CLPSTR szQueue
  2502. APIERR
  2503. mov ax, WN_BAD_POINTER
  2504. APIEND
  2505. API HFILE, WNetOpenJob, TEXT, <ASM, FUNNYFRAME>
  2506. P_CLPSTR szQueue
  2507. P_CLPSTR0 szTitle
  2508. P_WORD nCopies
  2509. P_LPWORD lpw ;file handle returned
  2510. APIERR
  2511. mov ax, WN_BAD_POINTER
  2512. APIEND
  2513. P_HFILE equ <P_H>
  2514. API WORD, WNetCloseJob, TEXT, <ASM, FUNNYFRAME>
  2515. P_HFILE fh
  2516. P_LPWORD0 lpwIDJob
  2517. P_LPSTR0 szQueue ;name of net. queue returned here
  2518. APIERR
  2519. mov ax, WN_BAD_POINTER
  2520. APIEND
  2521. API WORD, WNetHoldJob, TEXT, <ASM, FUNNYFRAME>
  2522. P_CLPSTR szQueue
  2523. P_WORD wJobID
  2524. APIERR
  2525. mov ax, WN_BAD_POINTER
  2526. APIEND
  2527. API WORD, WNetReleaseJob, TEXT, <ASM, FUNNYFRAME>
  2528. P_CLPSTR szQueue
  2529. P_WORD wJobID
  2530. APIERR
  2531. mov ax, WN_BAD_POINTER
  2532. APIEND
  2533. API WORD, WNetCancelJob, TEXT, <ASM, FUNNYFRAME>
  2534. P_CLPSTR szQueue
  2535. P_WORD wJobID
  2536. APIERR
  2537. mov ax, WN_BAD_POINTER
  2538. APIEND
  2539. API WORD, WNetSetJobCopies, TEXT, <ASM, FUNNYFRAME>
  2540. P_CLPSTR szQueue
  2541. P_WORD wJobID
  2542. P_WORD nCopies
  2543. APIERR
  2544. mov ax, WN_BAD_POINTER
  2545. APIEND
  2546. API WORD, WNetAbortJob, TEXT, <ASM, FUNNYFRAME>
  2547. P_CLPSTR lpDevice
  2548. P_HFILE fh
  2549. APIERR
  2550. mov ax, WN_BAD_POINTER
  2551. APIEND
  2552. API WORD, WNetGetError, TEXT, <ASM, FUNNYFRAME>
  2553. P_LPWORD lpwError
  2554. APIERR
  2555. mov ax, WN_BAD_POINTER
  2556. APIEND
  2557. API WORD, WNetGetErrorText, TEXT, <ASM, FUNNYFRAME>
  2558. P_WORD wError
  2559. P_LPBUFFERLPWSIZE lpRemoteName, lpwSize ;lpwSize is far ptr. to WORD
  2560. APIERR
  2561. mov ax, WN_BAD_POINTER
  2562. APIEND