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.

744 lines
23 KiB

  1. ;----------------------------Module-Header------------------------------;
  2. ; Module Name: olethk.inc
  3. ;
  4. ; Win32s OLE client library include
  5. ;
  6. ; Copyright (c) 1992 Microsoft Corporation
  7. ; All rights reserved.
  8. ;
  9. ; History:
  10. ; 06-May-92 KevinR wrote it
  11. ;
  12. ;-----------------------------------------------------------------------;
  13. ; from ole.h
  14. ;
  15. OLE_OK equ 0
  16. OLE_WAIT_FOR_RELEASE equ 1
  17. OLE_BUSY equ 2
  18. OLE_ERROR_PROTECT_ONLY equ 3
  19. OLE_ERROR_MEMORY equ 4
  20. OLE_ERROR_STREAM equ 5
  21. OLE_ERROR_STATIC equ 6
  22. OLE_ERROR_BLANK equ 7
  23. OLE_ERROR_DRAW equ 8
  24. OLE_ERROR_METAFILE equ 9
  25. OLE_ERROR_ABORT equ 10
  26. OLE_ERROR_CLIPBOARD equ 11
  27. OLE_ERROR_FORMAT equ 12
  28. OLE_ERROR_OBJECT equ 13
  29. OLE_ERROR_OPTION equ 14
  30. OLE_ERROR_PROTOCOL equ 15
  31. OLE_ERROR_ADDRESS equ 16
  32. OLE_ERROR_NOT_EQUAL equ 17
  33. OLE_ERROR_HANDLE equ 18
  34. OLE_ERROR_GENERIC equ 19
  35. OLE_ERROR_CLASS equ 20
  36. OLE_ERROR_SYNTAX equ 21
  37. OLE_ERROR_DATATYPE equ 22
  38. OLE_ERROR_PALETTE equ 23
  39. OLE_ERROR_NOT_LINK equ 24
  40. OLE_ERROR_NOT_EMPTY equ 25
  41. OLE_ERROR_SIZE equ 26
  42. OLE_ERROR_DRIVE equ 27
  43. OLE_ERROR_NETWORK equ 28
  44. OLE_ERROR_NAME equ 29
  45. OLE_ERROR_TEMPLATE equ 30
  46. OLE_ERROR_NEW equ 31
  47. OLE_ERROR_EDIT equ 32
  48. OLE_ERROR_OPEN equ 33
  49. OLE_ERROR_NOT_OPEN equ 34
  50. OLE_ERROR_LAUNCH equ 35
  51. OLE_ERROR_COMM equ 36
  52. OLE_ERROR_TERMINATE equ 37
  53. OLE_ERROR_COMMAND equ 38
  54. OLE_ERROR_SHOW equ 39
  55. OLE_ERROR_DOVERB equ 40
  56. OLE_ERROR_ADVISE_NATIVE equ 41
  57. OLE_ERROR_ADVISE_PICT equ 42
  58. OLE_ERROR_ADVISE_RENAME equ 43
  59. OLE_ERROR_POKE_NATIVE equ 44
  60. OLE_ERROR_REQUEST_NATIVE equ 45
  61. OLE_ERROR_REQUEST_PICT equ 46
  62. OLE_ERROR_SERVER_BLOCKED equ 47
  63. OLE_ERROR_REGISTRATION equ 48
  64. OLE_ERROR_ALREADY_REGISTERED equ 49
  65. OLE_ERROR_TASK equ 50
  66. OLE_ERROR_OUTOFDATE equ 51
  67. OLE_ERROR_CANT_UPDATE_CLIENT equ 52
  68. OLE_ERROR_UPDATE equ 53
  69. OLE_ERROR_SETDATA_FORMAT equ 54
  70. OLE_ERROR_STATIC_FROM_OTHER_OS equ 55
  71. OLE_WARN_DELETE_DATA equ 1000
  72. ;-----------------------------------------------------------------------;
  73. OLE_RELEASE equ 5
  74. ;-----------------------------------------------------------------------;
  75. OF_SET equ 0001h
  76. OF_GET equ 0002h
  77. OF_HANDLER equ 0004h
  78. f16ptr typedef ptr far16
  79. f32ptr typedef ptr far32
  80. TRUE = 1
  81. FALSE = 0
  82. MAX_STRLEN equ 50 ; LATER: what should this be?
  83. ;-----------------------------------------
  84. _disp_16_offset_base = 7*4
  85. disp_16_retaddr equ <dword ptr [bp - _disp_16_offset_base + 0]>
  86. disp_16_di equ < word ptr [bp - _disp_16_offset_base + 4]>
  87. disp_16_si equ < word ptr [bp - _disp_16_offset_base + 6]>
  88. disp_16_bp equ < word ptr [bp - _disp_16_offset_base + 8]>
  89. _saved_register_offset = (4*4)
  90. _dispatcher_offset = _saved_register_offset + (8*4)
  91. ;-----------------------------------------
  92. GMEM_FLAGS equ 0042h ; GMEM_MOVEABLE | GMEM_ZEROINIT
  93. GMEM_FLAGS_DDE equ 2042h ; GMEM_MOVEABLE | GMEM_ZEROINIT | GMEM_DDESHARE
  94. ;=======================================================================
  95. _model_flat = 7
  96. _model_large = 5
  97. _model = @Model
  98. ;==========================================================================
  99. _label_uniq = 0
  100. NEW_LABEL macro argName
  101. argName catstr <LABEL_>, %_label_uniq
  102. _label_uniq = _label_uniq + 1
  103. endm
  104. ;==========================================================================
  105. extLab16 macro argName
  106. externDef argName :far16
  107. argName label far16
  108. endm
  109. extLab32 macro argName
  110. externDef argName :near32
  111. argName label near32
  112. endm
  113. extLab macro argName
  114. if _model eq _model_large
  115. extLab16 argName
  116. else
  117. extLab32 argName
  118. endif
  119. endm
  120. ;-----------------------------------------
  121. DEFP_NEAR32 macro arg
  122. P&arg typedef near32 ptr arg
  123. endm
  124. DEFP_FAR16 macro arg
  125. LP&arg typedef far16 ptr arg
  126. endm
  127. ;-----------------------------------------
  128. DEBUGBREAK macro argLab
  129. local nobrk16, nobrk32
  130. ifdef DEBUG
  131. if _model eq _model_large
  132. push ds
  133. push si
  134. mov si,seg fOleDbgBrk16
  135. mov ds,si
  136. assume ds:(seg fOleDbgBrk16)
  137. cmp fOleDbgBrk16,word ptr 0
  138. jz nobrk16
  139. extLab @CatStr( %@FileName, <_>, %@Line, <_>, argLab)
  140. int 3
  141. nobrk16:
  142. pop si
  143. pop ds
  144. assume ds:nothing
  145. else
  146. cmp fOleDbgBrk32,dword ptr 0
  147. jz nobrk32
  148. extLab @CatStr( %@FileName, <_>, %@Line, <_>, argLab)
  149. int 3
  150. nobrk32:
  151. endif ; _model
  152. endif
  153. endm
  154. ;-----------------------------------------
  155. SELOFF struct 2t
  156. off dw ?
  157. sel dw ?
  158. SELOFF ends
  159. ;==========================================================================
  160. ; 32=>16 thunk starts in flat code. It stores the 16:16 address of
  161. ; the target function in eax and jmp's to the thunk.
  162. ; 12 bytes
  163. ;
  164. ; 90 B8 <imm32,16:16Target> mov eax,<16:16Target>
  165. ; 90 E9 <rel32,Thk32-$> jmp Thk32
  166. ;
  167. ;
  168. ;
  169. ; use AllocCallback()
  170. ; 16=>32 thunk starts in 16-bit code. It stores the flat offset of
  171. ; the target function in eax and jmp's to the thunk.
  172. ; 12 bytes
  173. ;
  174. ; 66 B8 <imm32,Target32> mov eax,<Target32>
  175. ; 90 EA <ptr16:16,Thk16> jmp Thk16
  176. ;
  177. ;==========================================================================
  178. OPCODE_MOV_LS equ 0B890h
  179. OPCODE_JMP_LS equ 0E990h
  180. THKLS struct 2t
  181. wOpcodeMov WORD ? ; OPCODE_MOV_LS
  182. dwTarget DWORD ? ; 16:16 address we are thunking to
  183. wOpcodeJmp WORD ? ; OPCODE_JMP_LS
  184. dwThk DWORD ? ; common thunk for this type
  185. THKLS ends
  186. DEFP_FAR16 THKLS
  187. DEFP_FAR16 LPTHKLS
  188. DEFP_NEAR32 THKLS
  189. DEFP_NEAR32 PTHKLS
  190. OPCODE_MOV_SL equ 0B866h
  191. OPCODE_JMP_SL equ 0EA90h
  192. THKSL struct 2t
  193. wOpcodeMov WORD ? ; OPCODE_MOV_SL
  194. dwTarget DWORD ? ; flat address we are thunking to
  195. wOpcodeJmp WORD ? ; OPCODE_JMP_SL
  196. dwThk DWORD ? ; common thunk for this type
  197. THKSL ends
  198. DEFP_FAR16 THKSL
  199. DEFP_FAR16 LPTHKSL
  200. DEFP_NEAR32 THKSL
  201. DEFP_NEAR32 PTHKSL
  202. PFN struct 4t
  203. foo DWORD ?
  204. PFN ends
  205. PFN_COUNT macro arg
  206. exitm %((SIZE arg)/(SIZE PFN))
  207. endm
  208. ;==========================================================================
  209. ; 16-bit OLEOBJECT
  210. ;===================================
  211. OLEOBJECTVTBL struct 4t
  212. QueryProtocol PFN <>
  213. Release PFN <>
  214. Show PFN <>
  215. DoVerb PFN <>
  216. GetData PFN <>
  217. SetData PFN <>
  218. SetTargetDevice PFN <>
  219. SetBounds PFN <>
  220. EnumFormats PFN <>
  221. SetColorScheme PFN <>
  222. ; Server has to implement only the above methods.
  223. ; Extra methods required for client.
  224. Delete PFN <>
  225. SetHostNames PFN <>
  226. SaveToStream PFN <>
  227. Clone PFN <>
  228. CopyFromLink PFN <>
  229. Equal PFN <>
  230. CopyToClipboard PFN <>
  231. Draw PFN <>
  232. Activate PFN <>
  233. Execute PFN <>
  234. Close PFN <>
  235. Update PFN <>
  236. Reconnect PFN <>
  237. ObjectConvert PFN <>
  238. GetLinkUpdateOptions PFN <>
  239. SetLinkUpdateOptions PFN <>
  240. Rename PFN <>
  241. QueryName PFN <>
  242. QueryType PFN <>
  243. QueryBounds PFN <>
  244. QuerySize PFN <>
  245. QueryOpen PFN <>
  246. QueryOutOfDate PFN <>
  247. QueryReleaseStatus PFN <>
  248. QueryReleaseError PFN <>
  249. QueryReleaseMethod PFN <>
  250. RequestData PFN <>
  251. ObjectLong PFN <>
  252. OLEOBJECTVTBL ends
  253. DEFP_FAR16 OLEOBJECTVTBL
  254. DEFP_FAR16 LPOLEOBJECTVTBL
  255. OLEOBJECT struct 4t
  256. lpvtbl LPOLEOBJECTVTBL ?
  257. ;
  258. ; inaccessible state information
  259. ;
  260. OLEOBJECT ends
  261. DEFP_FAR16 OLEOBJECT
  262. DEFP_FAR16 LPOLEOBJECT
  263. ;===================================
  264. ; 32-bit OLEOBJECT
  265. ;===================================
  266. OLEOBJECTVTBL32 typedef OLEOBJECTVTBL
  267. DEFP_NEAR32 OLEOBJECTVTBL32
  268. DEFP_NEAR32 POLEOBJECTVTBL32
  269. OLEOBJECT32 struct 4t
  270. poov POLEOBJECTVTBL32 ?
  271. ;
  272. ; inaccessible state information
  273. ;
  274. OLEOBJECT32 ends
  275. DEFP_NEAR32 OLEOBJECT32
  276. DEFP_NEAR32 POLEOBJECT32
  277. ;==========================================================================
  278. ; 16-bit OLEOBJECTSVR
  279. ;===================================
  280. OLEOBJECTSVRVTBL struct 4t
  281. ; Server has to implement only these methods.
  282. QueryProtocol PFN <>
  283. Release PFN <>
  284. Show PFN <>
  285. DoVerb PFN <>
  286. GetData PFN <>
  287. SetData PFN <>
  288. SetTargetDevice PFN <>
  289. SetBounds PFN <>
  290. EnumFormats PFN <>
  291. SetColorScheme PFN <>
  292. OLEOBJECTSVRVTBL ends
  293. DEFP_FAR16 OLEOBJECTSVRVTBL
  294. DEFP_FAR16 LPOLEOBJECTSVRVTBL
  295. ;;OLEOBJECTSVR struct 4t
  296. ;; lpvtbl LPOLEOBJECTSVRVTBL ?
  297. ;; ;
  298. ;; ; inaccessible state information
  299. ;; ;
  300. ;;OLEOBJECTSVR ends
  301. ;;DEFP_FAR16 OLEOBJECTSVR
  302. ;;DEFP_FAR16 LPOLEOBJECTSVR
  303. ;===================================
  304. ; 32-bit OLEOBJECTSVR
  305. ;===================================
  306. OLEOBJECTSVRVTBL32 typedef OLEOBJECTSVRVTBL
  307. DEFP_NEAR32 OLEOBJECTSVRVTBL32
  308. DEFP_NEAR32 POLEOBJECTSVRVTBL32
  309. OLEOBJECTSVR32 struct 4t
  310. poov POLEOBJECTSVRVTBL32 ?
  311. ;
  312. ; inaccessible state information
  313. ;
  314. OLEOBJECTSVR32 ends
  315. DEFP_NEAR32 OLEOBJECTSVR32
  316. DEFP_NEAR32 POLEOBJECTSVR32
  317. ;==========================================================================
  318. ; 16-bit OLECLIENT
  319. ;===================================
  320. OLECLIENTVTBL struct 4t
  321. CallBack PFN <>
  322. OLECLIENTVTBL ends
  323. DEFP_FAR16 OLECLIENTVTBL
  324. DEFP_FAR16 LPOLECLIENTVTBL
  325. OLECLIENT struct 4t
  326. lpvtbl PFN <>
  327. ;
  328. ; inaccessible state information
  329. ;
  330. OLECLIENT ends
  331. DEFP_FAR16 OLECLIENT
  332. DEFP_FAR16 LPOLECLIENT
  333. ;===================================
  334. ; 32-bit OLECLIENT
  335. ;===================================
  336. OLECLIENTVTBL32 typedef OLECLIENTVTBL
  337. DEFP_NEAR32 OLECLIENTVTBL32
  338. DEFP_NEAR32 POLECLIENTVTBL32
  339. OLECLIENT32 struct 4t
  340. pocv POLECLIENTVTBL32 ?
  341. ;
  342. ; inaccessible state information
  343. ;
  344. OLECLIENT32 ends
  345. DEFP_NEAR32 OLECLIENT32
  346. DEFP_NEAR32 POLECLIENT32
  347. ;==========================================================================
  348. ; 16-bit OLESTREAM
  349. ;===================================
  350. OLESTREAMVTBL struct 4t
  351. Get PFN <>
  352. Put PFN <>
  353. OLESTREAMVTBL ends
  354. DEFP_FAR16 OLESTREAMVTBL
  355. DEFP_FAR16 LPOLESTREAMVTBL
  356. OLESTREAM struct 4t
  357. lpvtbl PFN <>
  358. ;
  359. ; inaccessible state information
  360. ;
  361. OLESTREAM ends
  362. DEFP_FAR16 OLESTREAM
  363. DEFP_FAR16 LPOLESTREAM
  364. ;===================================
  365. ; 32-bit OLESTREAM
  366. ;===================================
  367. OLESTREAMVTBL32 typedef OLESTREAMVTBL
  368. DEFP_NEAR32 OLESTREAMVTBL32
  369. DEFP_NEAR32 POLESTREAMVTBL32
  370. OLESTREAM32 struct 4t
  371. postrv POLESTREAMVTBL32 ?
  372. ;
  373. ; inaccessible state information
  374. ;
  375. OLESTREAM32 ends
  376. DEFP_NEAR32 OLESTREAM32
  377. DEFP_NEAR32 POLESTREAM32
  378. ;==========================================================================
  379. ; 16-bit OLESERVER
  380. ;===================================
  381. OLESERVERVTBL struct 4t
  382. Open PFN <>
  383. Create PFN <>
  384. CreateFromTemplate PFN <>
  385. Edit PFN <>
  386. Exit PFN <>
  387. Release PFN <>
  388. Execute PFN <>
  389. OLESERVERVTBL ends
  390. DEFP_FAR16 OLESERVERVTBL
  391. DEFP_FAR16 LPOLESERVERVTBL
  392. OLESERVER struct 4t
  393. lpvtbl PFN <>
  394. ;
  395. ; inaccessible state information
  396. ;
  397. OLESERVER ends
  398. DEFP_FAR16 OLESERVER
  399. DEFP_FAR16 LPOLESERVER
  400. ;===================================
  401. ; 32-bit OLESERVER
  402. ;===================================
  403. OLESERVERVTBL32 typedef OLESERVERVTBL
  404. DEFP_NEAR32 OLESERVERVTBL32
  405. DEFP_NEAR32 POLESERVERVTBL32
  406. OLESERVER32 struct 4t
  407. posv POLESERVERVTBL32 ?
  408. ;
  409. ; inaccessible state information
  410. ;
  411. OLESERVER32 ends
  412. DEFP_NEAR32 OLESERVER32
  413. DEFP_NEAR32 POLESERVER32
  414. ;==========================================================================
  415. ; 16-bit OLESERVERDOC
  416. ;===================================
  417. OLESERVERDOCVTBL struct 4t
  418. Save PFN <>
  419. Close PFN <>
  420. SetHostNames PFN <>
  421. SetDocDimensions PFN <>
  422. GetObject PFN <>
  423. Release PFN <>
  424. SetColorScheme PFN <>
  425. Execute PFN <>
  426. OLESERVERDOCVTBL ends
  427. DEFP_FAR16 OLESERVERDOCVTBL
  428. DEFP_FAR16 LPOLESERVERDOCVTBL
  429. OLESERVERDOC struct 4t
  430. lpvtbl PFN <>
  431. ;
  432. ; inaccessible state information
  433. ;
  434. OLESERVERDOC ends
  435. DEFP_FAR16 OLESERVERDOC
  436. DEFP_FAR16 LPOLESERVERDOC
  437. ;===================================
  438. ; 32-bit OLESERVERDOC
  439. ;===================================
  440. OLESERVERDOCVTBL32 typedef OLESERVERDOCVTBL
  441. DEFP_NEAR32 OLESERVERDOCVTBL32
  442. DEFP_NEAR32 POLESERVERDOCVTBL32
  443. OLESERVERDOC32 struct 4t
  444. podv POLESERVERDOCVTBL32 ?
  445. ;
  446. ; inaccessible state information
  447. ;
  448. OLESERVERDOC32 ends
  449. DEFP_NEAR32 OLESERVERDOC32
  450. DEFP_NEAR32 POLESERVERDOC32
  451. ;==========================================================================
  452. ; client-side
  453. ;==========================================================================
  454. ; created by OleCli32 for OleApp32 in OleCreateAPI32()
  455. OLEOBJECTCLI struct 4t
  456. poov POLEOBJECTVTBL32 ?
  457. lpooSelf LPOLEOBJECT ? ; 16:16 address of this struct
  458. lpoo LPOLEOBJECT ? ; created by OleCli
  459. lpoc LPOLECLIENT ? ; 16=>32 thunks to app's poc->pocv
  460. flStatus DWORD ? ; status flags
  461. cfFormat WORD ? ; format of pending OleSetData
  462. hData16 WORD ? ; for pending OleSetData
  463. hData32 DWORD ? ; for pending OleSetData
  464. oov OLEOBJECTVTBL32 <> ; addresses of atls[] elements
  465. OLEOBJECTCLI ends
  466. OLEOBJECTCLI_HEADER_SIZE = (6*4 + 2*2)
  467. .errnz OLEOBJECTCLI_HEADER_SIZE - (size OLEOBJECTCLI - size OLEOBJECTVTBL32)
  468. DEFP_NEAR32 OLEOBJECTCLI
  469. DEFP_NEAR32 POLEOBJECTCLI
  470. DEFP_FAR16 OLEOBJECTCLI
  471. DEFP_FAR16 LPOLEOBJECTCLI
  472. OCLOBJ_DELETE_PENDING = 00000001h
  473. OCLOBJ_SETDATA_PENDING = 00000002h
  474. ; 16-bit
  475. ; seen by OleCli
  476. OLECLIENTCLI struct 2t
  477. lpocv LPOLECLIENT ? ; &ocv
  478. poc POLECLIENT32 ? ; created by AppCli32
  479. ocv OLECLIENTVTBL <> ; addresses of AllocCallback() thks
  480. OLECLIENTCLI ends
  481. OLECLIENTCLI_HEADER_SIZE = 2*4
  482. .errnz OLECLIENTCLI_HEADER_SIZE - (size OLECLIENTCLI - size OLECLIENTVTBL)
  483. DEFP_FAR16 OLECLIENTCLI
  484. DEFP_FAR16 LPOLECLIENTCLI
  485. ; 16-bit
  486. ; seen by OleCli
  487. OLESTREAMCLI struct 2t
  488. lpostrv LPOLESTREAMVTBL ? ; &ostrv
  489. postr POLESTREAM32 ? ; created by AppCli32
  490. ostrv OLESTREAMVTBL <> ; addresses of atsl[] elements
  491. ;; ; 16=>32 thunks to postr->postrv entries
  492. ;; atsl THKSL PFN_COUNT( OLESTREAMVTBL) DUP (<>)
  493. OLESTREAMCLI ends
  494. OLESTREAMCLI_HEADER_SIZE = 2*4
  495. .errnz OLESTREAMCLI_HEADER_SIZE - (size OLESTREAMCLI - size OLESTREAMVTBL)
  496. DEFP_FAR16 OLESTREAMCLI
  497. DEFP_FAR16 LPOLESTREAMCLI
  498. ;==========================================================================
  499. ; server-side
  500. ;==========================================================================
  501. ; 16-bit
  502. ; created for OleSvr by OleSvr32
  503. OLESERVERSVR struct 2t
  504. lposv LPOLESERVERVTBL ? ; &osv
  505. pos POLESERVER32 ? ; created by AppSvr32
  506. lhSvr DWORD ? ; created by OleSvr
  507. fwStatus WORD ? ; various flags
  508. cLevel WORD ? ; reentrancy level
  509. osv OLESERVERVTBL <> ; addresses of 16=>32 thunks
  510. OLESERVERSVR ends
  511. OLESERVERSVR_HEADER_SIZE = 4*4
  512. .errnz OLESERVERSVR_HEADER_SIZE - (size OLESERVERSVR - size OLESERVERVTBL)
  513. DEFP_FAR16 OLESERVERSVR
  514. DEFP_FAR16 LPOLESERVERSVR
  515. OSVSVR_DELETE_PENDING = 00000001h
  516. ; 16-bit
  517. ; created for OleSvr by OleSvr32
  518. OLESERVERDOCSVR struct 2t
  519. lpodv LPOLESERVERDOCVTBL ? ; &odv
  520. posd POLESERVERDOC32 ? ; created by AppSvr32
  521. lhDoc DWORD ? ; created by OleSvr
  522. flStatus DWORD ? ; various flags
  523. odv OLESERVERDOCVTBL <> ; addresses of 16=>32 thunks
  524. OLESERVERDOCSVR ends
  525. OLESERVERDOCSVR_HEADER_SIZE = 4*4
  526. .errnz OLESERVERDOCSVR_HEADER_SIZE - (size OLESERVERDOCSVR - size OLESERVERDOCVTBL)
  527. DEFP_FAR16 OLESERVERDOCSVR
  528. DEFP_FAR16 LPOLESERVERDOCSVR
  529. OSVDOC_DELETE_PENDING = 00000001h
  530. ; 16-bit
  531. ; created for OleSvr by OleSvr32
  532. OLEOBJECTSVR struct 2t
  533. lpoov LPOLEOBJECTVTBL ? ; &oov
  534. poo POLEOBJECTSVR32 ? ; created by AppSvr32
  535. lpoc LPOLECLIENT ? ; created by OleSvr32, 32=>16 thunks
  536. oov OLEOBJECTSVRVTBL <> ; addresses of 16=>32 thunks
  537. OLEOBJECTSVR ends
  538. OLEOBJECTSVR_HEADER_SIZE = 3*4
  539. .errnz OLEOBJECTSVR_HEADER_SIZE - (size OLEOBJECTSVR - size OLEOBJECTSVRVTBL)
  540. DEFP_FAR16 OLEOBJECTSVR
  541. DEFP_FAR16 LPOLEOBJECTSVR
  542. ; 32-bit
  543. ; seen by AppSvr32, contains 32=>16 thunks
  544. OLECLIENTSVR struct 4t
  545. pocv POLECLIENTVTBL32 ? ; &ocv
  546. lpoc LPOLECLIENT ? ; created by OleSvr
  547. ocv OLECLIENTVTBL32 <> ; addresses of 32=>16 thunks
  548. OLECLIENTSVR ends
  549. OLECLIENTSVR_HEADER_SIZE = 2*4
  550. .errnz OLECLIENTSVR_HEADER_SIZE - (size OLECLIENTSVR - size OLECLIENTVTBL32)
  551. DEFP_FAR16 OLECLIENTSVR
  552. DEFP_FAR16 LPOLECLIENTSVR
  553. if 0
  554. ////////////////////////////////////////////////////////////////////////////
  555. // OleObj
  556. ////////////////////////////////////////////////////////////////////////////
  557. // LATER: these structs need work, they are not checked
  558. // created by OleCli32 for OleObj in DefCreateAPI32()
  559. typedef struct _OLEOBJECTOBJ {
  560. POLEOBJECTVTBL32 poov; // &oov, hooked VTBL32
  561. POLEOBJECTVTBL32 poovDef; // &oovDef, default 32=>16 VTBL
  562. LPOLEOBJECT lpoo;
  563. POLECLIENTCLI poc;
  564. OLEOBJECTVTBL32 oovDef; // addresses of atlsDef[] elements
  565. // default 32=>16 thunks to lpoo->lpvtbl entries
  566. THKLS atlsDef[THK_COUNT( OLEOBJECTVTBL32)];
  567. } OLEOBJECTOBJ, *POLEOBJECTOBJ, **PPOLEOBJECTOBJ;
  568. // 16-bit
  569. // created by
  570. typedef struct _OLEOBJECTHND {
  571. LPOLEOBJECTVTBL lpoov; // &oov, hooked 16=>32 VTBL
  572. OLEOBJECTVTBL oov; // addresses of atsl[] elements
  573. THKSL atsl[THK_COUNT( OLEOBJECTVTBL)];// hooked 16=>32 thunks
  574. } OLEOBJECTHND, FAR *LPOLEOBJECTHND;
  575. typedef LPOLEOBJECTHND FAR *LPLPOLEOBJECTHND;
  576. // seen by OleCli32
  577. typedef struct _OLECLIENTOBJ {
  578. POLECLIENTVTBL32 pocv; // &ocv
  579. LPOLECLIENT lpoc; // created by AppCli API
  580. OLECLIENTVTBL32 ocv; // addresses of atls[] elements
  581. // 32=>16 thunks to lpoc->lpvtbl entries
  582. THKLS atls[THK_COUNT( OLECLIENTVTBL32)];
  583. } OLECLIENTOBJ, *POLECLIENTOBJ, **PPOLECLIENTOBJ;
  584. // seen by OleCli
  585. typedef struct _OLESTREAMOBJ {
  586. POLESTREAMVTBL32 postrv; // &ostrv
  587. OLEOBJECTVTBL32 ostrv; // addresses of atls[] elements
  588. // 32=>16 thunks to lpoo->lpvtbl entries
  589. THKLS atls[THK_COUNT( OLEOBJECTVTBL32)];
  590. } OLESTREAMOBJ, *POLESTREAMOBJ, **PPOLESTREAMOBJ;
  591. endif
  592. ;;;=======================================================================
  593. ;;OCL_PENDING_DELETE_OBJECT struct 2t
  594. ;; lpNext DWORD ? ; next struct in the list
  595. ;; lpooFlat LPOLEOBJECT ? ; 16:16 addr of flat thunk object
  596. ;;OCL_PENDING_DELETE_OBJECT ends
  597. ;;OCL_PENDING_DELETE_OBJECT_INITIAL_COUNT = 20 ; should be plenty
  598. ;;
  599. ;=======================================================================
  600. CREATE_BLOCK struct 4t
  601. lpoo LPOLEOBJECT ?
  602. poo POLEOBJECTCLI ?
  603. CREATE_BLOCK ends
  604. _create_block_offset = _dispatcher_offset + SIZE(CREATE_BLOCK)
  605. _create_block_offset_Clone = _create_block_offset+(3*4)
  606. _create_block_offset_CopyFromLink = _create_block_offset+(4*4)
  607. _create_block_offset_CopyFromLink2 = _create_block_offset+(3*4)
  608. _create_block_offset_Create = _create_block_offset+(5*4)
  609. _create_block_offset_CreateInvisible = _create_block_offset+(5*4)
  610. _create_block_offset_CreateFromClip = _create_block_offset+(4*4)
  611. _create_block_offset_CreateFromFile = _create_block_offset+(6*4)
  612. _create_block_offset_CreateLinkFromClip = _create_block_offset+(4*4)
  613. _create_block_offset_CreateLinkFromFile = _create_block_offset+(7*4)
  614. _create_block_offset_LoadFromStream = _create_block_offset+(5*4)
  615. ;-----------------------------------------
  616. _stream_block_offset = _dispatcher_offset + SIZE(OLESTREAMCLI)
  617. _stream_block_offset_SaveToStream =_stream_block_offset+(1*4)
  618. _stream_block_offset_LoadFromStream=_stream_block_offset+SIZE(CREATE_BLOCK)+(5*4)
  619. ;-----------------------------------------
  620. _getbuff_cli_SL_count equ <(_curr_ipfn16 + _curr_ipfn_api)>
  621. _getbuff_cli_LS_count equ <(_curr_ipfn32 + PFN_COUNT( OLEOBJECTVTBL32))>
  622. ;=======================================================================
  623. SERVER_BLOCK struct 2t
  624. lhSvr DWORD ? ; created by OleSvr
  625. lpos LPOLESERVER ? ; alloc'd by OleSvr32
  626. apfn PFN PFN_COUNT( OLESERVERVTBL) DUP (<>)
  627. SERVER_BLOCK ends
  628. SERVER_BLOCK_HEADER_SIZE = 2*4
  629. _server_block_offset = _dispatcher_offset + SIZE(SERVER_BLOCK) + (2*4)
  630. ;-----------------------------------------
  631. SERVERDOC_BLOCK struct 2t
  632. lhDoc DWORD ? ; created by OleSvr
  633. lposd LPOLESERVERDOC ? ; alloc'd by OleSvr32
  634. apfn PFN PFN_COUNT( OLESERVERDOCVTBL) DUP (<>)
  635. SERVERDOC_BLOCK ends
  636. SERVERDOC_BLOCK_HEADER_SIZE = 2*4
  637. _serverdoc_block_offset = _dispatcher_offset + SIZE(SERVERDOC_BLOCK) + (2*4)
  638. ;-----------------------------------------
  639. _getbuff_svr_SL_count equ <(_curr_ipfn16 + _curr_ipfn_api)>
  640. _getbuff_svr_LS_count equ <(_curr_ipfn32)>