/delphi/lib/ActiveX.pas

http://delphi-miranda-plugins.googlecode.com/ · Pascal · 5080 lines · 4016 code · 755 blank · 309 comment · 0 complexity · 23684657b9876376908772f7d4a6f6c8 MD5 · raw file

  1. {*******************************************************}
  2. { }
  3. { CodeGear Delphi Runtime Library }
  4. { }
  5. { Copyright (c) 1995-2008 CodeGear }
  6. { }
  7. {*******************************************************}
  8. {*******************************************************}
  9. { ActiveX / OLE 2 Interface Unit }
  10. {*******************************************************}
  11. unit ActiveX;
  12. interface
  13. uses Messages, Windows;
  14. { Do not WEAKPACKAGE this unit.
  15. This unit requires startup code to initialize constants. }
  16. const
  17. { from WTYPES.H }
  18. MEMCTX_TASK = 1;
  19. MEMCTX_SHARED = 2;
  20. MEMCTX_MACSYSTEM = 3;
  21. MEMCTX_UNKNOWN = -1;
  22. MEMCTX_SAME = -2;
  23. ROTFLAGS_REGISTRATIONKEEPSALIVE = 1;
  24. ROTFLAGS_ALLOWANYCLIENT = 2;
  25. CLSCTX_INPROC_SERVER = 1;
  26. CLSCTX_INPROC_HANDLER = 2;
  27. CLSCTX_LOCAL_SERVER = 4;
  28. CLSCTX_INPROC_SERVER16 = 8;
  29. CLSCTX_REMOTE_SERVER = $10;
  30. CLSCTX_INPROC_HANDLER16 = $20;
  31. CLSCTX_INPROC_SERVERX86 = $40;
  32. CLSCTX_INPROC_HANDLERX86 = $80;
  33. { from OBJBASE }
  34. CLSCTX_ALL = CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER or
  35. CLSCTX_LOCAL_SERVER;
  36. CLSCTX_INPROC = CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER;
  37. CLSCTX_SERVER = CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER;
  38. COM_RIGHTS_EXECUTE = 1;
  39. { from WTYPES.H }
  40. MSHLFLAGS_NORMAL = 0;
  41. MSHLFLAGS_TABLESTRONG = 1;
  42. MSHLFLAGS_TABLEWEAK = 2;
  43. MSHLFLAGS_NOPING = 4;
  44. MSHCTX_LOCAL = 0;
  45. MSHCTX_NOSHAREDMEM = 1;
  46. MSHCTX_DIFFERENTMACHINE = 2;
  47. MSHCTX_INPROC = 3;
  48. DVASPECT_CONTENT = 1;
  49. DVASPECT_THUMBNAIL = 2;
  50. DVASPECT_ICON = 4;
  51. DVASPECT_DOCPRINT = 8;
  52. STGC_DEFAULT = 0;
  53. STGC_OVERWRITE = 1;
  54. STGC_ONLYIFCURRENT = 2;
  55. STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4;
  56. STGMOVE_MOVE = 0;
  57. STGMOVE_COPY = 1;
  58. STGMOVE_SHALLOWCOPY = 2;
  59. STATFLAG_DEFAULT = 0;
  60. STATFLAG_NONAME = 1;
  61. { from OBJIDL.H }
  62. BIND_MAYBOTHERUSER = 1;
  63. BIND_JUSTTESTEXISTENCE = 2;
  64. MKSYS_NONE = 0;
  65. MKSYS_GENERICCOMPOSITE = 1;
  66. MKSYS_FILEMONIKER = 2;
  67. MKSYS_ANTIMONIKER = 3;
  68. MKSYS_ITEMMONIKER = 4;
  69. MKSYS_POINTERMONIKER = 5;
  70. MKRREDUCE_ONE = 3 shl 16;
  71. MKRREDUCE_TOUSER = 2 shl 16;
  72. MKRREDUCE_THROUGHUSER = 1 shl 16;
  73. MKRREDUCE_ALL = 0;
  74. STGTY_STORAGE = 1;
  75. STGTY_STREAM = 2;
  76. STGTY_LOCKBYTES = 3;
  77. STGTY_PROPERTY = 4;
  78. STREAM_SEEK_SET = 0;
  79. STREAM_SEEK_CUR = 1;
  80. STREAM_SEEK_END = 2;
  81. LOCK_WRITE = 1;
  82. LOCK_EXCLUSIVE = 2;
  83. LOCK_ONLYONCE = 4;
  84. ADVF_NODATA = 1;
  85. ADVF_PRIMEFIRST = 2;
  86. ADVF_ONLYONCE = 4;
  87. ADVF_DATAONSTOP = 64;
  88. ADVFCACHE_NOHANDLER = 8;
  89. ADVFCACHE_FORCEBUILTIN = 16;
  90. ADVFCACHE_ONSAVE = 32;
  91. TYMED_HGLOBAL = 1;
  92. TYMED_FILE = 2;
  93. TYMED_ISTREAM = 4;
  94. TYMED_ISTORAGE = 8;
  95. TYMED_GDI = 16;
  96. TYMED_MFPICT = 32;
  97. TYMED_ENHMF = 64;
  98. TYMED_NULL = 0;
  99. DATADIR_GET = 1;
  100. DATADIR_SET = 2;
  101. CALLTYPE_TOPLEVEL = 1;
  102. CALLTYPE_NESTED = 2;
  103. CALLTYPE_ASYNC = 3;
  104. CALLTYPE_TOPLEVEL_CALLPENDING = 4;
  105. CALLTYPE_ASYNC_CALLPENDING = 5;
  106. SERVERCALL_ISHANDLED = 0;
  107. SERVERCALL_REJECTED = 1;
  108. SERVERCALL_RETRYLATER = 2;
  109. PENDINGTYPE_TOPLEVEL = 1;
  110. PENDINGTYPE_NESTED = 2;
  111. PENDINGMSG_CANCELCALL = 0;
  112. PENDINGMSG_WAITNOPROCESS = 1;
  113. PENDINGMSG_WAITDEFPROCESS = 2;
  114. PROPSETFLAG_DEFAULT = 0;
  115. PROPSETFLAG_NONSIMPLE = 1;
  116. PROPSETFLAG_ANSI = 2;
  117. { from OBJBASE.H }
  118. REGCLS_SINGLEUSE = 0;
  119. REGCLS_MULTIPLEUSE = 1;
  120. REGCLS_MULTI_SEPARATE = 2;
  121. REGCLS_SUSPENDED = 4;
  122. MARSHALINTERFACE_MIN = 500;
  123. CWCSTORAGENAME = 32;
  124. STGM_DIRECT = $00000000;
  125. STGM_TRANSACTED = $00010000;
  126. STGM_SIMPLE = $08000000;
  127. STGM_DIRECT_SWMR = $00400000;
  128. STGM_READ = $00000000;
  129. STGM_WRITE = $00000001;
  130. STGM_READWRITE = $00000002;
  131. STGM_SHARE_DENY_NONE = $00000040;
  132. STGM_SHARE_DENY_READ = $00000030;
  133. STGM_SHARE_DENY_WRITE = $00000020;
  134. STGM_SHARE_EXCLUSIVE = $00000010;
  135. STGM_PRIORITY = $00040000;
  136. STGM_DELETEONRELEASE = $04000000;
  137. STGM_NOSCRATCH = $00100000;
  138. STGM_CREATE = $00001000;
  139. STGM_CONVERT = $00020000;
  140. STGM_FAILIFTHERE = $00000000;
  141. FADF_AUTO = $0001; { array is allocated on the stack }
  142. FADF_STATIC = $0002; { array is staticly allocated }
  143. FADF_EMBEDDED = $0004; { array is embedded in a structure }
  144. FADF_FIXEDSIZE = $0010; { array may not be resized or reallocated }
  145. FADF_BSTR = $0100; { an array of BSTRs }
  146. FADF_UNKNOWN = $0200; { an array of IUnknown }
  147. FADF_DISPATCH = $0400; { an array of IDispatch }
  148. FADF_VARIANT = $0800; { an array of VARIANTs }
  149. FADF_RESERVED = $F0E8; { bits reserved for future use }
  150. { from WTYPES.H }
  151. { VARENUM usage key,
  152. [V] - may appear in a VARIANT
  153. [T] - may appear in a TYPEDESC
  154. [P] - may appear in an OLE property set
  155. [S] - may appear in a Safe Array }
  156. VT_EMPTY = 0; { [V] [P] nothing }
  157. VT_NULL = 1; { [V] SQL style Null }
  158. VT_I2 = 2; { [V][T][P] 2 byte signed int }
  159. VT_I4 = 3; { [V][T][P] 4 byte signed int }
  160. VT_R4 = 4; { [V][T][P] 4 byte real }
  161. VT_R8 = 5; { [V][T][P] 8 byte real }
  162. VT_CY = 6; { [V][T][P] currency }
  163. VT_DATE = 7; { [V][T][P] date }
  164. VT_BSTR = 8; { [V][T][P] binary string }
  165. VT_DISPATCH = 9; { [V][T] IDispatch FAR* }
  166. VT_ERROR = 10; { [V][T] SCODE }
  167. VT_BOOL = 11; { [V][T][P] True=-1, False=0 }
  168. VT_VARIANT = 12; { [V][T][P] VARIANT FAR* }
  169. VT_UNKNOWN = 13; { [V][T] IUnknown FAR* }
  170. VT_DECIMAL = 14; { [V][T] [S] 16 byte fixed point }
  171. VT_I1 = 16; { [T] signed char }
  172. VT_UI1 = 17; { [T] unsigned char }
  173. VT_UI2 = 18; { [T] unsigned short }
  174. VT_UI4 = 19; { [T] unsigned long }
  175. VT_I8 = 20; { [T][P] signed 64-bit int }
  176. VT_UI8 = 21; { [T] unsigned 64-bit int }
  177. VT_INT = 22; { [T] signed machine int }
  178. VT_UINT = 23; { [T] unsigned machine int }
  179. VT_VOID = 24; { [T] C style void }
  180. VT_HRESULT = 25; { [T] }
  181. VT_PTR = 26; { [T] pointer type }
  182. VT_SAFEARRAY = 27; { [T] (use VT_ARRAY in VARIANT) }
  183. VT_CARRAY = 28; { [T] C style array }
  184. VT_USERDEFINED = 29; { [T] user defined type }
  185. VT_LPSTR = 30; { [T][P] null terminated string }
  186. VT_LPWSTR = 31; { [T][P] wide null terminated string }
  187. VT_INT_PTR = 37; { [T] signed machine register size width }
  188. VT_UINT_PTR = 38; { [T] unsigned machine register size width }
  189. VT_FILETIME = 64; { [P] FILETIME }
  190. VT_BLOB = 65; { [P] Length prefixed bytes }
  191. VT_STREAM = 66; { [P] Name of the stream follows }
  192. VT_STORAGE = 67; { [P] Name of the storage follows }
  193. VT_STREAMED_OBJECT = 68; { [P] Stream contains an object }
  194. VT_STORED_OBJECT = 69; { [P] Storage contains an object }
  195. VT_BLOB_OBJECT = 70; { [P] Blob contains an object }
  196. VT_CF = 71; { [P] Clipboard format }
  197. VT_CLSID = 72; { [P] A Class ID }
  198. VT_VECTOR = $1000; { [P] simple counted array }
  199. VT_ARRAY = $2000; { [V] SAFEARRAY* }
  200. VT_BYREF = $4000; { [V] }
  201. VT_RESERVED = $8000;
  202. VT_ILLEGAL = $ffff;
  203. VT_ILLEGALMASKED = $0fff;
  204. VT_TYPEMASK = $0fff;
  205. type
  206. PROPID = ULONG;
  207. PPropID = ^TPropID;
  208. TPropID = PROPID;
  209. _tagpropertykey = packed record
  210. fmtid: TGUID;
  211. pid: DWORD;
  212. end;
  213. PROPERTYKEY = _tagpropertykey;
  214. PPropertyKey = ^TPropertyKey;
  215. TPropertyKey = _tagpropertykey;
  216. { from OAIDL.H }
  217. const
  218. TKIND_ENUM = 0;
  219. TKIND_RECORD = 1;
  220. TKIND_MODULE = 2;
  221. TKIND_INTERFACE = 3;
  222. TKIND_DISPATCH = 4;
  223. TKIND_COCLASS = 5;
  224. TKIND_ALIAS = 6;
  225. TKIND_UNION = 7;
  226. TKIND_MAX = 8;
  227. CC_SAFECALL = 0;
  228. CC_CDECL = 1;
  229. CC_PASCAL = 2;
  230. CC_MACPASCAL = 3;
  231. CC_STDCALL = 4;
  232. CC_FPFASTCALL = 5;
  233. CC_SYSCALL = 6;
  234. CC_MPWCDECL = 7;
  235. CC_MPWPASCAL = 8;
  236. CC_MAX = 9;
  237. FUNC_VIRTUAL = 0;
  238. FUNC_PUREVIRTUAL = 1;
  239. FUNC_NONVIRTUAL = 2;
  240. FUNC_STATIC = 3;
  241. FUNC_DISPATCH = 4;
  242. INVOKE_FUNC = 1;
  243. INVOKE_PROPERTYGET = 2;
  244. INVOKE_PROPERTYPUT = 4;
  245. INVOKE_PROPERTYPUTREF = 8;
  246. VAR_PERINSTANCE = 0;
  247. VAR_STATIC = 1;
  248. VAR_CONST = 2;
  249. VAR_DISPATCH = 3;
  250. IMPLTYPEFLAG_FDEFAULT = 1;
  251. IMPLTYPEFLAG_FSOURCE = 2;
  252. IMPLTYPEFLAG_FRESTRICTED = 4;
  253. IMPLTYPEFLAG_FDEFAULTVTABLE = 8;
  254. TYPEFLAG_FAPPOBJECT = $0001;
  255. TYPEFLAG_FCANCREATE = $0002;
  256. TYPEFLAG_FLICENSED = $0004;
  257. TYPEFLAG_FPREDECLID = $0008;
  258. TYPEFLAG_FHIDDEN = $0010;
  259. TYPEFLAG_FCONTROL = $0020;
  260. TYPEFLAG_FDUAL = $0040;
  261. TYPEFLAG_FNONEXTENSIBLE = $0080;
  262. TYPEFLAG_FOLEAUTOMATION = $0100;
  263. TYPEFLAG_FRESTRICTED = $0200;
  264. TYPEFLAG_FAGGREGATABLE = $0400;
  265. TYPEFLAG_FREPLACEABLE = $0800;
  266. TYPEFLAG_FDISPATCHABLE = $1000;
  267. TYPEFLAG_FREVERSEBIND = $2000;
  268. FUNCFLAG_FRESTRICTED = $0001;
  269. FUNCFLAG_FSOURCE = $0002;
  270. FUNCFLAG_FBINDABLE = $0004;
  271. FUNCFLAG_FREQUESTEDIT = $0008;
  272. FUNCFLAG_FDISPLAYBIND = $0010;
  273. FUNCFLAG_FDEFAULTBIND = $0020;
  274. FUNCFLAG_FHIDDEN = $0040;
  275. FUNCFLAG_FUSESGETLASTERROR = $0080;
  276. FUNCFLAG_FDEFAULTCOLLELEM = $0100;
  277. FUNCFLAG_FUIDEFAULT = $0200;
  278. FUNCFLAG_FNONBROWSABLE = $0400;
  279. FUNCFLAG_FREPLACEABLE = $0800;
  280. FUNCFLAG_FIMMEDIATEBIND = $1000;
  281. VARFLAG_FREADONLY = $0001;
  282. VARFLAG_FSOURCE = $0002;
  283. VARFLAG_FBINDABLE = $0004;
  284. VARFLAG_FREQUESTEDIT = $0008;
  285. VARFLAG_FDISPLAYBIND = $0010;
  286. VARFLAG_FDEFAULTBIND = $0020;
  287. VARFLAG_FHIDDEN = $0040;
  288. VARFLAG_FRESTRICTED = $0080;
  289. VARFLAG_FDEFAULTCOLLELEM = $0100;
  290. VARFLAG_FUIDEFAULT = $0200;
  291. VARFLAG_FNONBROWSABLE = $0400;
  292. VARFLAG_FREPLACEABLE = $0800;
  293. VARFLAG_FIMMEDIATEBIND = $1000;
  294. DISPID_VALUE = 0;
  295. DISPID_UNKNOWN = -1;
  296. DISPID_STARTENUM = DISPID_UNKNOWN;
  297. DISPID_PROPERTYPUT = -3;
  298. DISPID_NEWENUM = -4;
  299. DISPID_EVALUATE = -5;
  300. DISPID_CONSTRUCTOR = -6;
  301. DISPID_DESTRUCTOR = -7;
  302. DISPID_COLLECT = -8;
  303. DISPID_WINDOWOBJECT = -5500;
  304. DISPID_LOCATIONOBJECT = -5506;
  305. DISPID_HISTORYOBJECT = -5507;
  306. DISPID_NAVIGATOROBJECT = -5508;
  307. DISPID_SECURITYCTX = -5511;
  308. DISPID_AMBIENT_DLCONTROL = -5512;
  309. DISPID_AMBIENT_USERAGENT = -5513;
  310. DISPID_SECURITYDOMAIN = -5514;
  311. DESCKIND_NONE = 0;
  312. DESCKIND_FUNCDESC = 1;
  313. DESCKIND_VARDESC = 2;
  314. DESCKIND_TYPECOMP = 3;
  315. DESCKIND_IMPLICITAPPOBJ = 4;
  316. DESCKIND_MAX = 5;
  317. SYS_WIN16 = 0;
  318. SYS_WIN32 = 1;
  319. SYS_MAC = 2;
  320. LIBFLAG_FRESTRICTED = 1;
  321. LIBFLAG_FCONTROL = 2;
  322. LIBFLAG_FHIDDEN = 4;
  323. LIBFLAG_FHASDISKIMAGE = 8;
  324. { from OLEAUTO.H }
  325. STDOLE_MAJORVERNUM = 1;
  326. STDOLE_MINORVERNUM = 0;
  327. STDOLE_LCID = 0;
  328. VARIANT_NOVALUEPROP = 1;
  329. VAR_TIMEVALUEONLY = 1;
  330. VAR_DATEVALUEONLY = 2;
  331. MEMBERID_NIL = DISPID_UNKNOWN;
  332. ID_DEFAULTINST = -2;
  333. DISPATCH_METHOD = $1;
  334. DISPATCH_PROPERTYGET = $2;
  335. DISPATCH_PROPERTYPUT = $4;
  336. DISPATCH_PROPERTYPUTREF = $8;
  337. DISPATCH_CONSTRUCT = $4000;
  338. { from OAIDL.H }
  339. IDLFLAG_NONE = 0;
  340. IDLFLAG_FIN = 1;
  341. IDLFLAG_FOUT = 2;
  342. IDLFLAG_FLCID = 4;
  343. IDLFLAG_FRETVAL = 8;
  344. PARAMFLAG_NONE = $00;
  345. PARAMFLAG_FIN = $01;
  346. PARAMFLAG_FOUT = $02;
  347. PARAMFLAG_FLCID = $04;
  348. PARAMFLAG_FRETVAL = $08;
  349. PARAMFLAG_FOPT = $10;
  350. PARAMFLAG_FHASDEFAULT = $20;
  351. { from OLE2.H }
  352. OLEIVERB_PRIMARY = 0;
  353. OLEIVERB_SHOW = -1;
  354. OLEIVERB_OPEN = -2;
  355. OLEIVERB_HIDE = -3;
  356. OLEIVERB_UIACTIVATE = -4;
  357. OLEIVERB_INPLACEACTIVATE = -5;
  358. OLEIVERB_DISCARDUNDOSTATE = -6;
  359. EMBDHLP_INPROC_HANDLER = $00000000;
  360. EMBDHLP_INPROC_SERVER = $00000001;
  361. EMBDHLP_CREATENOW = $00000000;
  362. EMBDHLP_DELAYCREATE = $00010000;
  363. OLECREATE_LEAVERUNNING = $00000001;
  364. { from OLEIDL.H }
  365. type
  366. BORDERWIDTHS = TRect;
  367. PBorderWidths = ^TBorderWidths;
  368. TBorderWidths = BORDERWIDTHS;
  369. const
  370. UPDFCACHE_NODATACACHE = 1;
  371. UPDFCACHE_ONSAVECACHE = 2;
  372. UPDFCACHE_ONSTOPCACHE = 4;
  373. UPDFCACHE_NORMALCACHE = 8;
  374. UPDFCACHE_IFBLANK = $10;
  375. UPDFCACHE_ONLYIFBLANK = DWORD($80000000);
  376. UPDFCACHE_IFBLANKORONSAVECACHE = UPDFCACHE_IFBLANK or UPDFCACHE_ONSAVECACHE;
  377. UPDFCACHE_ALL = not UPDFCACHE_ONLYIFBLANK;
  378. UPDFCACHE_ALLBUTNODATACACHE = UPDFCACHE_ALL and not UPDFCACHE_NODATACACHE;
  379. DISCARDCACHE_SAVEIFDIRTY = 0;
  380. DISCARDCACHE_NOSAVE = 1;
  381. OLEGETMONIKER_ONLYIFTHERE = 1;
  382. OLEGETMONIKER_FORCEASSIGN = 2;
  383. OLEGETMONIKER_UNASSIGN = 3;
  384. OLEGETMONIKER_TEMPFORUSER = 4;
  385. OLEWHICHMK_CONTAINER = 1;
  386. OLEWHICHMK_OBJREL = 2;
  387. OLEWHICHMK_OBJFULL = 3;
  388. USERCLASSTYPE_FULL = 1;
  389. USERCLASSTYPE_SHORT = 2;
  390. USERCLASSTYPE_APPNAME = 3;
  391. OLEMISC_RECOMPOSEONRESIZE = 1;
  392. OLEMISC_ONLYICONIC = 2;
  393. OLEMISC_INSERTNOTREPLACE = 4;
  394. OLEMISC_STATIC = 8;
  395. OLEMISC_CANTLINKINSIDE = $10;
  396. OLEMISC_CANLINKBYOLE1 = $20;
  397. OLEMISC_ISLINKOBJECT = $40;
  398. OLEMISC_INSIDEOUT = $80;
  399. OLEMISC_ACTIVATEWHENVISIBLE = $100;
  400. OLEMISC_RENDERINGISDEVICEINDEPENDENT = $200;
  401. OLEMISC_INVISIBLEATRUNTIME = $400;
  402. OLEMISC_ALWAYSRUN = $800;
  403. OLEMISC_ACTSLIKEBUTTON = $1000;
  404. OLEMISC_ACTSLIKELABEL = $2000;
  405. OLEMISC_NOUIACTIVATE = $4000;
  406. OLEMISC_ALIGNABLE = $8000;
  407. OLEMISC_SIMPLEFRAME = $10000;
  408. OLEMISC_SETCLIENTSITEFIRST = $20000;
  409. OLEMISC_IMEMODE = $40000;
  410. OLEMISC_IGNOREACTIVATEWHENVISIBLE = $80000;
  411. OLEMISC_WANTSTOMENUMERGE = $100000;
  412. OLEMISC_SUPPORTSMULTILEVELUNDO = $200000;
  413. OLECLOSE_SAVEIFDIRTY = 0;
  414. OLECLOSE_NOSAVE = 1;
  415. OLECLOSE_PROMPTSAVE = 2;
  416. OLERENDER_NONE = 0;
  417. OLERENDER_DRAW = 1;
  418. OLERENDER_FORMAT = 2;
  419. OLERENDER_ASIS = 3;
  420. OLEUPDATE_ALWAYS = 1;
  421. OLEUPDATE_ONCALL = 3;
  422. OLELINKBIND_EVENIFCLASSDIFF = 1;
  423. BINDSPEED_INDEFINITE = 1;
  424. BINDSPEED_MODERATE = 2;
  425. BINDSPEED_IMMEDIATE = 3;
  426. OLECONTF_EMBEDDINGS = 1;
  427. OLECONTF_LINKS = 2;
  428. OLECONTF_OTHERS = 4;
  429. OLECONTF_ONLYUSER = 8;
  430. OLECONTF_ONLYIFRUNNING = 16;
  431. DROPEFFECT_NONE = 0;
  432. DROPEFFECT_COPY = 1;
  433. DROPEFFECT_MOVE = 2;
  434. DROPEFFECT_LINK = 4;
  435. DROPEFFECT_SCROLL = DWORD($80000000);
  436. MK_ALT = $20;
  437. DD_DEFSCROLLINSET = 11;
  438. DD_DEFSCROLLDELAY = 50;
  439. DD_DEFSCROLLINTERVAL = 50;
  440. DD_DEFDRAGDELAY = 200;
  441. DD_DEFDRAGMINDIST = 2;
  442. OLEVERBATTRIB_NEVERDIRTIES = 1;
  443. OLEVERBATTRIB_ONCONTAINERMENU = 2;
  444. { from OLECTL.H}
  445. { OLE control status codes }
  446. CTL_E_ILLEGALFUNCTIONCALL = HRESULT($800A0000) + 5;
  447. CTL_E_OVERFLOW = HRESULT($800A0000) + 6;
  448. CTL_E_OUTOFMEMORY = HRESULT($800A0000) + 7;
  449. CTL_E_DIVISIONBYZERO = HRESULT($800A0000) + 11;
  450. CTL_E_OUTOFSTRINGSPACE = HRESULT($800A0000) + 14;
  451. CTL_E_OUTOFSTACKSPACE = HRESULT($800A0000) + 28;
  452. CTL_E_BADFILENAMEORNUMBER = HRESULT($800A0000) + 52;
  453. CTL_E_FILENOTFOUND = HRESULT($800A0000) + 53;
  454. CTL_E_BADFILEMODE = HRESULT($800A0000) + 54;
  455. CTL_E_FILEALREADYOPEN = HRESULT($800A0000) + 55;
  456. CTL_E_DEVICEIOERROR = HRESULT($800A0000) + 57;
  457. CTL_E_FILEALREADYEXISTS = HRESULT($800A0000) + 58;
  458. CTL_E_BADRECORDLENGTH = HRESULT($800A0000) + 59;
  459. CTL_E_DISKFULL = HRESULT($800A0000) + 61;
  460. CTL_E_BADRECORDNUMBER = HRESULT($800A0000) + 63;
  461. CTL_E_BADFILENAME = HRESULT($800A0000) + 64;
  462. CTL_E_TOOMANYFILES = HRESULT($800A0000) + 67;
  463. CTL_E_DEVICEUNAVAILABLE = HRESULT($800A0000) + 68;
  464. CTL_E_PERMISSIONDENIED = HRESULT($800A0000) + 70;
  465. CTL_E_DISKNOTREADY = HRESULT($800A0000) + 71;
  466. CTL_E_PATHFILEACCESSERROR = HRESULT($800A0000) + 75;
  467. CTL_E_PATHNOTFOUND = HRESULT($800A0000) + 76;
  468. CTL_E_INVALIDPATTERNSTRING = HRESULT($800A0000) + 93;
  469. CTL_E_INVALIDUSEOFNULL = HRESULT($800A0000) + 94;
  470. CTL_E_INVALIDFILEFORMAT = HRESULT($800A0000) + 321;
  471. CTL_E_INVALIDPROPERTYVALUE = HRESULT($800A0000) + 380;
  472. CTL_E_INVALIDPROPERTYARRAYINDEX = HRESULT($800A0000) + 381;
  473. CTL_E_SETNOTSUPPORTEDATRUNTIME = HRESULT($800A0000) + 382;
  474. CTL_E_SETNOTSUPPORTED = HRESULT($800A0000) + 383;
  475. CTL_E_NEEDPROPERTYARRAYINDEX = HRESULT($800A0000) + 385;
  476. CTL_E_SETNOTPERMITTED = HRESULT($800A0000) + 387;
  477. CTL_E_GETNOTSUPPORTEDATRUNTIME = HRESULT($800A0000) + 393;
  478. CTL_E_GETNOTSUPPORTED = HRESULT($800A0000) + 394;
  479. CTL_E_PROPERTYNOTFOUND = HRESULT($800A0000) + 422;
  480. CTL_E_INVALIDCLIPBOARDFORMAT = HRESULT($800A0000) + 460;
  481. CTL_E_INVALIDPICTURE = HRESULT($800A0000) + 481;
  482. CTL_E_PRINTERERROR = HRESULT($800A0000) + 482;
  483. CTL_E_CANTSAVEFILETOTEMP = HRESULT($800A0000) + 735;
  484. CTL_E_SEARCHTEXTNOTFOUND = HRESULT($800A0000) + 744;
  485. CTL_E_REPLACEMENTSTOOLONG = HRESULT($800A0000) + 746;
  486. CTL_E_CUSTOM_FIRST = HRESULT($800A0000) + 600;
  487. { IClassFactory2 status codes }
  488. CLASS_E_NOTLICENSED = CLASSFACTORY_E_FIRST + 2;
  489. { IConnectionPoint status codes }
  490. CONNECT_E_FIRST = HRESULT($80040200);
  491. CONNECT_E_LAST = HRESULT($8004020F);
  492. CONNECT_S_FIRST = $00040200;
  493. CONNECT_S_LAST = $0004020F;
  494. CONNECT_E_NOCONNECTION = CONNECT_E_FIRST + 0;
  495. CONNECT_E_ADVISELIMIT = CONNECT_E_FIRST + 1;
  496. CONNECT_E_CANNOTCONNECT = CONNECT_E_FIRST + 2;
  497. CONNECT_E_OVERRIDDEN = CONNECT_E_FIRST + 3;
  498. { DllRegisterServer/DllUnregisterServer status codes }
  499. SELFREG_E_FIRST = HRESULT($80040200);
  500. SELFREG_E_LAST = HRESULT($80040200);
  501. SELFREG_S_FIRST = $00040200;
  502. SELFREG_S_LAST = $00040200;
  503. SELFREG_E_TYPELIB = SELFREG_E_FIRST + 0;
  504. SELFREG_E_CLASS = SELFREG_E_FIRST + 1;
  505. { IPerPropertyBrowsing status codes }
  506. PERPROP_E_FIRST = HRESULT($80040200);
  507. PERPROP_E_LAST = HRESULT($8004020F);
  508. PERPROP_S_FIRST = $00040200;
  509. PERPROP_S_LAST = $0004020F;
  510. PERPROP_E_NOPAGEAVAILABLE = PERPROP_E_FIRST + 0;
  511. { Additional OLEIVERB constants }
  512. OLEIVERB_PROPERTIES = -7;
  513. { Additional variant type tags for property sets }
  514. VT_STREAMED_PROPSET = 73; { Stream contains a property set }
  515. VT_STORED_PROPSET = 74; { Storage contains a property set }
  516. VT_BLOB_PROPSET = 75; { Blob contains a property set }
  517. VT_VERBOSE_ENUM = 76; { Enum value with text string }
  518. { Variant type tags that are just aliases for others }
  519. VT_COLOR = VT_I4;
  520. VT_XPOS_PIXELS = VT_I4;
  521. VT_YPOS_PIXELS = VT_I4;
  522. VT_XSIZE_PIXELS = VT_I4;
  523. VT_YSIZE_PIXELS = VT_I4;
  524. VT_XPOS_HIMETRIC = VT_I4;
  525. VT_YPOS_HIMETRIC = VT_I4;
  526. VT_XSIZE_HIMETRIC = VT_I4;
  527. VT_YSIZE_HIMETRIC = VT_I4;
  528. VT_TRISTATE = VT_I2;
  529. VT_OPTEXCLUSIVE = VT_BOOL;
  530. VT_FONT = VT_DISPATCH;
  531. VT_PICTURE = VT_DISPATCH;
  532. VT_HANDLE = VT_I4;
  533. { Reflected window message IDs }
  534. OCM__BASE = WM_USER + $1C00;
  535. OCM_COMMAND = OCM__BASE + WM_COMMAND;
  536. OCM_CTLCOLORBTN = OCM__BASE + WM_CTLCOLORBTN;
  537. OCM_CTLCOLOREDIT = OCM__BASE + WM_CTLCOLOREDIT;
  538. OCM_CTLCOLORDLG = OCM__BASE + WM_CTLCOLORDLG;
  539. OCM_CTLCOLORLISTBOX = OCM__BASE + WM_CTLCOLORLISTBOX;
  540. OCM_CTLCOLORMSGBOX = OCM__BASE + WM_CTLCOLORMSGBOX;
  541. OCM_CTLCOLORSCROLLBAR = OCM__BASE + WM_CTLCOLORSCROLLBAR;
  542. OCM_CTLCOLORSTATIC = OCM__BASE + WM_CTLCOLORSTATIC;
  543. OCM_DRAWITEM = OCM__BASE + WM_DRAWITEM;
  544. OCM_MEASUREITEM = OCM__BASE + WM_MEASUREITEM;
  545. OCM_DELETEITEM = OCM__BASE + WM_DELETEITEM;
  546. OCM_VKEYTOITEM = OCM__BASE + WM_VKEYTOITEM;
  547. OCM_CHARTOITEM = OCM__BASE + WM_CHARTOITEM;
  548. OCM_COMPAREITEM = OCM__BASE + WM_COMPAREITEM;
  549. OCM_HSCROLL = OCM__BASE + WM_HSCROLL;
  550. OCM_VSCROLL = OCM__BASE + WM_VSCROLL;
  551. OCM_PARENTNOTIFY = OCM__BASE + WM_PARENTNOTIFY;
  552. OCM_NOTIFY = OCM__BASE + WM_NOTIFY;
  553. { from OCIDL.H }
  554. { TControlInfo.dwFlags masks }
  555. CTRLINFO_EATS_RETURN = 1; { Control doesn't send Return to container }
  556. CTRLINFO_EATS_ESCAPE = 2; { Control doesn't send Escape to container }
  557. { IOleControlSite.TransformCoords flags }
  558. XFORMCOORDS_POSITION = 1;
  559. XFORMCOORDS_SIZE = 2;
  560. XFORMCOORDS_HIMETRICTOCONTAINER = 4;
  561. XFORMCOORDS_CONTAINERTOHIMETRIC = 8;
  562. { IPropertyPageSite.OnStatusChange flags }
  563. PROPPAGESTATUS_DIRTY = 1; { Values in page have changed }
  564. PROPPAGESTATUS_VALIDATE = 2; { Appropriate time to validate/apply }
  565. PROPPAGESTATUS_CLEAN = 4;
  566. { Picture attributes }
  567. PICTURE_SCALABLE = 1;
  568. PICTURE_TRANSPARENT = 2;
  569. { from OLECTL.H }
  570. { TPictDesc.picType values }
  571. PICTYPE_UNINITIALIZED = -1;
  572. PICTYPE_NONE = 0;
  573. PICTYPE_BITMAP = 1;
  574. PICTYPE_METAFILE = 2;
  575. PICTYPE_ICON = 3;
  576. PICTYPE_ENHMETAFILE = 4;
  577. { Standard dispatch ID constants }
  578. DISPID_AUTOSIZE = -500;
  579. DISPID_BACKCOLOR = -501;
  580. DISPID_BACKSTYLE = -502;
  581. DISPID_BORDERCOLOR = -503;
  582. DISPID_BORDERSTYLE = -504;
  583. DISPID_BORDERWIDTH = -505;
  584. DISPID_DRAWMODE = -507;
  585. DISPID_DRAWSTYLE = -508;
  586. DISPID_DRAWWIDTH = -509;
  587. DISPID_FILLCOLOR = -510;
  588. DISPID_FILLSTYLE = -511;
  589. DISPID_FONT = -512;
  590. DISPID_FORECOLOR = -513;
  591. DISPID_ENABLED = -514;
  592. DISPID_HWND = -515;
  593. DISPID_TABSTOP = -516;
  594. DISPID_TEXT = -517;
  595. DISPID_CAPTION = -518;
  596. DISPID_BORDERVISIBLE = -519;
  597. DISPID_APPEARANCE = -520;
  598. DISPID_MOUSEPOINTER = -521;
  599. DISPID_MOUSEICON = -522;
  600. DISPID_PICTURE = -523;
  601. DISPID_VALID = -524;
  602. DISPID_READYSTATE = -525;
  603. DISPID_REFRESH = -550;
  604. DISPID_DOCLICK = -551;
  605. DISPID_ABOUTBOX = -552;
  606. DISPID_CLICK = -600;
  607. DISPID_DBLCLICK = -601;
  608. DISPID_KEYDOWN = -602;
  609. DISPID_KEYPRESS = -603;
  610. DISPID_KEYUP = -604;
  611. DISPID_MOUSEDOWN = -605;
  612. DISPID_MOUSEMOVE = -606;
  613. DISPID_MOUSEUP = -607;
  614. DISPID_ERROREVENT = -608;
  615. DISPID_READYSTATECHANGE = -609;
  616. { DISPID_THIS is from dispex.h }
  617. DISPID_THIS = -613;
  618. DISPID_AMBIENT_BACKCOLOR = -701;
  619. DISPID_AMBIENT_DISPLAYNAME = -702;
  620. DISPID_AMBIENT_FONT = -703;
  621. DISPID_AMBIENT_FORECOLOR = -704;
  622. DISPID_AMBIENT_LOCALEID = -705;
  623. DISPID_AMBIENT_MESSAGEREFLECT = -706;
  624. DISPID_AMBIENT_SCALEUNITS = -707;
  625. DISPID_AMBIENT_TEXTALIGN = -708;
  626. DISPID_AMBIENT_USERMODE = -709;
  627. DISPID_AMBIENT_UIDEAD = -710;
  628. DISPID_AMBIENT_SHOWGRABHANDLES = -711;
  629. DISPID_AMBIENT_SHOWHATCHING = -712;
  630. DISPID_AMBIENT_DISPLAYASDEFAULT = -713;
  631. DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
  632. DISPID_AMBIENT_AUTOCLIP = -715;
  633. DISPID_AMBIENT_APPEARANCE = -716;
  634. DISPID_AMBIENT_PALETTE = -726;
  635. DISPID_AMBIENT_TRANSFERPRIORITY = -728;
  636. DISPID_Name = -800;
  637. DISPID_Delete = -801;
  638. DISPID_Object = -802;
  639. DISPID_Parent = -803;
  640. { Dispatch ID constants for fonts }
  641. DISPID_FONT_NAME = 0;
  642. DISPID_FONT_SIZE = 2;
  643. DISPID_FONT_BOLD = 3;
  644. DISPID_FONT_ITALIC = 4;
  645. DISPID_FONT_UNDER = 5;
  646. DISPID_FONT_STRIKE = 6;
  647. DISPID_FONT_WEIGHT = 7;
  648. DISPID_FONT_CHARSET = 8;
  649. { Dispatch ID constants for pictures }
  650. DISPID_PICT_HANDLE = 0;
  651. DISPID_PICT_HPAL = 2;
  652. DISPID_PICT_TYPE = 3;
  653. DISPID_PICT_WIDTH = 4;
  654. DISPID_PICT_HEIGHT = 5;
  655. DISPID_PICT_RENDER = 6;
  656. // Reserved global Property IDs
  657. PID_DICTIONARY = 0;
  658. PID_CODEPAGE = $1;
  659. PID_FIRST_USABLE = $2;
  660. PID_FIRST_NAME_DEFAULT = $fff;
  661. PID_LOCALE = $80000000;
  662. PID_MODIFY_TIME = $80000001;
  663. PID_SECURITY = $80000002;
  664. PID_ILLEGAL = $ffffffff;
  665. // Property IDs for the SummaryInformation Property Set
  666. PIDSI_TITLE = $00000002; // VT_LPSTR
  667. PIDSI_SUBJECT = $00000003; // VT_LPSTR
  668. PIDSI_AUTHOR = $00000004; // VT_LPSTR
  669. PIDSI_KEYWORDS = $00000005; // VT_LPSTR
  670. PIDSI_COMMENTS = $00000006; // VT_LPSTR
  671. PIDSI_TEMPLATE = $00000007; // VT_LPSTR
  672. PIDSI_LASTAUTHOR = $00000008; // VT_LPSTR
  673. PIDSI_REVNUMBER = $00000009; // VT_LPSTR
  674. PIDSI_EDITTIME = $0000000a; // VT_FILETIME (UTC)
  675. PIDSI_LASTPRINTED = $0000000b; // VT_FILETIME (UTC)
  676. PIDSI_CREATE_DTM = $0000000c; // VT_FILETIME (UTC)
  677. PIDSI_LASTSAVE_DTM = $0000000d; // VT_FILETIME (UTC)
  678. PIDSI_PAGECOUNT = $0000000e; // VT_I4
  679. PIDSI_WORDCOUNT = $0000000f; // VT_I4
  680. PIDSI_CHARCOUNT = $00000010; // VT_I4
  681. PIDSI_THUMBNAIL = $00000011; // VT_CF
  682. PIDSI_APPNAME = $00000012; // VT_LPSTR
  683. PIDSI_DOC_SECURITY = $00000013; // VT_I4
  684. PRSPEC_INVALID = $ffffffff;
  685. PRSPEC_LPWSTR = 0;
  686. PRSPEC_PROPID = 1;
  687. { from WTYPES.H }
  688. { Result code }
  689. type
  690. PHResult = ^HResult;
  691. PSCODE = ^Integer;
  692. SCODE = Integer;
  693. { VT_INT and VT_UINT }
  694. PSYSINT = ^SYSINT;
  695. SYSINT = Integer;
  696. PSYSUINT = ^SYSUINT;
  697. SYSUINT = LongWord;
  698. PResultList = ^TResultList;
  699. TResultList = array[0..65535] of HRESULT;
  700. { Unknown lists }
  701. PUnknownList = ^TUnknownList;
  702. TUnknownList = array[0..65535] of IUnknown;
  703. { OLE character and string types }
  704. TOleChar = WideChar;
  705. POleStr = PWideChar;
  706. PPOleStr = ^POleStr;
  707. POleStrList = ^TOleStrList;
  708. TOleStrList = array[0..65535] of POleStr;
  709. { 64-bit large integer }
  710. Largeint = Int64;
  711. { 64-bit large unsigned integer }
  712. PLargeuint = ^Largeuint;
  713. Largeuint = UInt64;
  714. { Interface ID }
  715. PIID = PGUID;
  716. TIID = TGUID;
  717. { Class ID }
  718. PCLSID = PGUID;
  719. TCLSID = TGUID;
  720. { Object ID }
  721. PObjectID = ^TObjectID;
  722. _OBJECTID = record
  723. Lineage: TGUID;
  724. Uniquifier: Longint;
  725. end;
  726. TObjectID = _OBJECTID;
  727. OBJECTID = TObjectID;
  728. { Locale ID }
  729. TLCID = DWORD;
  730. { Format ID }
  731. FMTID = TGUID;
  732. PFmtID = ^TFmtID;
  733. TFmtID = TGUID;
  734. { OLE control types }
  735. PTextMetricOle = PTextMetricW;
  736. TTextMetricOle = TTextMetricW;
  737. OLE_COLOR = DWORD;
  738. TOleColor = OLE_COLOR;
  739. PCoServerInfo = ^TCoServerInfo;
  740. _COSERVERINFO = record
  741. dwReserved1: Longint;
  742. pwszName: LPWSTR;
  743. pAuthInfo: Pointer;
  744. dwReserved2: Longint;
  745. end;
  746. TCoServerInfo = _COSERVERINFO;
  747. COSERVERINFO = TCoServerInfo;
  748. PMultiQI = ^TMultiQI;
  749. tagMULTI_QI = record
  750. IID: PIID;
  751. Itf: IUnknown;
  752. hr: HRESULT;
  753. end;
  754. TMultiQI = tagMULTI_QI;
  755. MULTI_QI = TMultiQI;
  756. PMultiQIArray = ^TMultiQIArray;
  757. TMultiQIArray = array[0..65535] of TMultiQI;
  758. { from OAIDL.H }
  759. PSafeArrayBound = ^TSafeArrayBound;
  760. tagSAFEARRAYBOUND = record
  761. cElements: Longint;
  762. lLbound: Longint;
  763. end;
  764. TSafeArrayBound = tagSAFEARRAYBOUND;
  765. SAFEARRAYBOUND = TSafeArrayBound;
  766. PSafeArray = ^TSafeArray;
  767. tagSAFEARRAY = record
  768. cDims: Word;
  769. fFeatures: Word;
  770. cbElements: Longint;
  771. cLocks: Longint;
  772. pvData: Pointer;
  773. rgsabound: array[0..0] of TSafeArrayBound;
  774. end;
  775. TSafeArray = tagSAFEARRAY;
  776. SAFEARRAY = TSafeArray;
  777. TOleDate = Double;
  778. POleDate = ^TOleDate;
  779. TOleBool = WordBool;
  780. POleBool = ^TOleBool;
  781. TVarType = Word;
  782. TOldOleEnum = type Integer;
  783. TOleEnum = type LongWord;
  784. { from OLECTL.H }
  785. OLE_XPOS_PIXELS = Longint;
  786. OLE_YPOS_PIXELS = Longint;
  787. OLE_XSIZE_PIXELS = Longint;
  788. OLE_YSIZE_PIXELS = Longint;
  789. OLE_XPOS_HIMETRIC = Longint;
  790. OLE_YPOS_HIMETRIC = Longint;
  791. OLE_XSIZE_HIMETRIC = Longint;
  792. OLE_YSIZE_HIMETRIC = Longint;
  793. OLE_XPOS_CONTAINER = Single;
  794. OLE_YPOS_CONTAINER = Single;
  795. OLE_XSIZE_CONTAINER = Single;
  796. OLE_YSIZE_CONTAINER = Single;
  797. OLE_TRISTATE = SmallInt;
  798. const
  799. triUnchecked = 0;
  800. triChecked = 1;
  801. triGray = 2;
  802. type
  803. OLE_OPTEXCLUSIVE = WordBool;
  804. OLE_CANCELBOOL = WordBool;
  805. OLE_ENABLEDEFAULTBOOL = WordBool;
  806. OLE_HANDLE = LongWord;
  807. FONTNAME = WideString;
  808. FONTSIZE = Currency;
  809. FONTBOLD = WordBool;
  810. FONTITALIC = WordBool;
  811. FONTUNDERSCORE = WordBool;
  812. FONTSTRIKETHROUGH = WordBool;
  813. { Registration function types }
  814. TDLLRegisterServer = function: HResult stdcall;
  815. TDLLUnregisterServer = function: HResult stdcall;
  816. { from OCIDL.H }
  817. { TPointF structure }
  818. PPointF = ^TPointF;
  819. tagPOINTF = record
  820. x: Single;
  821. y: Single;
  822. end;
  823. TPointF = tagPOINTF;
  824. POINTF = TPointF;
  825. { TControlInfo structure }
  826. PControlInfo = ^TControlInfo;
  827. tagCONTROLINFO = record
  828. cb: Longint;
  829. hAccel: HAccel;
  830. cAccel: Word;
  831. dwFlags: Longint;
  832. end;
  833. TControlInfo = tagCONTROLINFO;
  834. CONTROLINFO = TControlInfo;
  835. { from OBJIDL.H }
  836. { Forward declarations }
  837. IStream = interface;
  838. IRunningObjectTable = interface;
  839. IEnumString = interface;
  840. IMoniker = interface;
  841. IAdviseSink = interface;
  842. ITypeInfo = interface;
  843. ITypeInfo2 = interface;
  844. ITypeComp = interface;
  845. ITypeLib = interface;
  846. ITypeLib2 = interface;
  847. IEnumOLEVERB = interface;
  848. IOleInPlaceActiveObject = interface;
  849. IOleControl = interface;
  850. IOleControlSite = interface;
  851. ISimpleFrameSite = interface;
  852. IPersistStreamInit = interface;
  853. IPersistPropertyBag = interface;
  854. IPropertyNotifySink = interface;
  855. IProvideClassInfo = interface;
  856. IConnectionPointContainer = interface;
  857. IEnumConnectionPoints = interface;
  858. IConnectionPoint = interface;
  859. IEnumConnections = interface;
  860. IClassFactory2 = interface;
  861. ISpecifyPropertyPages = interface;
  862. IPerPropertyBrowsing = interface;
  863. IPropertyPageSite = interface;
  864. IPropertyPage = interface;
  865. IPropertyPage2 = interface;
  866. IPropertySetStorage = interface;
  867. IPropertyStorage = interface;
  868. IEnumSTATPROPSTG = interface;
  869. IEnumSTATPROPSETSTG = interface;
  870. IGlobalInterfaceTable = interface;
  871. { IClassFactory interface }
  872. IClassFactory = interface(IUnknown)
  873. ['{00000001-0000-0000-C000-000000000046}']
  874. function CreateInstance(const unkOuter: IUnknown; const iid: TIID;
  875. out obj): HResult; stdcall;
  876. function LockServer(fLock: BOOL): HResult; stdcall;
  877. end;
  878. { IMarshal interface }
  879. IMarshal = interface(IUnknown)
  880. ['{00000003-0000-0000-C000-000000000046}']
  881. function GetUnmarshalClass(const iid: TIID; pv: Pointer;
  882. dwDestContext: Longint; pvDestContext: Pointer; mshlflags: Longint;
  883. out cid: TCLSID): HResult; stdcall;
  884. function GetMarshalSizeMax(const iid: TIID; pv: Pointer;
  885. dwDestContext: Longint; pvDestContext: Pointer; mshlflags: Longint;
  886. out size: Longint): HResult; stdcall;
  887. function MarshalInterface(const stm: IStream; const iid: TIID; pv: Pointer;
  888. dwDestContext: Longint; pvDestContext: Pointer;
  889. mshlflags: Longint): HResult; stdcall;
  890. function UnmarshalInterface(const stm: IStream; const iid: TIID;
  891. out pv): HResult; stdcall;
  892. function ReleaseMarshalData(const stm: IStream): HResult;
  893. stdcall;
  894. function DisconnectObject(dwReserved: Longint): HResult;
  895. stdcall;
  896. end;
  897. { IMalloc interface }
  898. IMalloc = interface(IUnknown)
  899. ['{00000002-0000-0000-C000-000000000046}']
  900. function Alloc(cb: Longint): Pointer; stdcall;
  901. function Realloc(pv: Pointer; cb: Longint): Pointer; stdcall;
  902. procedure Free(pv: Pointer); stdcall;
  903. function GetSize(pv: Pointer): Longint; stdcall;
  904. function DidAlloc(pv: Pointer): Integer; stdcall;
  905. procedure HeapMinimize; stdcall;
  906. end;
  907. { IMallocSpy interface }
  908. IMallocSpy = interface(IUnknown)
  909. ['{0000001D-0000-0000-C000-000000000046}']
  910. function PreAlloc(cbRequest: Longint): Longint; stdcall;
  911. function PostAlloc(pActual: Pointer): Pointer; stdcall;
  912. function PreFree(pRequest: Pointer; fSpyed: BOOL): Pointer; stdcall;
  913. procedure PostFree(fSpyed: BOOL); stdcall;
  914. function PreRealloc(pRequest: Pointer; cbRequest: Longint;
  915. out ppNewRequest: Pointer; fSpyed: BOOL): Longint; stdcall;
  916. function PostRealloc(pActual: Pointer; fSpyed: BOOL): Pointer; stdcall;
  917. function PreGetSize(pRequest: Pointer; fSpyed: BOOL): Pointer; stdcall;
  918. function PostGetSize(pActual: Longint; fSpyed: BOOL): Longint; stdcall;
  919. function PreDidAlloc(pRequest: Pointer; fSpyed: BOOL): Pointer; stdcall;
  920. function PostDidAlloc(pRequest: Pointer; fSpyed: BOOL; fActual: Integer): Integer; stdcall;
  921. procedure PreHeapMinimize; stdcall;
  922. procedure PostHeapMinimize; stdcall;
  923. end;
  924. { IStdMarshalInfo interface }
  925. IStdMarshalInfo = interface(IUnknown)
  926. ['{00000018-0000-0000-C000-000000000046}']
  927. function GetClassForHandler(dwDestContext: Longint; pvDestContext: Pointer;
  928. out clsid: TCLSID): HResult; stdcall;
  929. end;
  930. { IExternalConnection interface }
  931. IExternalConnection = interface(IUnknown)
  932. ['{00000019-0000-0000-C000-000000000046}']
  933. function AddConnection(extconn: Longint; reserved: Longint): Longint;
  934. stdcall;
  935. function ReleaseConnection(extconn: Longint; reserved: Longint;
  936. fLastReleaseCloses: BOOL): Longint; stdcall;
  937. end;
  938. { IWeakRef interface }
  939. IWeakRef = interface(IUnknown)
  940. ['{A35E20C2-837D-11D0-9E9F-00A02457621F}']
  941. function ChangeWeakCount(delta: Longint): Longint; stdcall;
  942. function ReleaseKeepAlive(const unkReleased: IUnknown;
  943. reserved: Longint): Longint; stdcall;
  944. end;
  945. { IEnumUnknown interface }
  946. IEnumUnknown = interface(IUnknown)
  947. ['{00000100-0000-0000-C000-000000000046}']
  948. function Next(celt: Longint; out elt;
  949. pceltFetched: PLongint): HResult; stdcall;
  950. function Skip(celt: Longint): HResult; stdcall;
  951. function Reset: HResult; stdcall;
  952. function Clone(out enm: IEnumUnknown): HResult; stdcall;
  953. end;
  954. { IBindCtx interface }
  955. PBindOpts = ^TBindOpts;
  956. tagBIND_OPTS = record
  957. cbStruct: Longint;
  958. grfFlags: Longint;
  959. grfMode: Longint;
  960. dwTickCountDeadline: Longint;
  961. end;
  962. TBindOpts = tagBIND_OPTS;
  963. BIND_OPTS = TBindOpts;
  964. IBindCtx = interface(IUnknown)
  965. ['{0000000E-0000-0000-C000-000000000046}']
  966. function RegisterObjectBound(const unk: IUnknown): HResult; stdcall;
  967. function RevokeObjectBound(const unk: IUnknown): HResult; stdcall;
  968. function ReleaseBoundObjects: HResult; stdcall;
  969. function SetBindOptions(const bindopts: TBindOpts): HResult; stdcall;
  970. function GetBindOptions(var bindopts: TBindOpts): HResult; stdcall;
  971. function GetRunningObjectTable(out rot: IRunningObjectTable): HResult;
  972. stdcall;
  973. function RegisterObjectParam(pszKey: POleStr; const unk: IUnknown): HResult;
  974. stdcall;
  975. function GetObjectParam(pszKey: POleStr; out unk: IUnknown): HResult;
  976. stdcall;
  977. function EnumObjectParam(out Enum: IEnumString): HResult; stdcall;
  978. function RevokeObjectParam(pszKey: POleStr): HResult; stdcall;
  979. end;
  980. { IEnumMoniker interface }
  981. IEnumMoniker = interface(IUnknown)
  982. ['{00000102-0000-0000-C000-000000000046}']
  983. function Next(celt: Longint; out elt;
  984. pceltFetched: PLongint): HResult; stdcall;
  985. function Skip(celt: Longint): HResult; stdcall;
  986. function Reset: HResult; stdcall;
  987. function Clone(out enm: IEnumMoniker): HResult; stdcall;
  988. end;
  989. { IRunnableObject interface }
  990. IRunnableObject = interface(IUnknown)
  991. ['{00000126-0000-0000-C000-000000000046}']
  992. function GetRunningClass(out clsid: TCLSID): HResult; stdcall;
  993. function Run(const bc: IBindCtx): HResult; stdcall;
  994. function IsRunning: BOOL; stdcall;
  995. function LockRunning(fLock: BOOL; fLastUnlockCloses: BOOL): HResult;
  996. stdcall;
  997. function SetContainedObject(fContained: BOOL): HResult; stdcall;
  998. end;
  999. { IRunningObjectTable interface }
  1000. IRunningObjectTable = interface(IUnknown)
  1001. ['{00000010-0000-0000-C000-000000000046}']
  1002. function Register(grfFlags: Longint; const unkObject: IUnknown;
  1003. const mkObjectName: IMoniker; out dwRegister: Longint): HResult; stdcall;
  1004. function Revoke(dwRegister: Longint): HResult; stdcall;
  1005. function IsRunning(const mkObjectName: IMoniker): HResult; stdcall;
  1006. function GetObject(const mkObjectName: IMoniker;
  1007. out unkObject: IUnknown): HResult; stdcall;
  1008. function NoteChangeTime(dwRegister: Longint;
  1009. const filetime: TFileTime): HResult; stdcall;
  1010. function GetTimeOfLastChange(const mkObjectName: IMoniker;
  1011. out filetime: TFileTime): HResult; stdcall;
  1012. function EnumRunning(out enumMoniker: IEnumMoniker): HResult; stdcall;
  1013. end;
  1014. { IPersist interface }
  1015. IPersist = interface(IUnknown)
  1016. ['{0000010C-0000-0000-C000-000000000046}']
  1017. function GetClassID(out classID: TCLSID): HResult; stdcall;
  1018. end;
  1019. { IPersistStream interface }
  1020. IPersistStream = interface(IPersist)
  1021. ['{00000109-0000-0000-C000-000000000046}']
  1022. function IsDirty: HResult; stdcall;
  1023. function Load(const stm: IStream): HResult; stdcall;
  1024. function Save(const stm: IStream; fClearDirty: BOOL): HResult; stdcall;
  1025. function GetSizeMax(out cbSize: Largeint): HResult; stdcall;
  1026. end;
  1027. { IMoniker interface }
  1028. PIMoniker = ^IMoniker;
  1029. IMoniker = interface(IPersistStream)
  1030. ['{0000000F-0000-0000-C000-000000000046}']
  1031. function BindToObject(const bc: IBindCtx; const mkToLeft: IMoniker;
  1032. const iidResult: TIID; out vResult): HResult; stdcall;
  1033. function BindToStorage(const bc: IBindCtx; const mkToLeft: IMoniker;
  1034. const iid: TIID; out vObj): HResult; stdcall;
  1035. function Reduce(const bc: IBindCtx; dwReduceHowFar: Longint;
  1036. mkToLeft: PIMoniker; out mkReduced: IMoniker): HResult; stdcall;
  1037. function ComposeWith(const mkRight: IMoniker; fOnlyIfNotGeneric: BOOL;
  1038. out mkComposite: IMoniker): HResult; stdcall;
  1039. function Enum(fForward: BOOL; out enumMoniker: IEnumMoniker): HResult;
  1040. stdcall;
  1041. function IsEqual(const mkOtherMoniker: IMoniker): HResult; stdcall;
  1042. function Hash(out dwHash: Longint): HResult; stdcall;
  1043. function IsRunning(const bc: IBindCtx; const mkToLeft: IMoniker;
  1044. const mkNewlyRunning: IMoniker): HResult; stdcall;
  1045. function GetTimeOfLastChange(const bc: IBindCtx; const mkToLeft: IMoniker;
  1046. out filetime: TFileTime): HResult; stdcall;
  1047. function Inverse(out mk: IMoniker): HResult; stdcall;
  1048. function CommonPrefixWith(const mkOther: IMoniker;
  1049. out mkPrefix: IMoniker): HResult; stdcall;
  1050. function RelativePathTo(const mkOther: IMoniker;
  1051. out mkRelPath: IMoniker): HResult; stdcall;
  1052. function GetDisplayName(const bc: IBindCtx; const mkToLeft: IMoniker;
  1053. out pszDisplayName: POleStr): HResult; stdcall;
  1054. function ParseDisplayName(const bc: IBindCtx; const mkToLeft: IMoniker;
  1055. pszDisplayName: POleStr; out chEaten: Longint;
  1056. out mkOut: IMoniker): HResult; stdcall;
  1057. function IsSystemMoniker(out dwMksys: Longint): HResult; stdcall;
  1058. end;
  1059. { IEnumString interface }
  1060. IEnumString = interface(IUnknown)
  1061. ['{00000101-0000-0000-C000-000000000046}']
  1062. function Next(celt: Longint; out elt;
  1063. pceltFetched: PLongint): HResult; stdcall;
  1064. function Skip(celt: Longint): HResult; stdcall;
  1065. function Reset: HResult; stdcall;
  1066. function Clone(out enm: IEnumString): HResult; stdcall;
  1067. end;
  1068. { IStream interface }
  1069. PStatStg = ^TStatStg;
  1070. tagSTATSTG = record
  1071. pwcsName: POleStr;
  1072. dwType: Longint;
  1073. cbSize: Largeint;
  1074. mtime: TFileTime;
  1075. ctime: TFileTime;
  1076. atime: TFileTime;
  1077. grfMode: Longint;
  1078. grfLocksSupported: Longint;
  1079. clsid: TCLSID;
  1080. grfStateBits: Longint;
  1081. reserved: Longint;
  1082. end;
  1083. TStatStg = tagSTATSTG;
  1084. STATSTG = TStatStg;
  1085. ISequentialStream = interface(IUnknown)
  1086. ['{0c733a30-2a1c-11ce-ade5-00aa0044773d}']
  1087. function Read(pv: Pointer; cb: Longint; pcbRead: PLongint): HResult;
  1088. stdcall;
  1089. function Write(pv: Pointer; cb: Longint; pcbWritten: PLongint): HResult;
  1090. stdcall;
  1091. end;
  1092. IStream = interface(ISequentialStream)
  1093. ['{0000000C-0000-0000-C000-000000000046}']
  1094. function Seek(dlibMove: Largeint; dwOrigin: Longint;
  1095. out libNewPosition: Largeint): HResult; stdcall;
  1096. function SetSize(libNewSize: Largeint): HResult; stdcall;
  1097. function CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint;
  1098. out cbWritten: Largeint): HResult; stdcall;
  1099. function Commit(grfCommitFlags: Longint): HResult; stdcall;
  1100. function Revert: HResult; stdcall;
  1101. function LockRegion(libOffset: Largeint; cb: Largeint;
  1102. dwLockType: Longint): HResult; stdcall;
  1103. function UnlockRegion(libOffset: Largeint; cb: Largeint;
  1104. dwLockType: Longint): HResult; stdcall;
  1105. function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
  1106. stdcall;
  1107. function Clone(out stm: IStream): HResult; stdcall;
  1108. end;
  1109. { IEnumStatStg interface }
  1110. IEnumStatStg = interface(IUnknown)
  1111. ['{0000000D-0000-0000-C000-000000000046}']
  1112. function Next(celt: Longint; out elt;
  1113. pceltFetched: PLongint): HResult; stdcall;
  1114. function Skip(celt: Longint): HResult; stdcall;
  1115. function Reset: HResult; stdcall;
  1116. function Clone(out enm: IEnumStatStg): HResult; stdcall;
  1117. end;
  1118. { IStorage interface }
  1119. TSNB = ^POleStr;
  1120. IStorage = interface(IUnknown)
  1121. ['{0000000B-0000-0000-C000-000000000046}']
  1122. function CreateStream(pwcsName: POleStr; grfMode: Longint; reserved1: Longint;
  1123. reserved2: Longint; out stm: IStream): HResult; stdcall;
  1124. function OpenStream(pwcsName: POleStr; reserved1: Pointer; grfMode: Longint;
  1125. reserved2: Longint; out stm: IStream): HResult; stdcall;
  1126. function CreateStorage(pwcsName: POleStr; grfMode: Longint;
  1127. dwStgFmt: Longint; reserved2: Longint; out stg: IStorage): HResult;
  1128. stdcall;
  1129. function OpenStorage(pwcsName: POleStr; const stgPriority: IStorage;
  1130. grfMode: Longint; snbExclude: TSNB; reserved: Longint;
  1131. out stg: IStorage): HResult; stdcall;
  1132. function CopyTo(ciidExclude: Longint; rgiidExclude: PIID;
  1133. snbExclude: TSNB; const stgDest: IStorage): HResult; stdcall;
  1134. function MoveElementTo(pwcsName: POleStr; const stgDest: IStorage;
  1135. pwcsNewName: POleStr; grfFlags: Longint): HResult; stdcall;
  1136. function Commit(grfCommitFlags: Longint): HResult; stdcall;
  1137. function Revert: HResult; stdcall;
  1138. function EnumElements(reserved1: Longint; reserved2: Pointer; reserved3: Longint;
  1139. out enm: IEnumStatStg): HResult; stdcall;
  1140. function DestroyElement(pwcsName: POleStr): HResult; stdcall;
  1141. function RenameElement(pwcsOldName: POleStr;
  1142. pwcsNewName: POleStr): HResult; stdcall;
  1143. function SetElementTimes(pwcsName: POleStr; const ctime: TFileTime;
  1144. const atime: TFileTime; const mtime: TFileTime): HResult;
  1145. stdcall;
  1146. function SetClass(const clsid: TCLSID): HResult; stdcall;
  1147. function SetStateBits(grfStateBits: Longint; grfMask: Longint): HResult;
  1148. stdcall;
  1149. function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
  1150. stdcall;
  1151. end;
  1152. { IPersistFile interface }
  1153. IPersistFile = interface(IPersist)
  1154. ['{0000010B-0000-0000-C000-000000000046}']
  1155. function IsDirty: HResult; stdcall;
  1156. function Load(pszFileName: POleStr; dwMode: Longint): HResult;
  1157. stdcall;
  1158. function Save(pszFileName: POleStr; fRemember: BOOL): HResult;
  1159. stdcall;
  1160. function SaveCompleted(pszFileName: POleStr): HResult;
  1161. stdcall;
  1162. function GetCurFile(out pszFileName: POleStr): HResult;
  1163. stdcall;
  1164. end;
  1165. { IPersistStorage interface }
  1166. IPersistStorage = interface(IPersist)
  1167. ['{0000010A-0000-0000-C000-000000000046}']
  1168. function IsDirty: HResult; stdcall;
  1169. function InitNew(const stg: IStorage): HResult; stdcall;
  1170. function Load(const stg: IStorage): HResult; stdcall;
  1171. function Save(const stgSave: IStorage; fSameAsLoad: BOOL): HResult;
  1172. stdcall;
  1173. function SaveCompleted(const stgNew: IStorage): HResult; stdcall;
  1174. function HandsOffStorage: HResult; stdcall;
  1175. end;
  1176. { ILockBytes interface }
  1177. ILockBytes = interface(IUnknown)
  1178. ['{0000000A-0000-0000-C000-000000000046}']
  1179. function ReadAt(ulOffset: Largeint; pv: Pointer; cb: Longint;
  1180. pcbRead: PLongint): HResult; stdcall;
  1181. function WriteAt(ulOffset: Largeint; pv: Pointer; cb: Longint;
  1182. pcbWritten: PLongint): HResult; stdcall;
  1183. function Flush: HResult; stdcall;
  1184. function SetSize(cb: Largeint): HResult; stdcall;
  1185. function LockRegion(libOffset: Largeint; cb: Largeint;
  1186. dwLockType: Longint): HResult; stdcall;
  1187. function UnlockRegion(libOffset: Largeint; cb: Largeint;
  1188. dwLockType: Longint): HResult; stdcall;
  1189. function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
  1190. stdcall;
  1191. end;
  1192. { IEnumFormatEtc interface }
  1193. PDVTargetDevice = ^TDVTargetDevice;
  1194. tagDVTARGETDEVICE = record
  1195. tdSize: Longint;
  1196. tdDriverNameOffset: Word;
  1197. tdDeviceNameOffset: Word;
  1198. tdPortNameOffset: Word;
  1199. tdExtDevmodeOffset: Word;
  1200. tdData: record end;
  1201. end;
  1202. TDVTargetDevice = tagDVTARGETDEVICE;
  1203. DVTARGETDEVICE = TDVTargetDevice;
  1204. PClipFormat = ^TClipFormat;
  1205. TClipFormat = Word;
  1206. PFormatEtc = ^TFormatEtc;
  1207. tagFORMATETC = record
  1208. cfFormat: TClipFormat;
  1209. ptd: PDVTargetDevice;
  1210. dwAspect: Longint;
  1211. lindex: Longint;
  1212. tymed: Longint;
  1213. end;
  1214. TFormatEtc = tagFORMATETC;
  1215. FORMATETC = TFormatEtc;
  1216. IEnumFORMATETC = interface(IUnknown)
  1217. ['{00000103-0000-0000-C000-000000000046}']
  1218. function Next(celt: Longint; out elt;
  1219. pceltFetched: PLongint): HResult; stdcall;
  1220. function Skip(celt: Longint): HResult; stdcall;
  1221. function Reset: HResult; stdcall;
  1222. function Clone(out Enum: IEnumFormatEtc): HResult; stdcall;
  1223. end;
  1224. { IEnumStatData interface }
  1225. PStatData = ^TStatData;
  1226. tagSTATDATA = record
  1227. formatetc: TFormatEtc;
  1228. advf: Longint;
  1229. advSink: IAdviseSink;
  1230. dwConnection: Longint;
  1231. end;
  1232. TStatData = tagSTATDATA;
  1233. STATDATA = TStatData;
  1234. IEnumSTATDATA = interface(IUnknown)
  1235. ['{00000105-0000-0000-C000-000000000046}']
  1236. function Next(celt: Longint; out elt;
  1237. pceltFetched: PLongint): HResult; stdcall;
  1238. function Skip(celt: Longint): HResult; stdcall;
  1239. function Reset: HResult; stdcall;
  1240. function Clone(out Enum: IEnumStatData): HResult; stdcall;
  1241. end;
  1242. { IRootStorage interface }
  1243. IRootStorage = interface(IUnknown)
  1244. ['{00000012-0000-0000-C000-000000000046}']
  1245. function SwitchToFile(pszFile: POleStr): HResult; stdcall;
  1246. end;
  1247. { IAdviseSink interface }
  1248. PRemStgMedium = ^TRemStgMedium;
  1249. tagRemSTGMEDIUM = record
  1250. tymed: Longint;
  1251. dwHandleType: Longint;
  1252. pData: Longint;
  1253. pUnkForRelease: Longint;
  1254. cbData: Longint;
  1255. data: record end;
  1256. end;
  1257. TRemStgMedium = tagRemSTGMEDIUM;
  1258. RemSTGMEDIUM = TRemStgMedium;
  1259. PStgMedium = ^TStgMedium;
  1260. tagSTGMEDIUM = record
  1261. tymed: Longint;
  1262. case Integer of
  1263. 0: (hBitmap: HBitmap; unkForRelease: Pointer{IUnknown});
  1264. 1: (hMetaFilePict: THandle);
  1265. 2: (hEnhMetaFile: THandle);
  1266. 3: (hGlobal: HGlobal);
  1267. 4: (lpszFileName: POleStr);
  1268. 5: (stm: Pointer{IStream});
  1269. 6: (stg: Pointer{IStorage});
  1270. end;
  1271. TStgMedium = tagSTGMEDIUM;
  1272. STGMEDIUM = TStgMedium;
  1273. IAdviseSink = interface(IUnknown)
  1274. ['{0000010F-0000-0000-C000-000000000046}']
  1275. procedure OnDataChange(const formatetc: TFormatEtc; const stgmed: TStgMedium);
  1276. stdcall;
  1277. procedure OnViewChange(dwAspect: Longint; lindex: Longint);
  1278. stdcall;
  1279. procedure OnRename(const mk: IMoniker); stdcall;
  1280. procedure OnSave; stdcall;
  1281. procedure OnClose; stdcall;
  1282. end;
  1283. { IAdviseSink2 interface }
  1284. IAdviseSink2 = interface(IAdviseSink)
  1285. ['{00000125-0000-0000-C000-000000000046}']
  1286. procedure OnLinkSrcChange(const mk: IMoniker); stdcall;
  1287. end;
  1288. { IDataObject interface }
  1289. IDataObject = interface(IUnknown)
  1290. ['{0000010E-0000-0000-C000-000000000046}']
  1291. function GetData(const formatetcIn: TFormatEtc; out medium: TStgMedium):
  1292. HResult; stdcall;
  1293. function GetDataHere(const formatetc: TFormatEtc; out medium: TStgMedium):
  1294. HResult; stdcall;
  1295. function QueryGetData(const formatetc: TFormatEtc): HResult;
  1296. stdcall;
  1297. function GetCanonicalFormatEtc(const formatetc: TFormatEtc;
  1298. out formatetcOut: TFormatEtc): HResult; stdcall;
  1299. function SetData(const formatetc: TFormatEtc; var medium: TStgMedium;
  1300. fRelease: BOOL): HResult; stdcall;
  1301. function EnumFormatEtc(dwDirection: Longint; out enumFormatEtc:
  1302. IEnumFormatEtc): HResult; stdcall;
  1303. function DAdvise(const formatetc: TFormatEtc; advf: Longint;
  1304. const advSink: IAdviseSink; out dwConnection: Longint): HResult; stdcall;
  1305. function DUnadvise(dwConnection: Longint): HResult; stdcall;
  1306. function EnumDAdvise(out enumAdvise: IEnumStatData): HResult;
  1307. stdcall;
  1308. end;
  1309. { IDataAdviseHolder interface }
  1310. IDataAdviseHolder = interface(IUnknown)
  1311. ['{00000110-0000-0000-C000-000000000046}']
  1312. function Advise(const dataObject: IDataObject; const fetc: TFormatEtc;
  1313. advf: Longint; const advise: IAdviseSink; out pdwConnection: Longint): HResult;
  1314. stdcall;
  1315. function Unadvise(dwConnection: Longint): HResult; stdcall;
  1316. function EnumAdvise(out enumAdvise: IEnumStatData): HResult; stdcall;
  1317. function SendOnDataChange(const dataObject: IDataObject; dwReserved: Longint;
  1318. advf: Longint): HResult; stdcall;
  1319. end;
  1320. { IMessageFilter interface }
  1321. PInterfaceInfo = ^TInterfaceInfo;
  1322. tagINTERFACEINFO = record
  1323. unk: IUnknown;
  1324. iid: TIID;
  1325. wMethod: Word;
  1326. end;
  1327. TInterfaceInfo = tagINTERFACEINFO;
  1328. INTERFACEINFO = TInterfaceInfo;
  1329. IMessageFilter = interface(IUnknown)
  1330. ['{00000016-0000-0000-C000-000000000046}']
  1331. function HandleInComingCall(dwCallType: Longint; htaskCaller: HTask;
  1332. dwTickCount: Longint; lpInterfaceInfo: PInterfaceInfo): Longint;
  1333. stdcall;
  1334. function RetryRejectedCall(htaskCallee: HTask; dwTickCount: Longint;
  1335. dwRejectType: Longint): Longint; stdcall;
  1336. function MessagePending(htaskCallee: HTask; dwTickCount: Longint;
  1337. dwPendingType: Longint): Longint; stdcall;
  1338. end;
  1339. { IRpcChannelBuffer interface }
  1340. TRpcOleDataRep = DWORD;
  1341. PRpcOleMessage = ^TRpcOleMessage;
  1342. tagRPCOLEMESSAGE = record
  1343. reserved1: Pointer;
  1344. dataRepresentation: TRpcOleDataRep;
  1345. Buffer: Pointer;
  1346. cbBuffer: Longint;
  1347. iMethod: Longint;
  1348. reserved2: array[0..4] of Pointer;
  1349. rpcFlags: Longint;
  1350. end;
  1351. TRpcOleMessage = tagRPCOLEMESSAGE;
  1352. RPCOLEMESSAGE = TRpcOleMessage;
  1353. IRpcChannelBuffer = interface(IUnknown)
  1354. ['{D5F56B60-593B-101A-B569-08002B2DBF7A}']
  1355. function GetBuffer(var message: TRpcOleMessage; iid: TIID): HResult;
  1356. stdcall;
  1357. function SendReceive(var message: TRpcOleMessage;
  1358. var status: Longint): HResult; stdcall;
  1359. function FreeBuffer(var message: TRpcOleMessage): HResult;
  1360. stdcall;
  1361. function GetDestCtx(out dwDestContext: Longint;
  1362. out pvDestContext): HResult; stdcall;
  1363. function IsConnected: HResult; stdcall;
  1364. end;
  1365. { IRpcProxyBuffer interface }
  1366. IRpcProxyBuffer = interface(IUnknown)
  1367. ['{D5F56A34-593B-101A-B569-08002B2DBF7A}']
  1368. function Connect(const rpcChannelBuffer: IRpcChannelBuffer): HResult;
  1369. stdcall;
  1370. procedure Disconnect; stdcall;
  1371. end;
  1372. { IRpcStubBuffer interface }
  1373. IRpcStubBuffer = interface(IUnknown)
  1374. ['{D5F56AFC-593B-101A-B569-08002B2DBF7A}']
  1375. function Connect(const unkServer: IUnknown): HResult; stdcall;
  1376. procedure Disconnect; stdcall;
  1377. function Invoke(var rpcmsg: TRpcOleMessage; rpcChannelBuffer:
  1378. IRpcChannelBuffer): HResult; stdcall;
  1379. function IsIIDSupported(const iid: TIID): Pointer{IRpcStubBuffer};
  1380. stdcall;
  1381. function CountRefs: Longint; stdcall;
  1382. function DebugServerQueryInterface(var pv): HResult;
  1383. stdcall;
  1384. procedure DebugServerRelease(pv: Pointer); stdcall;
  1385. end;
  1386. { IPSFactoryBuffer interface }
  1387. IPSFactoryBuffer = interface(IUnknown)
  1388. ['{D5F569D0-593B-101A-B569-08002B2DBF7A}']
  1389. function CreateProxy(const unkOuter: IUnknown; const iid: TIID;
  1390. out proxy: IRpcProxyBuffer; out pv): HResult; stdcall;
  1391. function CreateStub(const iid: TIID; const unkServer: IUnknown;
  1392. out stub: IRpcStubBuffer): HResult; stdcall;
  1393. end;
  1394. IChannelHook = interface(IUnknown)
  1395. ['{1008C4A0-7613-11CF-9AF1-0020AF6E72F4}']
  1396. procedure ClientGetSize(const uExtent: TGUID; const iid: TIID;
  1397. out DataSize: Longint); stdcall;
  1398. procedure ClientFillBuffer(const uExtent: TGUID; const iid: TIID;
  1399. var DataSize: Longint; var DataBuffer); stdcall;
  1400. procedure ClientNotify(const uExtent: TGUID; const iid: TIID;
  1401. DataSize: Longint; var DataBuffer; lDataRep: Longint;
  1402. hrFault: HResult); stdcall;
  1403. procedure ServerNotify(const uExtent: TGUID; const iid: TIID;
  1404. DataSize: Longint; var DataBuffer; lDataRep: Longint); stdcall;
  1405. procedure ServerGetSize(const uExtent: TGUID; const iid: TIID;
  1406. hrFault: HResult; out DataSize: Longint); stdcall;
  1407. procedure ServerFillBuffer(const uExtent: TGUID; const iid: TIID;
  1408. var DataSize: Longint; var DataBuffer; hrFault: HResult); stdcall;
  1409. end;
  1410. IFillLockBytes = interface(IUnknown)
  1411. ['{99CAF010-415E-11CF-8814-00AA00B569F5}']
  1412. function FillAppend(const pv; cb: Longint;
  1413. out cbWritten: Longint): HResult; stdcall;
  1414. function FillAt(Offset: Longint; const pv; cb: Longint;
  1415. out cbWritten: Longint): HResult; stdcall;
  1416. function SetFillSize(Offset: Longint): HResult; stdcall;
  1417. function Terminate(bCanceled: Boolean): HResult; stdcall;
  1418. end;
  1419. { Automation types }
  1420. PBStr = ^TBStr;
  1421. TBStr = POleStr;
  1422. PBStrList = ^TBStrList;
  1423. TBStrList = array[0..65535] of TBStr;
  1424. PComp = ^Comp;
  1425. { from WTYPES.H }
  1426. PDecimal = ^TDecimal;
  1427. tagDEC = packed record
  1428. wReserved: Word;
  1429. case Integer of
  1430. 0: (scale, sign: Byte; Hi32: Longint;
  1431. case Integer of
  1432. 0: (Lo32, Mid32: Longint);
  1433. 1: (Lo64: LONGLONG));
  1434. 1: (signscale: Word);
  1435. end;
  1436. TDecimal = tagDEC;
  1437. DECIMAL = TDecimal;
  1438. (* tagBLOB related types cause problem due to two definitions of BLOB in wtypes.h/nspapi.h *)
  1439. (* Investigating something that will always work even when a BLOB is not a tagBLOB *)
  1440. PBlob = ^TBlob;
  1441. tagBLOB = record
  1442. cbSize: Longint;
  1443. pBlobData: Pointer;
  1444. end;
  1445. (* tagBLOB related types cause problem due to two definitions of BLOB in wtypes.h/nspapi.h *)
  1446. (* Investigating something that will always work even when a BLOB is not a tagBLOB *)
  1447. TBlob = tagBLOB;
  1448. BLOB = TBlob;
  1449. PClipData = ^TClipData;
  1450. tagCLIPDATA = record
  1451. cbSize: Longint;
  1452. ulClipFmt: Longint;
  1453. pClipData: Pointer;
  1454. end;
  1455. TClipData = tagCLIPDATA;
  1456. CLIPDATA = TClipData;
  1457. { IPropertyStorage / IPropertySetStorage }
  1458. PPropVariant = ^TPropVariant;
  1459. tagCAUB = packed record
  1460. cElems: ULONG;
  1461. pElems: PByte;
  1462. end;
  1463. CAUB = tagCAUB;
  1464. PCAUB = ^TCAUB;
  1465. TCAUB = tagCAUB;
  1466. tagCAI = packed record
  1467. cElems: ULONG;
  1468. pElems: PShortInt;
  1469. end;
  1470. CAI = tagCAI;
  1471. PCAI = ^TCAI;
  1472. TCAI = tagCAI;
  1473. tagCAUI = packed record
  1474. cElems: ULONG;
  1475. pElems: PWord;
  1476. end;
  1477. CAUI = tagCAUI;
  1478. PCAUI = ^TCAUI;
  1479. TCAUI = tagCAUI;
  1480. tagCAL = packed record
  1481. cElems: ULONG;
  1482. pElems: PLongint;
  1483. end;
  1484. CAL = tagCAL;
  1485. PCAL = ^TCAL;
  1486. TCAL = tagCAL;
  1487. tagCAUL = packed record
  1488. cElems: ULONG;
  1489. pElems: PULONG;
  1490. end;
  1491. CAUL = tagCAUL;
  1492. PCAUL = ^TCAUL;
  1493. TCAUL = tagCAUL;
  1494. tagCAFLT = packed record
  1495. cElems: ULONG;
  1496. pElems: PSingle;
  1497. end;
  1498. CAFLT = tagCAFLT;
  1499. PCAFLT = ^TCAFLT;
  1500. TCAFLT = tagCAFLT;
  1501. tagCADBL = packed record
  1502. cElems: ULONG;
  1503. pElems: PDouble;
  1504. end;
  1505. CADBL = tagCADBL;
  1506. PCADBL = ^TCADBL;
  1507. TCADBL = tagCADBL;
  1508. tagCACY = packed record
  1509. cElems: ULONG;
  1510. pElems: PCurrency;
  1511. end;
  1512. CACY = tagCACY;
  1513. PCACY = ^TCACY;
  1514. TCACY = tagCACY;
  1515. tagCADATE = packed record
  1516. cElems: ULONG;
  1517. pElems: POleDate;
  1518. end;
  1519. CADATE = tagCADATE;
  1520. PCADATE = ^TCADATE;
  1521. TCADATE = tagCADATE;
  1522. tagCABSTR = packed record
  1523. cElems: ULONG;
  1524. pElems: PBSTR;
  1525. end;
  1526. CABSTR = tagCABSTR;
  1527. PCABSTR = ^TCABSTR;
  1528. TCABSTR = tagCABSTR;
  1529. tagCABOOL = packed record
  1530. cElems: ULONG;
  1531. pElems: POleBool;
  1532. end;
  1533. CABOOL = tagCABOOL;
  1534. PCABOOL = ^TCABOOL;
  1535. TCABOOL = tagCABOOL;
  1536. tagCASCODE = packed record
  1537. cElems: ULONG;
  1538. pElems: PSCODE;
  1539. end;
  1540. CASCODE = tagCASCODE;
  1541. PCASCODE = ^TCASCODE;
  1542. TCASCODE = tagCASCODE;
  1543. tagCAPROPVARIANT = packed record
  1544. cElems: ULONG;
  1545. pElems: PPropVariant;
  1546. end;
  1547. CAPROPVARIANT = tagCAPROPVARIANT;
  1548. PCAPROPVARIANT = ^TCAPROPVARIANT;
  1549. TCAPROPVARIANT = tagCAPROPVARIANT;
  1550. tagCAH = packed record
  1551. cElems: ULONG;
  1552. pElems: PLargeInteger;
  1553. end;
  1554. CAH = tagCAH;
  1555. PCAH = ^TCAH;
  1556. TCAH = tagCAH;
  1557. tagCAUH = packed record
  1558. cElems: ULONG;
  1559. pElems: PULargeInteger;
  1560. end;
  1561. CAUH = tagCAUH;
  1562. PCAUH = ^TCAUH;
  1563. TCAUH = tagCAUH;
  1564. tagCALPSTR = packed record
  1565. cElems: ULONG;
  1566. pElems: PLPSTR;
  1567. end;
  1568. CALPSTR = tagCALPSTR;
  1569. PCALPSTR = ^TCALPSTR;
  1570. TCALPSTR = tagCALPSTR;
  1571. tagCALPWSTR = packed record
  1572. cElems: ULONG;
  1573. pElems: PLPWSTR;
  1574. end;
  1575. CALPWSTR = tagCALPWSTR;
  1576. PCALPWSTR = ^TCALPWSTR;
  1577. TCALPWSTR = tagCALPWSTR;
  1578. tagCAFILETIME = packed record
  1579. cElems: ULONG;
  1580. pElems: PFileTime;
  1581. end;
  1582. CAFILETIME = tagCAFILETIME;
  1583. PCAFILETIME = ^TCAFILETIME;
  1584. TCAFILETIME = tagCAFILETIME;
  1585. tagCACLIPDATA = packed record
  1586. cElems: ULONG;
  1587. pElems: PClipData;
  1588. end;
  1589. CACLIPDATA = tagCACLIPDATA;
  1590. PCACLIPDATA = ^TCACLIPDATA;
  1591. TCACLIPDATA = tagCACLIPDATA;
  1592. tagCACLSID = packed record
  1593. cElems: ULONG;
  1594. pElems: PCLSID;
  1595. end;
  1596. CACLSID = tagCACLSID;
  1597. PCACLSID = ^TCACLSID;
  1598. TCACLSID = tagCACLSID;
  1599. tagPROPVARIANT = record
  1600. vt: TVarType;
  1601. wReserved1: Word;
  1602. wReserved2: Word;
  1603. wReserved3: Word;
  1604. case Integer of
  1605. 0: (bVal: Byte);
  1606. 1: (iVal: SmallInt);
  1607. 2: (uiVal: Word);
  1608. 3: (boolVal: TOleBool);
  1609. 4: (bool: TOleBool);
  1610. 5: (lVal: Longint);
  1611. 6: (ulVal: Cardinal);
  1612. 7: (fltVal: Single);
  1613. 8: (scode: SCODE);
  1614. 9: (hVal: LARGE_INTEGER);
  1615. 10: (uhVal: ULARGE_INTEGER);
  1616. 11: (dblVal: Double);
  1617. 12: (cyVal: Currency);
  1618. 13: (date: TOleDate);
  1619. 14: (filetime: TFileTime);
  1620. 15: (puuid: PGUID);
  1621. 16: (blob: TBlob);
  1622. 17: (pclipdata: PClipData);
  1623. 18: (pStream: Pointer{IStream});
  1624. 19: (pStorage: Pointer{IStorage});
  1625. 20: (bstrVal: TBStr);
  1626. 21: (pszVal: PAnsiChar);
  1627. 22: (pwszVal: PWideChar);
  1628. 23: (caub: TCAUB);
  1629. 24: (cai: TCAI);
  1630. 25: (caui: TCAUI);
  1631. 26: (cabool: TCABOOL);
  1632. 27: (cal: TCAL);
  1633. 28: (caul: TCAUL);
  1634. 29: (caflt: TCAFLT);
  1635. 30: (cascode: TCASCODE);
  1636. 31: (cah: TCAH);
  1637. 32: (cauh: TCAUH);
  1638. 33: (cadbl: TCADBL);
  1639. 34: (cacy: TCACY);
  1640. 35: (cadate: TCADATE);
  1641. 36: (cafiletime: TCAFILETIME);
  1642. 37: (cauuid: TCACLSID);
  1643. 38: (caclipdata: TCACLIPDATA);
  1644. 39: (cabstr: TCABSTR);
  1645. 40: (calpstr: TCALPSTR);
  1646. 41: (calpwstr: TCALPWSTR );
  1647. 42: (capropvar: TCAPROPVARIANT);
  1648. end;
  1649. PROPVARIANT = tagPROPVARIANT;
  1650. TPropVariant = tagPROPVARIANT;
  1651. tagPROPSPEC = record
  1652. ulKind: ULONG;
  1653. case Integer of
  1654. 0: (propid: TPropID);
  1655. 1: (lpwstr: POleStr);
  1656. end;
  1657. PROPSPEC = tagPROPSPEC;
  1658. PPropSpec = ^TPropSpec;
  1659. TPropSpec = tagPROPSPEC;
  1660. tagSTATPROPSTG = record
  1661. lpwstrName: POleStr;
  1662. propid: TPropID;
  1663. vt: TVarType;
  1664. end;
  1665. STATPROPSTG = tagSTATPROPSTG;
  1666. PStatPropStg = ^TStatPropStg;
  1667. TStatPropStg = tagSTATPROPSTG;
  1668. tagSTATPROPSETSTG = packed record
  1669. fmtid: TFmtID;
  1670. clsid: TClsID;
  1671. grfFlags: DWORD;
  1672. mtime: TFileTime;
  1673. ctime: TFileTime;
  1674. atime: TFileTime;
  1675. dwOSVersion: DWORD;
  1676. end;
  1677. STATPROPSETSTG = tagSTATPROPSETSTG;
  1678. PStatPropSetStg = ^TStatPropSetStg;
  1679. TStatPropSetStg = tagSTATPROPSETSTG;
  1680. IPropertyStorage = interface(IUnknown)
  1681. ['{00000138-0000-0000-C000-000000000046}']
  1682. function ReadMultiple(cpspec: ULONG; rgpspec : PPropSpec; rgpropvar: PPropVariant): HResult; stdcall;
  1683. function WriteMultiple(cpspec: ULONG; rgpspec : PPropSpec; rgpropvar: PPropVariant;
  1684. propidNameFirst: TPropID): HResult; stdcall;
  1685. function DeleteMultiple(cpspec: ULONG; rgpspec: PPropSpec): HResult; stdcall;
  1686. function ReadPropertyNames(cpropid: ULONG; rgpropid: PPropID;
  1687. rglpwstrName: PPOleStr): HResult; stdcall;
  1688. function WritePropertyNames(cpropid: ULONG; rgpropid: PPropID;
  1689. rglpwstrName: PPOleStr): HResult; stdcall;
  1690. function DeletePropertyNames(cpropid: ULONG; rgpropid: PPropID): HResult; stdcall;
  1691. function Commit(grfCommitFlags: DWORD): HResult; stdcall;
  1692. function Revert: HResult; stdcall;
  1693. function Enum(out ppenum: IEnumSTATPROPSTG): HResult; stdcall;
  1694. function SetTimes(const pctime, patime, pmtime: TFileTime): HResult; stdcall;
  1695. function SetClass(const clsid: TCLSID): HResult; stdcall;
  1696. function Stat(pstatpsstg: PStatPropSetStg): HResult; stdcall;
  1697. end;
  1698. IPropertySetStorage = interface(IUnknown)
  1699. ['{0000013A-0000-0000-C000-000000000046}']
  1700. function Create(const rfmtid: TFmtID; const pclsid: TCLSID; grfFlags,
  1701. grfMode: DWORD; out ppprstg: IPropertyStorage): HResult; stdcall;
  1702. function Open(const rfmtid: TFmtID; grfMode: DWORD;
  1703. out ppprstg: IPropertyStorage): HResult; stdcall;
  1704. function Delete(const rfmtid: TFmtID): HResult; stdcall;
  1705. function Enum(out ppenum: IEnumSTATPROPSETSTG): HResult; stdcall;
  1706. end;
  1707. IEnumSTATPROPSTG = interface(IUnknown)
  1708. ['{00000139-0000-0000-C000-000000000046}']
  1709. function Next(celt: ULONG; out rgelt; pceltFetched: PULONG): HResult; stdcall;
  1710. function Skip(celt: ULONG): HResult; stdcall;
  1711. function Reset: HResult; stdcall;
  1712. function Clone(out ppenum: IEnumSTATPROPSTG): HResult; stdcall;
  1713. end;
  1714. IEnumSTATPROPSETSTG = interface(IUnknown)
  1715. ['{0000013B-0000-0000-C000-000000000046}']
  1716. function Next(celt: ULONG; out rgelt; pceltFetched: PULONG): HResult; stdcall;
  1717. function Skip(celt: ULONG): HResult; stdcall;
  1718. function Reset: HResult; stdcall;
  1719. function Clone(out ppenum: IEnumSTATPROPSETSTG): HResult; stdcall;
  1720. end;
  1721. IGlobalInterfaceTable = interface(IUnknown)
  1722. ['{00000146-0000-0000-C000-000000000046}']
  1723. function RegisterInterfaceInGlobal(const pUnk: IUnknown; const riid: TIID;
  1724. out dwCookie: DWORD): HResult; stdcall;
  1725. function RevokeInterfaceFromGlobal(const dwCookie: DWORD): HResult; stdcall;
  1726. function GetInterfaceFromGlobal(dwCookie: DWORD; const riid: TIID;
  1727. out ppv): HResult; stdcall;
  1728. end;
  1729. { from OAIDL.H }
  1730. PVariantArg = ^TVariantArg;
  1731. tagVARIANT = record
  1732. vt: TVarType;
  1733. wReserved1: Word;
  1734. wReserved2: Word;
  1735. wReserved3: Word;
  1736. case Integer of
  1737. VT_UI1: (bVal: Byte);
  1738. VT_I2: (iVal: Smallint);
  1739. VT_I4: (lVal: Longint);
  1740. VT_R4: (fltVal: Single);
  1741. VT_R8: (dblVal: Double);
  1742. VT_BOOL: (vbool: TOleBool);
  1743. VT_ERROR: (scode: HResult);
  1744. VT_CY: (cyVal: Currency);
  1745. VT_DATE: (date: TOleDate);
  1746. VT_BSTR: (bstrVal: PWideChar{WideString});
  1747. VT_UNKNOWN: (unkVal: Pointer{IUnknown});
  1748. VT_DISPATCH: (dispVal: Pointer{IDispatch});
  1749. VT_ARRAY: (parray: PSafeArray);
  1750. VT_BYREF or VT_UI1: (pbVal: ^Byte);
  1751. VT_BYREF or VT_I2: (piVal: ^Smallint);
  1752. VT_BYREF or VT_I4: (plVal: ^Longint);
  1753. VT_BYREF or VT_R4: (pfltVal: ^Single);
  1754. VT_BYREF or VT_R8: (pdblVal: ^Double);
  1755. VT_BYREF or VT_BOOL: (pbool: ^TOleBool);
  1756. VT_BYREF or VT_ERROR: (pscode: ^HResult);
  1757. VT_BYREF or VT_CY: (pcyVal: ^Currency);
  1758. VT_BYREF or VT_DATE: (pdate: ^TOleDate);
  1759. VT_BYREF or VT_BSTR: (pbstrVal: ^WideString);
  1760. VT_BYREF or VT_UNKNOWN: (punkVal: ^IUnknown);
  1761. VT_BYREF or VT_DISPATCH: (pdispVal: ^IDispatch);
  1762. VT_BYREF or VT_ARRAY: (pparray: ^PSafeArray);
  1763. VT_BYREF or VT_VARIANT: (pvarVal: PVariant);
  1764. VT_BYREF: (byRef: Pointer);
  1765. VT_I1: (cVal: AnsiChar);
  1766. VT_UI2: (uiVal: Word);
  1767. VT_UI4: (ulVal: LongWord);
  1768. VT_INT: (intVal: Integer);
  1769. VT_UINT: (uintVal: LongWord);
  1770. VT_BYREF or VT_DECIMAL: (pdecVal: PDecimal);
  1771. VT_BYREF or VT_I1: (pcVal: PAnsiChar);
  1772. VT_BYREF or VT_UI2: (puiVal: PWord);
  1773. VT_BYREF or VT_UI4: (pulVal: PInteger);
  1774. VT_BYREF or VT_INT: (pintVal: PInteger);
  1775. VT_BYREF or VT_UINT: (puintVal: PLongWord);
  1776. end;
  1777. TVariantArg = tagVARIANT;
  1778. PVariantArgList = ^TVariantArgList;
  1779. TVariantArgList = array[0..65535] of TVariantArg;
  1780. TDispID = Longint;
  1781. PDispIDList = ^TDispIDList;
  1782. TDispIDList = array[0..65535] of TDispID;
  1783. TMemberID = TDispID;
  1784. PMemberIDList = ^TMemberIDList;
  1785. TMemberIDList = array[0..65535] of TMemberID;
  1786. HRefType = DWORD;
  1787. tagTYPEKIND = DWORD;
  1788. TTypeKind = tagTYPEKIND;
  1789. PArrayDesc = ^TArrayDesc;
  1790. PTypeDesc = ^TTypeDesc;
  1791. tagTYPEDESC = record
  1792. case Integer of
  1793. VT_PTR: (ptdesc: PTypeDesc; vt: TVarType);
  1794. VT_CARRAY: (padesc: PArrayDesc);
  1795. VT_USERDEFINED: (hreftype: HRefType);
  1796. end;
  1797. TTypeDesc = tagTYPEDESC;
  1798. TYPEDESC = TTypeDesc;
  1799. tagARRAYDESC = record
  1800. tdescElem: TTypeDesc;
  1801. cDims: Word;
  1802. rgbounds: array[0..0] of TSafeArrayBound;
  1803. end;
  1804. TArrayDesc = tagARRAYDESC;
  1805. ARRAYDESC = TArrayDesc;
  1806. PIDLDesc = ^TIDLDesc;
  1807. tagIDLDESC = record
  1808. dwReserved: Longint;
  1809. wIDLFlags: Word;
  1810. end;
  1811. TIDLDesc = tagIDLDESC;
  1812. IDLDESC = TIDLDesc;
  1813. PParamDescEx = ^TParamDescEx;
  1814. tagPARAMDESCEX = record
  1815. cBytes: Longint;
  1816. FourBytePad: Longint;
  1817. varDefaultValue: TVariantArg;
  1818. end;
  1819. TParamDescEx = tagPARAMDESCEX;
  1820. PARAMDESCEX = TParamDescEx;
  1821. PParamDesc = ^TParamDesc;
  1822. tagPARAMDESC = record
  1823. pparamdescex: PParamDescEx;
  1824. wParamFlags: Word;
  1825. end;
  1826. TParamDesc = tagPARAMDESC;
  1827. PARAMDESC = TParamDesc;
  1828. PElemDesc = ^TElemDesc;
  1829. tagELEMDESC = record
  1830. tdesc: TTypeDesc;
  1831. case Integer of
  1832. 0: (idldesc: TIDLDesc);
  1833. 1: (paramdesc: TParamDesc);
  1834. end;
  1835. TElemDesc = tagELEMDESC;
  1836. ELEMDESC = TElemDesc;
  1837. PElemDescList = ^TElemDescList;
  1838. TElemDescList = array[0..65535] of TElemDesc;
  1839. PTypeAttr = ^TTypeAttr;
  1840. tagTYPEATTR = record
  1841. guid: TGUID;
  1842. lcid: TLCID;
  1843. dwReserved: Longint;
  1844. memidConstructor: TMemberID;
  1845. memidDestructor: TMemberID;
  1846. lpstrSchema: POleStr;
  1847. cbSizeInstance: Longint;
  1848. typekind: TTypeKind;
  1849. cFuncs: Word;
  1850. cVars: Word;
  1851. cImplTypes: Word;
  1852. cbSizeVft: Word;
  1853. cbAlignment: Word;
  1854. wTypeFlags: Word;
  1855. wMajorVerNum: Word;
  1856. wMinorVerNum: Word;
  1857. tdescAlias: TTypeDesc;
  1858. idldescType: TIDLDesc;
  1859. end;
  1860. TTypeAttr = tagTYPEATTR;
  1861. TYPEATTR = TTypeAttr;
  1862. PDispParams = ^TDispParams;
  1863. tagDISPPARAMS = record
  1864. rgvarg: PVariantArgList;
  1865. rgdispidNamedArgs: PDispIDList;
  1866. cArgs: Longint;
  1867. cNamedArgs: Longint;
  1868. end;
  1869. TDispParams = tagDISPPARAMS;
  1870. DISPPARAMS = TDispParams;
  1871. PExcepInfo = ^TExcepInfo;
  1872. TFNDeferredFillIn = function(ExInfo: PExcepInfo): HResult stdcall;
  1873. tagEXCEPINFO = record
  1874. wCode: Word;
  1875. wReserved: Word;
  1876. bstrSource: WideString;
  1877. bstrDescription: WideString;
  1878. bstrHelpFile: WideString;
  1879. dwHelpContext: Longint;
  1880. pvReserved: Pointer;
  1881. pfnDeferredFillIn: TFNDeferredFillIn;
  1882. scode: HResult;
  1883. end;
  1884. TExcepInfo = tagEXCEPINFO;
  1885. EXCEPINFO = TExcepInfo;
  1886. tagFUNCKIND = Longint;
  1887. TFuncKind = tagFUNCKIND;
  1888. tagINVOKEKIND = Longint;
  1889. TInvokeKind = tagINVOKEKIND;
  1890. tagCALLCONV = Longint;
  1891. TCallConv = tagCALLCONV;
  1892. PFuncDesc = ^TFuncDesc;
  1893. tagFUNCDESC = record
  1894. memid: TMemberID;
  1895. lprgscode: PResultList;
  1896. lprgelemdescParam: PElemDescList;
  1897. funckind: TFuncKind;
  1898. invkind: TInvokeKind;
  1899. callconv: TCallConv;
  1900. cParams: Smallint;
  1901. cParamsOpt: Smallint;
  1902. oVft: Smallint;
  1903. cScodes: Smallint;
  1904. elemdescFunc: TElemDesc;
  1905. wFuncFlags: Word;
  1906. end;
  1907. TFuncDesc = tagFUNCDESC;
  1908. FUNCDESC = TFuncDesc;
  1909. TVarKind = Longint;
  1910. PVarDesc = ^TVarDesc;
  1911. tagVARDESC = record
  1912. memid: TMemberID;
  1913. lpstrSchema: POleStr;
  1914. case Integer of
  1915. VAR_PERINSTANCE: (
  1916. oInst: Longint;
  1917. elemdescVar: TElemDesc;
  1918. wVarFlags: Word;
  1919. varkind: TVarKind);
  1920. VAR_CONST: (
  1921. lpvarValue: POleVariant);
  1922. end;
  1923. TVarDesc = tagVARDESC;
  1924. VARDESC = TVarDesc;
  1925. { ICreateTypeInfo interface }
  1926. ICreateTypeInfo = interface(IUnknown)
  1927. ['{00020405-0000-0000-C000-000000000046}']
  1928. function SetGuid(const guid: TGUID): HResult; stdcall;
  1929. function SetTypeFlags(uTypeFlags: Integer): HResult; stdcall;
  1930. function SetDocString(pstrDoc: POleStr): HResult; stdcall;
  1931. function SetHelpContext(dwHelpContext: Longint): HResult; stdcall;
  1932. function SetVersion(wMajorVerNum: Word; wMinorVerNum: Word): HResult;
  1933. stdcall;
  1934. function AddRefTypeInfo(const tinfo: ITypeInfo; out reftype: HRefType): HResult;
  1935. stdcall;
  1936. function AddFuncDesc(index: Integer; const funcdesc: TFuncDesc): HResult;
  1937. stdcall;
  1938. function AddImplType(index: Integer; reftype: HRefType): HResult;
  1939. stdcall;
  1940. function SetImplTypeFlags(index: Integer; impltypeflags: Integer): HResult;
  1941. stdcall;
  1942. function SetAlignment(cbAlignment: Word): HResult; stdcall;
  1943. function SetSchema(lpstrSchema: POleStr): HResult; stdcall;
  1944. function AddVarDesc(index: Integer; const vardesc: TVarDesc): HResult;
  1945. stdcall;
  1946. function SetFuncAndParamNames(index: Integer; rgszNames: POleStrList;
  1947. cNames: Integer): HResult; stdcall;
  1948. function SetVarName(index: Integer; szName: POleStr): HResult; stdcall;
  1949. function SetTypeDescAlias(const descAlias: TTypeDesc): HResult; stdcall;
  1950. function DefineFuncAsDllEntry(index: Integer; szDllName: POleStr;
  1951. szProcName: POleStr): HResult; stdcall;
  1952. function SetFuncDocString(index: Integer; szDocString: POleStr): HResult;
  1953. stdcall;
  1954. function SetVarDocString(index: Integer; szDocString: POleStr): HResult;
  1955. stdcall;
  1956. function SetFuncHelpContext(index: Integer; dwHelpContext: Longint): HResult;
  1957. stdcall;
  1958. function SetVarHelpContext(index: Integer; dwHelpContext: Longint): HResult;
  1959. stdcall;
  1960. function SetMops(index: Integer; const bstrMops: WideString): HResult; stdcall;
  1961. function SetTypeIdldesc(const idldesc: TIDLDesc): HResult; stdcall;
  1962. function LayOut: HResult; stdcall;
  1963. end;
  1964. { ICreateTypeInfo2 interface }
  1965. ICreateTypeInfo2 = interface(ICreateTypeInfo)
  1966. ['{0002040E-0000-0000-C000-000000000046}']
  1967. function DeleteFuncDesc(index: Integer): HResult; stdcall;
  1968. function DeleteFuncDescByMemId(memid: TMemberID; invKind: TInvokeKind): HResult; stdcall;
  1969. function DeleteVarDesc(index: Integer): HResult; stdcall;
  1970. function DeleteVarDescByMemId(memid: TMemberID): HResult; stdcall;
  1971. function DeleteImplType(index: Integer): HResult; stdcall;
  1972. function SetCustData(const guid: TGUID; pVarVal: POleVariant): HResult; stdcall;
  1973. function SetFuncCustData(index: Integer; const guid: TGUID;
  1974. pVarVal: POleVariant): HResult; stdcall;
  1975. function SetParamCustData(indexFunc: Integer; indexParam: Integer;
  1976. const guid: TGUID; pVarVal: POleVariant): HResult; stdcall;
  1977. function SetVarCustData(index: Integer; const guid: TGUID;
  1978. pVarVal: POleVariant): HResult; stdcall;
  1979. function SetImplTypeCustData(index: Integer; const guid: TGUID;
  1980. pVarVal: POleVariant): HResult; stdcall;
  1981. function SetHelpStringContext(dwHelpStringContext: Longint): HResult; stdcall;
  1982. function SetFuncHelpStringContext(index: Integer;
  1983. dwHelpStringContext: Longint): HResult; stdcall;
  1984. function SetVarHelpStringContext(index: Integer;
  1985. dwHelpStringContext: Longint): HResult; stdcall;
  1986. function Invalidate: HResult; stdcall;
  1987. function SetName(szName: POleStr): HResult; stdcall;
  1988. end;
  1989. { ICreateTypeLib interface }
  1990. ICreateTypeLib = interface(IUnknown)
  1991. ['{00020406-0000-0000-C000-000000000046}']
  1992. function CreateTypeInfo(szName: POleStr; tkind: TTypeKind;
  1993. out ictinfo: ICreateTypeInfo): HResult; stdcall;
  1994. function SetName(szName: POleStr): HResult; stdcall;
  1995. function SetVersion(wMajorVerNum: Word; wMinorVerNum: Word): HResult; stdcall;
  1996. function SetGuid(const guid: TGUID): HResult; stdcall;
  1997. function SetDocString(szDoc: POleStr): HResult; stdcall;
  1998. function SetHelpFileName(szHelpFileName: POleStr): HResult; stdcall;
  1999. function SetHelpContext(dwHelpContext: Longint): HResult; stdcall;
  2000. function SetLcid(lcid: TLCID): HResult; stdcall;
  2001. function SetLibFlags(uLibFlags: Integer): HResult; stdcall;
  2002. function SaveAllChanges: HResult; stdcall;
  2003. end;
  2004. ICreateTypeLib2 = interface(ICreateTypeLib)
  2005. ['{0002040F-0000-0000-C000-000000000046}']
  2006. function DeleteTypeInfo(szName: PWideChar): HResult; stdcall;
  2007. function SetCustData(const guid: TGUID; pVarVal: POleVariant): HResult; stdcall;
  2008. function SetHelpStringContext(dwHelpStringContext: Longint): HResult; stdcall;
  2009. function SetHelpStringDll(szFileName: PWideChar): HResult; stdcall;
  2010. end;
  2011. { IEnumVARIANT interface }
  2012. { Casing of this matches the MS platform SDK casing. Needs to be this way, or C++
  2013. will break. }
  2014. IEnumVARIANT = interface(IUnknown)
  2015. ['{00020404-0000-0000-C000-000000000046}']
  2016. function Next(celt: LongWord; var rgvar : OleVariant;
  2017. out pceltFetched: LongWord): HResult; stdcall;
  2018. function Skip(celt: LongWord): HResult; stdcall;
  2019. function Reset: HResult; stdcall;
  2020. function Clone(out Enum: IEnumVARIANT): HResult; stdcall;
  2021. end;
  2022. { ITypeComp interface }
  2023. TDescKind = Longint;
  2024. PBindPtr = ^TBindPtr;
  2025. tagBINDPTR = record
  2026. case Integer of
  2027. 0: (lpfuncdesc: PFuncDesc);
  2028. 1: (lpvardesc: PVarDesc);
  2029. 2: (lptcomp: Pointer {ITypeComp});
  2030. end;
  2031. TBindPtr = tagBINDPTR;
  2032. BINDPTR = TBindPtr;
  2033. ITypeComp = interface(IUnknown)
  2034. ['{00020403-0000-0000-C000-000000000046}']
  2035. function Bind(szName: POleStr; lHashVal: Longint; wflags: Word;
  2036. out tinfo: ITypeInfo; out desckind: TDescKind;
  2037. out bindptr: TBindPtr): HResult; stdcall;
  2038. function BindType(szName: POleStr; lHashVal: Longint;
  2039. out tinfo: ITypeInfo; out tcomp: ITypeComp): HResult;
  2040. stdcall;
  2041. end;
  2042. { ITypeInfo interface }
  2043. ITypeInfo = interface(IUnknown)
  2044. ['{00020401-0000-0000-C000-000000000046}']
  2045. function GetTypeAttr(out ptypeattr: PTypeAttr): HResult; stdcall;
  2046. function GetTypeComp(out tcomp: ITypeComp): HResult; stdcall;
  2047. function GetFuncDesc(index: Integer; out pfuncdesc: PFuncDesc): HResult;
  2048. stdcall;
  2049. function GetVarDesc(index: Integer; out pvardesc: PVarDesc): HResult;
  2050. stdcall;
  2051. function GetNames(memid: TMemberID; rgbstrNames: PBStrList;
  2052. cMaxNames: Integer; out cNames: Integer): HResult; stdcall;
  2053. function GetRefTypeOfImplType(index: Integer; out reftype: HRefType): HResult;
  2054. stdcall;
  2055. function GetImplTypeFlags(index: Integer; out impltypeflags: Integer): HResult;
  2056. stdcall;
  2057. function GetIDsOfNames(rgpszNames: POleStrList; cNames: Integer;
  2058. rgmemid: PMemberIDList): HResult; stdcall;
  2059. function Invoke(pvInstance: Pointer; memid: TMemberID; flags: Word;
  2060. var dispParams: TDispParams; varResult: PVariant;
  2061. excepInfo: PExcepInfo; argErr: PInteger): HResult; stdcall;
  2062. function GetDocumentation(memid: TMemberID; pbstrName: PWideString;
  2063. pbstrDocString: PWideString; pdwHelpContext: PLongint;
  2064. pbstrHelpFile: PWideString): HResult; stdcall;
  2065. function GetDllEntry(memid: TMemberID; invkind: TInvokeKind;
  2066. bstrDllName, bstrName: PWideString; wOrdinal: PWord): HResult;
  2067. stdcall;
  2068. function GetRefTypeInfo(reftype: HRefType; out tinfo: ITypeInfo): HResult;
  2069. stdcall;
  2070. function AddressOfMember(memid: TMemberID; invkind: TInvokeKind;
  2071. out ppv: Pointer): HResult; stdcall;
  2072. function CreateInstance(const unkOuter: IUnknown; const iid: TIID;
  2073. out vObj): HResult; stdcall;
  2074. function GetMops(memid: TMemberID; out bstrMops: WideString): HResult;
  2075. stdcall;
  2076. function GetContainingTypeLib(out tlib: ITypeLib; out pindex: Integer): HResult;
  2077. stdcall;
  2078. procedure ReleaseTypeAttr(ptypeattr: PTypeAttr); stdcall;
  2079. procedure ReleaseFuncDesc(pfuncdesc: PFuncDesc); stdcall;
  2080. procedure ReleaseVarDesc(pvardesc: PVarDesc); stdcall;
  2081. end;
  2082. { ITypeLib interface }
  2083. TSysKind = Longint;
  2084. PTLibAttr = ^TTLibAttr;
  2085. tagTLIBATTR = record
  2086. guid: TGUID;
  2087. lcid: TLCID;
  2088. syskind: TSysKind;
  2089. wMajorVerNum: Word;
  2090. wMinorVerNum: Word;
  2091. wLibFlags: Word;
  2092. end;
  2093. TTLibAttr = tagTLIBATTR;
  2094. TLIBATTR = TTLibAttr;
  2095. PTypeInfoList = ^TTypeInfoList;
  2096. TTypeInfoList = array[0..65535] of ITypeInfo;
  2097. ITypeLib = interface(IUnknown)
  2098. ['{00020402-0000-0000-C000-000000000046}']
  2099. function GetTypeInfoCount: Integer; stdcall;
  2100. function GetTypeInfo(index: Integer; out tinfo: ITypeInfo): HResult; stdcall;
  2101. function GetTypeInfoType(index: Integer; out tkind: TTypeKind): HResult;
  2102. stdcall;
  2103. function GetTypeInfoOfGuid(const guid: TGUID; out tinfo: ITypeInfo): HResult;
  2104. stdcall;
  2105. function GetLibAttr(out ptlibattr: PTLibAttr): HResult; stdcall;
  2106. function GetTypeComp(out tcomp: ITypeComp): HResult; stdcall;
  2107. function GetDocumentation(index: Integer; pbstrName: PWideString;
  2108. pbstrDocString: PWideString; pdwHelpContext: PLongint;
  2109. pbstrHelpFile: PWideString): HResult; stdcall;
  2110. function IsName(szNameBuf: POleStr; lHashVal: Longint; out fName: BOOL): HResult;
  2111. stdcall;
  2112. function FindName(szNameBuf: POleStr; lHashVal: Longint;
  2113. rgptinfo: PTypeInfoList; rgmemid: PMemberIDList;
  2114. out pcFound: Word): HResult; stdcall;
  2115. procedure ReleaseTLibAttr(ptlibattr: PTLibAttr); stdcall;
  2116. end;
  2117. { ITypeLib2 interface }
  2118. PCustDataItem = ^TCustDataItem;
  2119. tagCUSTDATAITEM = record
  2120. guid: TGUID;
  2121. varValue: TVariantArg;
  2122. end;
  2123. TCustDataItem = tagCUSTDATAITEM;
  2124. CUSTDATAITEM = TCustDataItem;
  2125. PCustDataItemList = ^TCustDataItemList;
  2126. TCustDataItemList = array[0..65535] of TCustDataItem;
  2127. PCustData = ^TCustData;
  2128. tagCUSTDATA = record
  2129. cCustData: DWORD;
  2130. prgCustData: PCustDataItemList;
  2131. end;
  2132. TCustData = tagCUSTDATA;
  2133. CUSTDATA = TCustData;
  2134. ITypeLib2 = interface(ITypeLib)
  2135. ['{00020411-0000-0000-C000-000000000046}']
  2136. function GetCustData(guid: TGUID;
  2137. out pVarVal: OleVariant): HResult; stdcall;
  2138. function GetLibStatistics(pcUniqueNames: PLongInt;
  2139. out pcchUniqueNames: LongInt): HResult; stdcall;
  2140. function GetDocumentation2(index: Integer; lcid: TLCID;
  2141. pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD;
  2142. pbstrHelpStringDll: PWideString): HResult; stdcall;
  2143. function GetAllCustData(out pCustData: TCustData): HResult; stdcall;
  2144. end;
  2145. ITypeInfo2 = interface(ITypeInfo)
  2146. ['{00020412-0000-0000-C000-000000000046}']
  2147. function GetTypeKind(out pTypeKind: TTypeKind): HResult; stdcall;
  2148. function GetTypeFlags(out pTypeFlags: LongInt): HResult; stdcall;
  2149. function GetFuncIndexOfMemId(memid: TMemberID; invKind: TInvokeKind;
  2150. out pFuncIndex: UINT): HResult; stdcall;
  2151. function GetVarIndexOfMemId(memid: TMemberID; out pVarIndex: UINT): HResult; stdcall;
  2152. function GetCustData(guid: TGUID; out pVarVal: OleVariant): HResult; stdcall;
  2153. function GetFuncCustData(index: UINT; guid: TGUID;
  2154. out pVarVal: OleVariant): HResult; stdcall;
  2155. function GetParamCustData(indexFunc, indexParam: UINT; guid: TGUID;
  2156. out pVarVal: OleVariant): HResult; stdcall;
  2157. function GetVarCustData(index: UINT; guid: TGUID;
  2158. out pVarVal: OleVariant): HResult; stdcall;
  2159. function GetImplTypeCustData(index: UINT; guid: TGUID;
  2160. out pVarVal: OleVariant): HResult; stdcall;
  2161. function GetDocumentation2(memid: TMemberID; lcid: TLCID;
  2162. pbstrHelpString: PWideString; pdwHelpStringContext: PDWORD;
  2163. pbstrHelpStringDll: PWideString): HResult; stdcall;
  2164. function GetAllCustData(out pCustData: TCustData): HResult; stdcall;
  2165. function GetAllFuncCustData(index: UINT; out pCustData: TCustData): HResult; stdcall;
  2166. function GetAllParamCustData(indexFunc, indexParam: UINT;
  2167. out pCustData: TCustData): HResult; stdcall;
  2168. function GetAllVarCustData(index: UINT; out pCustData: TCustData): HResult; stdcall;
  2169. function GetAllImplTypeCustData(index: UINT; out pCustData: TCustData): HResult; stdcall;
  2170. end;
  2171. { IErrorInfo interface }
  2172. IErrorInfo = interface(IUnknown)
  2173. ['{1CF2B120-547D-101B-8E65-08002B2BD119}']
  2174. function GetGUID(out guid: TGUID): HResult; stdcall;
  2175. function GetSource(out bstrSource: WideString): HResult; stdcall;
  2176. function GetDescription(out bstrDescription: WideString): HResult; stdcall;
  2177. function GetHelpFile(out bstrHelpFile: WideString): HResult; stdcall;
  2178. function GetHelpContext(out dwHelpContext: Longint): HResult; stdcall;
  2179. end;
  2180. { ICreateErrorInfo interface }
  2181. ICreateErrorInfo = interface(IUnknown)
  2182. ['{22F03340-547D-101B-8E65-08002B2BD119}']
  2183. function SetGUID(const guid: TGUID): HResult; stdcall;
  2184. function SetSource(szSource: POleStr): HResult; stdcall;
  2185. function SetDescription(szDescription: POleStr): HResult; stdcall;
  2186. function SetHelpFile(szHelpFile: POleStr): HResult; stdcall;
  2187. function SetHelpContext(dwHelpContext: Longint): HResult; stdcall;
  2188. end;
  2189. { ISupportErrorInfo interface }
  2190. ISupportErrorInfo = interface(IUnknown)
  2191. ['{DF0B3D60-548F-101B-8E65-08002B2BD119}']
  2192. function InterfaceSupportsErrorInfo(const iid: TIID): HResult; stdcall;
  2193. end;
  2194. { from OLEAUTO.H }
  2195. { IDispatch implementation support }
  2196. PParamData = ^TParamData;
  2197. tagPARAMDATA = record
  2198. szName: POleStr;
  2199. vt: TVarType;
  2200. end;
  2201. TParamData = tagPARAMDATA;
  2202. PARAMDATA = TParamData;
  2203. PParamDataList = ^TParamDataList;
  2204. TParamDataList = array[0..65535] of TParamData;
  2205. PMethodData = ^TMethodData;
  2206. tagMETHODDATA = record
  2207. szName: POleStr;
  2208. ppdata: PParamDataList;
  2209. dispid: TDispID;
  2210. iMeth: Integer;
  2211. cc: TCallConv;
  2212. cArgs: Integer;
  2213. wFlags: Word;
  2214. vtReturn: TVarType;
  2215. end;
  2216. TMethodData = tagMETHODDATA;
  2217. METHODDATA = TMethodData;
  2218. PMethodDataList = ^TMethodDataList;
  2219. TMethodDataList = array[0..65535] of TMethodData;
  2220. PInterfaceData = ^TInterfaceData;
  2221. tagINTERFACEDATA = record
  2222. pmethdata: PMethodDataList;
  2223. cMembers: Integer;
  2224. end;
  2225. TInterfaceData = tagINTERFACEDATA;
  2226. INTERFACEDATA = TInterfaceData;
  2227. tagREGKIND = (REGKIND_DEFAULT, REGKIND_REGISTER, REGKIND_NONE);
  2228. TRegKind = tagREGKIND;
  2229. { from OLEIDL.H }
  2230. { IOleAdviseHolder interface }
  2231. IOleAdviseHolder = interface(IUnknown)
  2232. ['{00000111-0000-0000-C000-000000000046}']
  2233. function Advise(const advise: IAdviseSink; out dwConnection: Longint): HResult;
  2234. stdcall;
  2235. function Unadvise(dwConnection: Longint): HResult; stdcall;
  2236. function EnumAdvise(out enumAdvise: IEnumStatData): HResult; stdcall;
  2237. function SendOnRename(const mk: IMoniker): HResult; stdcall;
  2238. function SendOnSave: HResult; stdcall;
  2239. function SendOnClose: HResult; stdcall;
  2240. end;
  2241. { IOleCache interface }
  2242. IOleCache = interface(IUnknown)
  2243. ['{0000011E-0000-0000-C000-000000000046}']
  2244. function Cache(const formatetc: TFormatEtc; advf: Longint;
  2245. out dwConnection: Longint): HResult; stdcall;
  2246. function Uncache(dwConnection: Longint): HResult; stdcall;
  2247. function EnumCache(out enumStatData: IEnumStatData): HResult;
  2248. stdcall;
  2249. function InitCache(const dataObject: IDataObject): HResult; stdcall;
  2250. function SetData(const formatetc: TFormatEtc; const medium: TStgMedium;
  2251. fRelease: BOOL): HResult; stdcall;
  2252. end;
  2253. { IOleCache2 interface }
  2254. IOleCache2 = interface(IOleCache)
  2255. ['{00000128-0000-0000-C000-000000000046}']
  2256. function UpdateCache(const dataObject: IDataObject; grfUpdf: Longint;
  2257. pReserved: Pointer): HResult; stdcall;
  2258. function DiscardCache(dwDiscardOptions: Longint): HResult; stdcall;
  2259. end;
  2260. { IOleCacheControl interface }
  2261. IOleCacheControl = interface(IUnknown)
  2262. ['{00000129-0000-0000-C000-000000000046}']
  2263. function OnRun(const dataObject: IDataObject): HResult; stdcall;
  2264. function OnStop: HResult; stdcall;
  2265. end;
  2266. { IParseDisplayName interface }
  2267. IParseDisplayName = interface(IUnknown)
  2268. ['{0000011A-0000-0000-C000-000000000046}']
  2269. function ParseDisplayName(const bc: IBindCtx; pszDisplayName: POleStr;
  2270. out chEaten: Longint; out mkOut: IMoniker): HResult; stdcall;
  2271. end;
  2272. { IOleContainer interface }
  2273. IOleContainer = interface(IParseDisplayName)
  2274. ['{0000011B-0000-0000-C000-000000000046}']
  2275. function EnumObjects(grfFlags: Longint; out Enum: IEnumUnknown): HResult;
  2276. stdcall;
  2277. function LockContainer(fLock: BOOL): HResult; stdcall;
  2278. end;
  2279. { IOleClientSite interface }
  2280. IOleClientSite = interface(IUnknown)
  2281. ['{00000118-0000-0000-C000-000000000046}']
  2282. function SaveObject: HResult; stdcall;
  2283. function GetMoniker(dwAssign: Longint; dwWhichMoniker: Longint;
  2284. out mk: IMoniker): HResult; stdcall;
  2285. function GetContainer(out container: IOleContainer): HResult; stdcall;
  2286. function ShowObject: HResult; stdcall;
  2287. function OnShowWindow(fShow: BOOL): HResult; stdcall;
  2288. function RequestNewObjectLayout: HResult; stdcall;
  2289. end;
  2290. { IOleObject interface }
  2291. IOleObject = interface(IUnknown)
  2292. ['{00000112-0000-0000-C000-000000000046}']
  2293. function SetClientSite(const clientSite: IOleClientSite): HResult;
  2294. stdcall;
  2295. function GetClientSite(out clientSite: IOleClientSite): HResult;
  2296. stdcall;
  2297. function SetHostNames(szContainerApp: POleStr;
  2298. szContainerObj: POleStr): HResult; stdcall;
  2299. function Close(dwSaveOption: Longint): HResult; stdcall;
  2300. function SetMoniker(dwWhichMoniker: Longint; const mk: IMoniker): HResult;
  2301. stdcall;
  2302. function GetMoniker(dwAssign: Longint; dwWhichMoniker: Longint;
  2303. out mk: IMoniker): HResult; stdcall;
  2304. function InitFromData(const dataObject: IDataObject; fCreation: BOOL;
  2305. dwReserved: Longint): HResult; stdcall;
  2306. function GetClipboardData(dwReserved: Longint;
  2307. out dataObject: IDataObject): HResult; stdcall;
  2308. function DoVerb(iVerb: Longint; msg: PMsg; const activeSite: IOleClientSite;
  2309. lindex: Longint; hwndParent: HWND; const posRect: TRect): HResult;
  2310. stdcall;
  2311. function EnumVerbs(out enumOleVerb: IEnumOleVerb): HResult; stdcall;
  2312. function Update: HResult; stdcall;
  2313. function IsUpToDate: HResult; stdcall;
  2314. function GetUserClassID(out clsid: TCLSID): HResult; stdcall;
  2315. function GetUserType(dwFormOfType: Longint; out pszUserType: POleStr): HResult;
  2316. stdcall;
  2317. function SetExtent(dwDrawAspect: Longint; const size: TPoint): HResult;
  2318. stdcall;
  2319. function GetExtent(dwDrawAspect: Longint; out size: TPoint): HResult;
  2320. stdcall;
  2321. function Advise(const advSink: IAdviseSink; out dwConnection: Longint): HResult;
  2322. stdcall;
  2323. function Unadvise(dwConnection: Longint): HResult; stdcall;
  2324. function EnumAdvise(out enumAdvise: IEnumStatData): HResult; stdcall;
  2325. function GetMiscStatus(dwAspect: Longint; out dwStatus: Longint): HResult;
  2326. stdcall;
  2327. function SetColorScheme(const logpal: TLogPalette): HResult; stdcall;
  2328. end;
  2329. { OLE types }
  2330. PObjectDescriptor = ^TObjectDescriptor;
  2331. tagOBJECTDESCRIPTOR = record
  2332. cbSize: Longint;
  2333. clsid: TCLSID;
  2334. dwDrawAspect: Longint;
  2335. size: TPoint;
  2336. point: TPoint;
  2337. dwStatus: Longint;
  2338. dwFullUserTypeName: Longint;
  2339. dwSrcOfCopy: Longint;
  2340. end;
  2341. TObjectDescriptor = tagOBJECTDESCRIPTOR;
  2342. OBJECTDESCRIPTOR = TObjectDescriptor;
  2343. PLinkSrcDescriptor = PObjectDescriptor;
  2344. TLinkSrcDescriptor = TObjectDescriptor;
  2345. { IOleWindow interface }
  2346. IOleWindow = interface(IUnknown)
  2347. ['{00000114-0000-0000-C000-000000000046}']
  2348. function GetWindow(out wnd: HWnd): HResult; stdcall;
  2349. function ContextSensitiveHelp(fEnterMode: BOOL): HResult; stdcall;
  2350. end;
  2351. { IOleLink interface }
  2352. IOleLink = interface(IUnknown)
  2353. ['{0000011D-0000-0000-C000-000000000046}']
  2354. function SetUpdateOptions(dwUpdateOpt: Longint): HResult;
  2355. stdcall;
  2356. function GetUpdateOptions(out dwUpdateOpt: Longint): HResult; stdcall;
  2357. function SetSourceMoniker(const mk: IMoniker; const clsid: TCLSID): HResult;
  2358. stdcall;
  2359. function GetSourceMoniker(out mk: IMoniker): HResult; stdcall;
  2360. function SetSourceDisplayName(pszDisplayName: POleStr): HResult;
  2361. stdcall;
  2362. function GetSourceDisplayName(out pszDisplayName: POleStr): HResult;
  2363. stdcall;
  2364. function BindToSource(bindflags: Longint; const bc: IBindCtx): HResult;
  2365. stdcall;
  2366. function BindIfRunning: HResult; stdcall;
  2367. function GetBoundSource(out unk: IUnknown): HResult; stdcall;
  2368. function UnbindSource: HResult; stdcall;
  2369. function Update(const bc: IBindCtx): HResult; stdcall;
  2370. end;
  2371. { IOleItemContainer interface }
  2372. IOleItemContainer = interface(IOleContainer)
  2373. ['{0000011C-0000-0000-C000-000000000046}']
  2374. function GetObject(pszItem: POleStr; dwSpeedNeeded: Longint;
  2375. const bc: IBindCtx; const iid: TIID; out vObject): HResult; stdcall;
  2376. function GetObjectStorage(pszItem: POleStr; const bc: IBindCtx;
  2377. const iid: TIID; out vStorage): HResult; stdcall;
  2378. function IsRunning(pszItem: POleStr): HResult; stdcall;
  2379. end;
  2380. { IOleInPlaceUIWindow interface }
  2381. IOleInPlaceUIWindow = interface(IOleWindow)
  2382. ['{00000115-0000-0000-C000-000000000046}']
  2383. function GetBorder(out rectBorder: TRect): HResult; stdcall;
  2384. function RequestBorderSpace(const borderwidths: TRect): HResult; stdcall;
  2385. function SetBorderSpace(pborderwidths: PRect): HResult; stdcall;
  2386. function SetActiveObject(const activeObject: IOleInPlaceActiveObject;
  2387. pszObjName: POleStr): HResult; stdcall;
  2388. end;
  2389. { IOleInPlaceActiveObject interface }
  2390. IOleInPlaceActiveObject = interface(IOleWindow)
  2391. ['{00000117-0000-0000-C000-000000000046}']
  2392. function TranslateAccelerator(var msg: TMsg): HResult; stdcall;
  2393. function OnFrameWindowActivate(fActivate: BOOL): HResult; stdcall;
  2394. function OnDocWindowActivate(fActivate: BOOL): HResult; stdcall;
  2395. function ResizeBorder(const rcBorder: TRect; const uiWindow: IOleInPlaceUIWindow;
  2396. fFrameWindow: BOOL): HResult; stdcall;
  2397. function EnableModeless(fEnable: BOOL): HResult; stdcall;
  2398. end;
  2399. { IOleInPlaceFrame interface }
  2400. POleInPlaceFrameInfo = ^TOleInPlaceFrameInfo;
  2401. tagOIFI = record
  2402. cb: Integer;
  2403. fMDIApp: BOOL;
  2404. hwndFrame: HWND;
  2405. haccel: HAccel;
  2406. cAccelEntries: Integer;
  2407. end;
  2408. TOleInPlaceFrameInfo = tagOIFI;
  2409. OLEINPLACEFRAMEINFO = TOleInPlaceFrameInfo;
  2410. POleMenuGroupWidths = ^TOleMenuGroupWidths;
  2411. tagOleMenuGroupWidths = record
  2412. width: array[0..5] of Longint;
  2413. end;
  2414. TOleMenuGroupWidths = tagOleMenuGroupWidths;
  2415. OLEMENUGROUPWIDTHS = TOleMenuGroupWidths;
  2416. IOleInPlaceFrame = interface(IOleInPlaceUIWindow)
  2417. ['{00000116-0000-0000-C000-000000000046}']
  2418. function InsertMenus(hmenuShared: HMenu;
  2419. var menuWidths: TOleMenuGroupWidths): HResult; stdcall;
  2420. function SetMenu(hmenuShared: HMenu; holemenu: HMenu;
  2421. hwndActiveObject: HWnd): HResult; stdcall;
  2422. function RemoveMenus(hmenuShared: HMenu): HResult; stdcall;
  2423. function SetStatusText(pszStatusText: POleStr): HResult; stdcall;
  2424. function EnableModeless(fEnable: BOOL): HResult; stdcall;
  2425. function TranslateAccelerator(var msg: TMsg; wID: Word): HResult; stdcall;
  2426. end;
  2427. { IOleInPlaceObject interface }
  2428. IOleInPlaceObject = interface(IOleWindow)
  2429. ['{00000113-0000-0000-C000-000000000046}']
  2430. function InPlaceDeactivate: HResult; stdcall;
  2431. function UIDeactivate: HResult; stdcall;
  2432. function SetObjectRects(const rcPosRect: TRect;
  2433. const rcClipRect: TRect): HResult; stdcall;
  2434. function ReactivateAndUndo: HResult; stdcall;
  2435. end;
  2436. { IOleInPlaceSite interface }
  2437. IOleInPlaceSite = interface(IOleWindow)
  2438. ['{00000119-0000-0000-C000-000000000046}']
  2439. function CanInPlaceActivate: HResult; stdcall;
  2440. function OnInPlaceActivate: HResult; stdcall;
  2441. function OnUIActivate: HResult; stdcall;
  2442. function GetWindowContext(out frame: IOleInPlaceFrame;
  2443. out doc: IOleInPlaceUIWindow; out rcPosRect: TRect;
  2444. out rcClipRect: TRect; out frameInfo: TOleInPlaceFrameInfo): HResult;
  2445. stdcall;
  2446. function Scroll(scrollExtent: TPoint): HResult; stdcall;
  2447. function OnUIDeactivate(fUndoable: BOOL): HResult; stdcall;
  2448. function OnInPlaceDeactivate: HResult; stdcall;
  2449. function DiscardUndoState: HResult; stdcall;
  2450. function DeactivateAndUndo: HResult; stdcall;
  2451. function OnPosRectChange(const rcPosRect: TRect): HResult; stdcall;
  2452. end;
  2453. { IViewObject interface }
  2454. TContinueFunc = function(dwContinue: Longint): BOOL stdcall;
  2455. IViewObject = interface(IUnknown)
  2456. ['{0000010D-0000-0000-C000-000000000046}']
  2457. function Draw(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer;
  2458. ptd: PDVTargetDevice; hicTargetDev: HDC; hdcDraw: HDC;
  2459. prcBounds: PRect; prcWBounds: PRect; fnContinue: TContinueFunc;
  2460. dwContinue: Longint): HResult; stdcall;
  2461. function GetColorSet(dwDrawAspect: Longint; lindex: Longint;
  2462. pvAspect: Pointer; ptd: PDVTargetDevice; hicTargetDev: HDC;
  2463. out colorSet: PLogPalette): HResult; stdcall;
  2464. function Freeze(dwDrawAspect: Longint; lindex: Longint; pvAspect: Pointer;
  2465. out dwFreeze: Longint): HResult; stdcall;
  2466. function Unfreeze(dwFreeze: Longint): HResult; stdcall;
  2467. function SetAdvise(aspects: Longint; advf: Longint;
  2468. const advSink: IAdviseSink): HResult; stdcall;
  2469. function GetAdvise(pAspects: PLongint; pAdvf: PLongint;
  2470. out advSink: IAdviseSink): HResult; stdcall;
  2471. end;
  2472. { IViewObject2 interface }
  2473. IViewObject2 = interface(IViewObject)
  2474. ['{00000127-0000-0000-C000-000000000046}']
  2475. function GetExtent(dwDrawAspect: Longint; lindex: Longint;
  2476. ptd: PDVTargetDevice; out size: TPoint): HResult; stdcall;
  2477. end;
  2478. { IDropSource interface }
  2479. IDropSource = interface(IUnknown)
  2480. ['{00000121-0000-0000-C000-000000000046}']
  2481. function QueryContinueDrag(fEscapePressed: BOOL;
  2482. grfKeyState: Longint): HResult; stdcall;
  2483. function GiveFeedback(dwEffect: Longint): HResult; stdcall;
  2484. end;
  2485. { IDropTarget interface }
  2486. IDropTarget = interface(IUnknown)
  2487. ['{00000122-0000-0000-C000-000000000046}']
  2488. function DragEnter(const dataObj: IDataObject; grfKeyState: Longint;
  2489. pt: TPoint; var dwEffect: Longint): HResult; stdcall;
  2490. function DragOver(grfKeyState: Longint; pt: TPoint;
  2491. var dwEffect: Longint): HResult; stdcall;
  2492. function DragLeave: HResult; stdcall;
  2493. function Drop(const dataObj: IDataObject; grfKeyState: Longint; pt: TPoint;
  2494. var dwEffect: Longint): HResult; stdcall;
  2495. end;
  2496. { IEnumOleVerb interface }
  2497. POleVerb = ^TOleVerb;
  2498. tagOLEVERB = record
  2499. lVerb: Longint;
  2500. lpszVerbName: POleStr;
  2501. fuFlags: Longint;
  2502. grfAttribs: Longint;
  2503. end;
  2504. TOleVerb = tagOLEVERB;
  2505. OLEVERB = TOleVerb;
  2506. IEnumOLEVERB = interface(IUnknown)
  2507. ['{00000104-0000-0000-C000-000000000046}']
  2508. function Next(celt: Longint; out elt;
  2509. pceltFetched: PLongint): HResult; stdcall;
  2510. function Skip(celt: Longint): HResult; stdcall;
  2511. function Reset: HResult; stdcall;
  2512. function Clone(out enm: IEnumOleVerb): HResult; stdcall;
  2513. end;
  2514. { IOleControl interface }
  2515. IOleControl = interface
  2516. ['{B196B288-BAB4-101A-B69C-00AA00341D07}']
  2517. function GetControlInfo(var ci: TControlInfo): HResult; stdcall;
  2518. function OnMnemonic(msg: PMsg): HResult; stdcall;
  2519. function OnAmbientPropertyChange(dispid: TDispID): HResult; stdcall;
  2520. function FreezeEvents(bFreeze: BOOL): HResult; stdcall;
  2521. end;
  2522. { IOleControlSite interface }
  2523. IOleControlSite = interface
  2524. ['{B196B289-BAB4-101A-B69C-00AA00341D07}']
  2525. function OnControlInfoChanged: HResult; stdcall;
  2526. function LockInPlaceActive(fLock: BOOL): HResult; stdcall;
  2527. function GetExtendedControl(out disp: IDispatch): HResult; stdcall;
  2528. function TransformCoords(var ptlHimetric: TPoint; var ptfContainer: TPointF;
  2529. flags: Longint): HResult; stdcall;
  2530. function TranslateAccelerator(msg: PMsg; grfModifiers: Longint): HResult;
  2531. stdcall;
  2532. function OnFocus(fGotFocus: BOOL): HResult; stdcall;
  2533. function ShowPropertyFrame: HResult; stdcall;
  2534. end;
  2535. { ISimpleFrameSite interface }
  2536. ISimpleFrameSite = interface
  2537. ['{742B0E01-14E6-101B-914E-00AA00300CAB}']
  2538. function PreMessageFilter(wnd: HWnd; msg, wp, lp: Integer;
  2539. out res: Integer; out Cookie: Longint): HResult;
  2540. stdcall;
  2541. function PostMessageFilter(wnd: HWnd; msg, wp, lp: Integer;
  2542. out res: Integer; Cookie: Longint): HResult;
  2543. stdcall;
  2544. end;
  2545. { IObjectWithSite interface }
  2546. IObjectWithSite = interface
  2547. ['{FC4801A3-2BA9-11CF-A229-00AA003D7352}']
  2548. function SetSite(const pUnkSite: IUnknown ):HResult; stdcall;
  2549. function GetSite(const riid: TIID; out site: IUnknown):HResult; stdcall;
  2550. end;
  2551. { IErrorLog interface }
  2552. IErrorLog = interface
  2553. ['{3127CA40-446E-11CE-8135-00AA004BB851}']
  2554. function AddError(pszPropName: POleStr; pExcepInfo: PExcepInfo): HResult; stdcall;
  2555. end;
  2556. { IPropertyBag interface }
  2557. IPropertyBag = interface
  2558. ['{55272A00-42CB-11CE-8135-00AA004BB851}']
  2559. function Read(pszPropName: POleStr; var pvar: OleVariant;
  2560. const pErrorLog: IErrorLog): HResult; stdcall;
  2561. function Write(pszPropName: POleStr; const pvar: OleVariant): HResult; stdcall;
  2562. end;
  2563. { IPersistPropertyBag interface }
  2564. IPersistPropertyBag = interface(IPersist)
  2565. ['{37D84F60-42CB-11CE-8135-00AA004BB851}']
  2566. function InitNew: HResult; stdcall;
  2567. function Load(const pPropBag: IPropertyBag;
  2568. const pErrorLog: IErrorLog): HResult; stdcall;
  2569. function Save(const pPropBag: IPropertyBag; fClearDirty: BOOL;
  2570. fSaveAllProperties: BOOL): HResult; stdcall;
  2571. end;
  2572. { IPersistStreamInit interface }
  2573. IPersistStreamInit = interface(IPersist)
  2574. ['{7FD52380-4E07-101B-AE2D-08002B2EC713}']
  2575. function IsDirty: HResult; stdcall;
  2576. function Load(const stm: IStream): HResult; stdcall;
  2577. function Save(const stm: IStream; fClearDirty: BOOL): HResult; stdcall;
  2578. function GetSizeMax(out cbSize: Largeint): HResult; stdcall;
  2579. function InitNew: HResult; stdcall;
  2580. end;
  2581. { IPropertyNotifySink interface }
  2582. IPropertyNotifySink = interface
  2583. ['{9BFBBC02-EFF1-101A-84ED-00AA00341D07}']
  2584. function OnChanged(dispid: TDispID): HResult; stdcall;
  2585. function OnRequestEdit(dispid: TDispID): HResult; stdcall;
  2586. end;
  2587. { IProvideClassInfo interface }
  2588. IProvideClassInfo = interface
  2589. ['{B196B283-BAB4-101A-B69C-00AA00341D07}']
  2590. function GetClassInfo(out ti: ITypeInfo): HResult; stdcall;
  2591. end;
  2592. { IConnectionPointContainer interface }
  2593. IConnectionPointContainer = interface
  2594. ['{B196B284-BAB4-101A-B69C-00AA00341D07}']
  2595. function EnumConnectionPoints(out Enum: IEnumConnectionPoints): HResult;
  2596. stdcall;
  2597. function FindConnectionPoint(const iid: TIID;
  2598. out cp: IConnectionPoint): HResult; stdcall;
  2599. end;
  2600. { IEnumConnectionPoints interface }
  2601. IEnumConnectionPoints = interface
  2602. ['{B196B285-BAB4-101A-B69C-00AA00341D07}']
  2603. function Next(celt: Longint; out elt;
  2604. pceltFetched: PLongint): HResult; stdcall;
  2605. function Skip(celt: Longint): HResult; stdcall;
  2606. function Reset: HResult; stdcall;
  2607. function Clone(out Enum: IEnumConnectionPoints): HResult;
  2608. stdcall;
  2609. end;
  2610. { IConnectionPoint interface }
  2611. IConnectionPoint = interface
  2612. ['{B196B286-BAB4-101A-B69C-00AA00341D07}']
  2613. function GetConnectionInterface(out iid: TIID): HResult; stdcall;
  2614. function GetConnectionPointContainer(out cpc: IConnectionPointContainer): HResult;
  2615. stdcall;
  2616. function Advise(const unkSink: IUnknown; out dwCookie: Longint): HResult; stdcall;
  2617. function Unadvise(dwCookie: Longint): HResult; stdcall;
  2618. function EnumConnections(out Enum: IEnumConnections): HResult; stdcall;
  2619. end;
  2620. { from OCIDL.H }
  2621. { TConnectData structure }
  2622. PConnectData = ^TConnectData;
  2623. tagCONNECTDATA = record
  2624. pUnk: IUnknown;
  2625. dwCookie: Longint;
  2626. end;
  2627. TConnectData = tagCONNECTDATA;
  2628. CONNECTDATA = TConnectData;
  2629. { IEnumConnections interface }
  2630. IEnumConnections = interface
  2631. ['{B196B287-BAB4-101A-B69C-00AA00341D07}']
  2632. function Next(celt: Longint; out elt;
  2633. pceltFetched: PLongint): HResult; stdcall;
  2634. function Skip(celt: Longint): HResult; stdcall;
  2635. function Reset: HResult; stdcall;
  2636. function Clone(out Enum: IEnumConnections): HResult; stdcall;
  2637. end;
  2638. { TLicInfo structure }
  2639. PLicInfo = ^TLicInfo;
  2640. tagLICINFO = record
  2641. cbLicInfo: Longint;
  2642. fRuntimeKeyAvail: BOOL;
  2643. fLicVerified: BOOL;
  2644. end;
  2645. TLicInfo = tagLICINFO;
  2646. LICINFO = TLicInfo;
  2647. { IClassFactory2 interface }
  2648. IClassFactory2 = interface(IClassFactory)
  2649. ['{B196B28F-BAB4-101A-B69C-00AA00341D07}']
  2650. function GetLicInfo(var licInfo: TLicInfo): HResult; stdcall;
  2651. function RequestLicKey(dwResrved: Longint; out bstrKey: WideString): HResult;
  2652. stdcall;
  2653. function CreateInstanceLic(const unkOuter: IUnknown; const unkReserved: IUnknown;
  2654. const iid: TIID; const bstrKey: WideString; out vObject): HResult; stdcall;
  2655. end;
  2656. { TCAUUID structure - a counted array of TGUID }
  2657. PGUIDList = ^TGUIDList;
  2658. TGUIDList = array[0..65535] of TGUID;
  2659. PCAGUID = ^TCAGUID;
  2660. tagCAUUID = record
  2661. cElems: Longint;
  2662. pElems: PGUIDList;
  2663. end;
  2664. TCAGUID = tagCAUUID;
  2665. CAUUID = TCAGUID;
  2666. { TCAPOleStr structure - a counted array of POleStr }
  2667. PCAPOleStr = ^TCAPOleStr; //???
  2668. tagCALPOLESTR = record
  2669. cElems: Longint;
  2670. pElems: POleStrList;
  2671. end;
  2672. CALPOLESTR = tagCALPOLESTR;
  2673. TCAPOleStr = tagCALPOLESTR;
  2674. { TCALongint - a counted array of Longint }
  2675. PLongintList = ^TLongintList;
  2676. TLongintList = array[0..65535] of Longint;
  2677. PCALongint = ^TCALongint; //???
  2678. tagCADWORD = record
  2679. cElems: Longint;
  2680. pElems: PLongintList;
  2681. end;
  2682. CADWORD = tagCADWORD;
  2683. TCALongint = tagCADWORD;
  2684. { IOleInPlaceObjectWindowless interface }
  2685. IOleInPlaceObjectWindowless = interface(IOleInPlaceObject)
  2686. ['{1C2056CC-5EF4-101B-8BC8-00AA003E3B29}']
  2687. function OnWindowMessage(msg: LongWord; wParam: WPARAM; lParam: LPARAM;
  2688. var lResult: LRESULT): HResult; stdcall;
  2689. function GetDropTarget(out pDropTarget: IDropTarget):HResult ; stdcall;
  2690. end;
  2691. { IOleInPlaceSiteEx interface }
  2692. IOleInPlaceSiteEx = interface(IOleInPlaceSite)
  2693. ['{9C2CAD80-3424-11CF-B670-00AA004CD6D8}']
  2694. function OnInPlaceActivateEx(fNoRedraw: PBOOL;
  2695. dwFlags: DWORD): HResult; stdcall;
  2696. function OnInPlaceDeActivateEx(fNoRedraw: BOOL): HResult; stdcall;
  2697. function RequestUIActivate: HResult; stdcall;
  2698. end;
  2699. { IOleInPlaceSiteWindowless interface }
  2700. IOleInPlaceSiteWindowless = interface(IOleInPlaceSiteEx)
  2701. ['{922EADA0-3424-11CF-B670-00AA004CD6D8}']
  2702. function CanWindowlessActivate: HResult; stdcall;
  2703. function GetCapture: HResult; stdcall;
  2704. function SetCapture(fCapture: BOOL): HResult; stdcall;
  2705. function GetFocus: HResult; stdcall;
  2706. function SetFocus(fFocus: BOOL): HResult; stdcall;
  2707. function GetDC(var Rect: TRect; qrfFlags: DWORD;
  2708. var hDC: HDC): HResult; stdcall;
  2709. function ReleaseDC(hDC: HDC): HResult; stdcall;
  2710. function InvalidateRect(var Rect: TRect; fErase: BOOL): HResult; stdcall;
  2711. function InvalidateRgn(hRGN: HRGN; fErase: BOOL): HResult; stdcall;
  2712. function ScrollRect(dx, dy: Integer; var RectScroll: TRect;
  2713. var RectClip: TRect): HResult; stdcall;
  2714. function AdjustRect(var rc: TRect): HResult; stdcall;
  2715. function OnDefWindowMessage(msg: LongWord; wParam: WPARAM;
  2716. lParam: LPARAM; var LResult: LRESULT): HResult; stdcall;
  2717. end;
  2718. { from OLECTL.H }
  2719. { TOCPFIParams - parameters for OleCreatePropertyFrameIndirect }
  2720. POCPFIParams = ^TOCPFIParams;
  2721. tagOCPFIPARAMS = record
  2722. cbStructSize: Longint;
  2723. hWndOwner: HWnd;
  2724. x: Integer;
  2725. y: Integer;
  2726. lpszCaption: POleStr;
  2727. cObjects: Longint;
  2728. pObjects: Pointer;
  2729. cPages: Longint;
  2730. pPages: Pointer;
  2731. lcid: TLCID;
  2732. dispidInitialProperty: TDispID;
  2733. end;
  2734. TOCPFIParams = tagOCPFIPARAMS;
  2735. OCPFIPARAMS = TOCPFIParams;
  2736. { from OCIDL.H }
  2737. { TPropPageInfo structure - information about a property page }
  2738. PPropPageInfo = ^TPropPageInfo;
  2739. tagPROPPAGEINFO = record
  2740. cb: Longint;
  2741. pszTitle: POleStr;
  2742. size: TSize;
  2743. pszDocString: POleStr;
  2744. pszHelpFile: POleStr;
  2745. dwHelpContext: Longint;
  2746. end;
  2747. TPropPageInfo = tagPROPPAGEINFO;
  2748. PROPPAGEINFO = TPropPageInfo;
  2749. { ISpecifyPropertyPages interface }
  2750. ISpecifyPropertyPages = interface
  2751. ['{B196B28B-BAB4-101A-B69C-00AA00341D07}']
  2752. function GetPages(out pages: TCAGUID): HResult; stdcall;
  2753. end;
  2754. { IPerPropertyBrowsing interface }
  2755. IPerPropertyBrowsing = interface
  2756. ['{376BD3AA-3845-101B-84ED-08002B2EC713}']
  2757. function GetDisplayString(dispid: TDispID; out bstr: WideString): HResult;
  2758. stdcall;
  2759. function MapPropertyToPage(dispid: TDispID; out clsid: TCLSID): HResult;
  2760. stdcall;
  2761. function GetPredefinedStrings(dispid: TDispID; out caStringsOut: TCAPOleStr;
  2762. out caCookiesOut: TCALongint): HResult; stdcall;
  2763. function GetPredefinedValue(dispid: TDispID; dwCookie: Longint;
  2764. out varOut: OleVariant): HResult; stdcall;
  2765. end;
  2766. { IPropertyPageSite interface }
  2767. IPropertyPageSite = interface
  2768. ['{B196B28C-BAB4-101A-B69C-00AA00341D07}']
  2769. function OnStatusChange(flags: Longint): HResult; stdcall;
  2770. function GetLocaleID(out localeID: TLCID): HResult; stdcall;
  2771. function GetPageContainer(out unk: IUnknown): HResult; stdcall;
  2772. function TranslateAccelerator(msg: PMsg): HResult; stdcall;
  2773. end;
  2774. { IPropertyPage interface }
  2775. IPropertyPage = interface
  2776. ['{B196B28D-BAB4-101A-B69C-00AA00341D07}']
  2777. function SetPageSite(const pageSite: IPropertyPageSite): HResult; stdcall;
  2778. function Activate(hwndParent: HWnd; const rc: TRect; bModal: BOOL): HResult;
  2779. stdcall;
  2780. function Deactivate: HResult; stdcall;
  2781. function GetPageInfo(out pageInfo: TPropPageInfo): HResult; stdcall;
  2782. function SetObjects(cObjects: Longint; pUnkList: PUnknownList): HResult; stdcall;
  2783. function Show(nCmdShow: Integer): HResult; stdcall;
  2784. function Move(const rect: TRect): HResult; stdcall;
  2785. function IsPageDirty: HResult; stdcall;
  2786. function Apply: HResult; stdcall;
  2787. function Help(pszHelpDir: POleStr): HResult; stdcall;
  2788. function TranslateAccelerator(msg: PMsg): HResult; stdcall;
  2789. end;
  2790. { IPropertyPage2 interface }
  2791. IPropertyPage2 = interface(IPropertyPage)
  2792. ['{01E44665-24AC-101B-84ED-08002B2EC713}']
  2793. function EditProperty(dispid: TDispID): HResult; stdcall;
  2794. end;
  2795. { IFont interface }
  2796. IFont = interface
  2797. ['{BEF6E002-A874-101A-8BBA-00AA00300CAB}']
  2798. function get_Name(out name: WideString): HResult; stdcall;
  2799. function put_Name(name: WideString): HResult; stdcall;
  2800. function get_Size(out size: Currency): HResult; stdcall;
  2801. function put_Size(size: Currency): HResult; stdcall;
  2802. function get_Bold(out bold: BOOL): HResult; stdcall;
  2803. function put_Bold(bold: BOOL): HResult; stdcall;
  2804. function get_Italic(out italic: BOOL): HResult; stdcall;
  2805. function put_Italic(italic: BOOL): HResult; stdcall;
  2806. function get_Underline(out underline: BOOL): HResult; stdcall;
  2807. function put_Underline(underline: BOOL): HResult; stdcall;
  2808. function get_Strikethrough(out strikethrough: BOOL): HResult; stdcall;
  2809. function put_Strikethrough(strikethrough: BOOL): HResult; stdcall;
  2810. function get_Weight(out weight: Smallint): HResult; stdcall;
  2811. function put_Weight(weight: Smallint): HResult; stdcall;
  2812. function get_Charset(out charset: Smallint): HResult; stdcall;
  2813. function put_Charset(charset: Smallint): HResult; stdcall;
  2814. function get_hFont(out font: HFont): HResult; stdcall;
  2815. function Clone(out font: IFont): HResult; stdcall;
  2816. function IsEqual(const fontOther: IFont): HResult; stdcall;
  2817. function SetRatio(cyLogical, cyHimetric: Longint): HResult; stdcall;
  2818. function QueryTextMetrics(out tm: TTextMetricOle): HResult; stdcall;
  2819. function AddRefHfont(font: HFont): HResult; stdcall;
  2820. function ReleaseHfont(font: HFont): HResult; stdcall;
  2821. end;
  2822. { Font dispatch interface }
  2823. IFontDisp = interface(IDispatch)
  2824. ['{BEF6E003-A874-101A-8BBA-00AA00300CAB}']
  2825. end;
  2826. Font = IFontDisp;
  2827. PSOleAuthenticationService = ^TSOleAuthenticationService;
  2828. tagSOLE_AUTHENTICATION_SERVICE = record
  2829. dwAuthnSvc: Longint;
  2830. dwAuthzSvc: Longint;
  2831. pPrincipalName: POleStr;
  2832. hr: HResult;
  2833. end;
  2834. TSOleAuthenticationService = tagSOLE_AUTHENTICATION_SERVICE;
  2835. SOLE_AUTHENTICATION_SERVICE = TSOleAuthenticationService;
  2836. { from OLECTL.H }
  2837. { TFontDesc structure }
  2838. PFontDesc = ^TFontDesc;
  2839. tagFONTDESC = record
  2840. cbSizeofstruct: Integer;
  2841. lpstrName: POleStr;
  2842. cySize: Currency;
  2843. sWeight: Smallint;
  2844. sCharset: Smallint;
  2845. fItalic: BOOL;
  2846. fUnderline: BOOL;
  2847. fStrikethrough: BOOL;
  2848. end;
  2849. TFontDesc = tagFONTDESC;
  2850. FONTDESC = TFontDesc;
  2851. { from OCIDL.H }
  2852. { IPicture interface }
  2853. IPicture = interface
  2854. ['{7BF80980-BF32-101A-8BBB-00AA00300CAB}']
  2855. function get_Handle(out handle: OLE_HANDLE): HResult; stdcall;
  2856. function get_hPal(out handle: OLE_HANDLE): HResult; stdcall;
  2857. function get_Type(out typ: Smallint): HResult; stdcall;
  2858. function get_Width(out width: OLE_XSIZE_HIMETRIC): HResult; stdcall;
  2859. function get_Height(out height: OLE_YSIZE_HIMETRIC): HResult; stdcall;
  2860. function Render(dc: HDC; x, y, cx, cy: Longint;
  2861. xSrc: OLE_XPOS_HIMETRIC; ySrc: OLE_YPOS_HIMETRIC;
  2862. cxSrc: OLE_XSIZE_HIMETRIC; cySrc: OLE_YSIZE_HIMETRIC;
  2863. const rcWBounds: TRect): HResult; stdcall;
  2864. function set_hPal(hpal: OLE_HANDLE): HResult; stdcall;
  2865. function get_CurDC(out dcOut: HDC): HResult; stdcall;
  2866. function SelectPicture(dcIn: HDC; out hdcOut: HDC;
  2867. out bmpOut: OLE_HANDLE): HResult; stdcall;
  2868. function get_KeepOriginalFormat(out fkeep: BOOL): HResult; stdcall;
  2869. function put_KeepOriginalFormat(fkeep: BOOL): HResult; stdcall;
  2870. function PictureChanged: HResult; stdcall;
  2871. function SaveAsFile(const stream: IStream; fSaveMemCopy: BOOL;
  2872. out cbSize: Longint): HResult; stdcall;
  2873. function get_Attributes(out dwAttr: Longint): HResult; stdcall;
  2874. end;
  2875. { Picture dispatch interface }
  2876. IPictureDisp = interface(IDispatch)
  2877. ['{7BF80981-BF32-101A-8BBB-00AA00300CAB}']
  2878. end;
  2879. Picture = IPictureDisp;
  2880. { from OLECTL.H }
  2881. { TPictDesc structure }
  2882. PPictDesc = ^TPictDesc;
  2883. tagPICTDESC = record
  2884. cbSizeofstruct: Integer;
  2885. picType: Integer;
  2886. case Integer of
  2887. PICTYPE_BITMAP: (
  2888. hbitmap: THandle; { Bitmap }
  2889. hpal: THandle); { Accompanying palette }
  2890. PICTYPE_METAFILE: (
  2891. hMeta: THandle; { Metafile }
  2892. xExt, yExt: Integer); { Extent }
  2893. PICTYPE_ICON: (
  2894. hIcon: THandle); { Icon }
  2895. PICTYPE_ENHMETAFILE: (
  2896. hemf: THandle); { Enhanced Metafile }
  2897. end;
  2898. TPictDesc = tagPICTDESC;
  2899. PICTDESC = TPictDesc;
  2900. { The following ActiveDoc interfaces come from DocObj.idl }
  2901. IOleDocumentView = interface(IUnknown)
  2902. ['{b722bcc6-4e68-101b-a2bc-00aa00404770}']
  2903. function SetInPlaceSite(Site: IOleInPlaceSite):HResult; stdcall;
  2904. function GetInPlaceSite(out Site: IOleInPlaceSite):HResult; stdcall;
  2905. function GetDocument(out P: IUnknown):HResult; stdcall;
  2906. function SetRect(const View: TRECT):HResult; stdcall;
  2907. function GetRect(var View: TRECT):HResult; stdcall;
  2908. function SetRectComplex(const View, HScroll, VScroll, SizeBox):HResult; stdcall;
  2909. function Show(fShow: BOOL):HResult; stdcall;
  2910. function UIActivate(fUIActivate: BOOL):HResult; stdcall;
  2911. function Open:HResult; stdcall;
  2912. function CloseView(dwReserved: DWORD):HResult; stdcall;
  2913. function SaveViewState(pstm: IStream):HResult; stdcall;
  2914. function ApplyViewState(pstm: IStream):HResult; stdcall;
  2915. function Clone(NewSite: IOleInPlaceSite; out NewView: IOleDocumentView):HResult; stdcall;
  2916. end;
  2917. IEnumOleDocumentViews = interface(IUnknown)
  2918. ['{b722bcc8-4e68-101b-a2bc-00aa00404770}']
  2919. function Next(Count: Longint; out View: IOleDocumentView; var Fetched: Longint):HResult; stdcall;
  2920. function Skip(Count: Longint):HResult; stdcall;
  2921. function Reset:HResult; stdcall;
  2922. function Clone(out Enum: IEnumOleDocumentViews):HResult; stdcall;
  2923. end;
  2924. IOleDocument = interface(IUnknown)
  2925. ['{b722bcc5-4e68-101b-a2bc-00aa00404770}']
  2926. function CreateView(Site: IOleInPlaceSite; Stream: IStream; rsrvd: DWORD;
  2927. out View: IOleDocumentView):HResult; stdcall;
  2928. function GetDocMiscStatus(var Status: DWORD):HResult; stdcall;
  2929. function EnumViews(out Enum: IEnumOleDocumentViews;
  2930. out View: IOleDocumentView):HResult; stdcall;
  2931. end;
  2932. IOleDocumentSite = interface(IUnknown)
  2933. ['{b722bcc7-4e68-101b-a2bc-00aa00404770}']
  2934. function ActivateMe(View: IOleDocumentView): HRESULT; stdcall;
  2935. end;
  2936. IContinueCallback = interface(IUnknown)
  2937. ['{b722bcca-4e68-101b-a2bc-00aa00404770}']
  2938. function Continue: HResult; stdcall;
  2939. function ContinuePrinting( nCntPrinted, nCurPage: Longint;
  2940. PrintStatus: PWideChar): HResult; stdcall;
  2941. end;
  2942. {+ ! From servprov.idl: }
  2943. IServiceProvider = interface(IUnknown)
  2944. ['{6d5140c1-7436-11ce-8034-00aa006009fa}']
  2945. function QueryService(const rsid, iid: TGuid; out Obj): HResult; stdcall;
  2946. end;
  2947. PServiceProvider = ^IServiceProvider;
  2948. const
  2949. PRINTFLAG_MAYBOTHERUSER = 1;
  2950. PRINTFLAG_PROMPTUSER = 2;
  2951. PRINTFLAG_USERMAYCHANGEPRINTER = 4;
  2952. PRINTFLAG_RECOMPOSETODEVICE = 8;
  2953. PRINTFLAG_DONTACTUALLYPRINT = 16;
  2954. PRINTFLAG_FORCEPROPERTIES = 32;
  2955. PRINTFLAG_PRINTTOFILE = 64;
  2956. PAGESET_TOLASTPAGE = Cardinal(-1);
  2957. type
  2958. PPageRange = ^TPageRange; //???
  2959. tagPAGERANGE = record
  2960. nFromPage: Longint;
  2961. nToPage: Longint;
  2962. end;
  2963. PAGERANGE = tagPAGERANGE;
  2964. TPageRange = tagPAGERANGE;
  2965. PPageSet = ^TPageSet; //???
  2966. tagPAGESET = record
  2967. cbStruct: Cardinal;
  2968. fOddPages: BOOL;
  2969. fEvenPages: BOOL;
  2970. cPageRange: Cardinal;
  2971. rgPages: array [0..0] of TPageRange;
  2972. end;
  2973. PAGESET = tagPAGESET;
  2974. TPageSet = tagPAGESET;
  2975. IPrint = interface(IUnknown)
  2976. ['{b722bcc9-4e68-101b-a2bc-00aa00404770}']
  2977. function SetInitialPageNum(nFirstPage: Longint): HResult; stdcall;
  2978. function GetPageInfo(var pnFirstPage, pcPages: Longint): HResult; stdcall;
  2979. function Print(grfFlags: DWORD; var td: TDVTARGETDEVICE;
  2980. PageSet: PPageSet; stgmOptions: PStgMedium; Callback: IContinueCallback;
  2981. FirstPage: Longint; pcPagesPrinted, pnLastPage: PLongint): HResult; stdcall;
  2982. end;
  2983. const
  2984. OLECMDIDF_REFRESH_NORMAL = 0;
  2985. OLECMDIDF_REFRESH_IFEXPIRED = 1;
  2986. OLECMDIDF_REFRESH_CONTINUE = 2;
  2987. OLECMDIDF_REFRESH_COMPLETELY = 3;
  2988. OLECMDF_SUPPORTED = 1;
  2989. OLECMDF_ENABLED = 2;
  2990. OLECMDF_LATCHED = 4;
  2991. OLECMDF_NINCHED = 8;
  2992. OLECMDTEXTF_NONE = 0;
  2993. OLECMDTEXTF_NAME = 1;
  2994. OLECMDTEXTF_STATUS = 2;
  2995. OLECMDEXECOPT_DODEFAULT = 0;
  2996. OLECMDEXECOPT_PROMPTUSER = 1;
  2997. OLECMDEXECOPT_DONTPROMPTUSER = 2;
  2998. OLECMDEXECOPT_SHOWHELP = 3;
  2999. OLECMDID_OPEN = 1;
  3000. OLECMDID_NEW = 2;
  3001. OLECMDID_SAVE = 3;
  3002. OLECMDID_SAVEAS = 4;
  3003. OLECMDID_SAVECOPYAS = 5;
  3004. OLECMDID_PRINT = 6;
  3005. OLECMDID_PRINTPREVIEW = 7;
  3006. OLECMDID_PAGESETUP = 8;
  3007. OLECMDID_SPELL = 9;
  3008. OLECMDID_PROPERTIES = 10;
  3009. OLECMDID_CUT = 11;
  3010. OLECMDID_COPY = 12;
  3011. OLECMDID_PASTE = 13;
  3012. OLECMDID_PASTESPECIAL = 14;
  3013. OLECMDID_UNDO = 15;
  3014. OLECMDID_REDO = 16;
  3015. OLECMDID_SELECTALL = 17;
  3016. OLECMDID_CLEARSELECTION = 18;
  3017. OLECMDID_ZOOM = 19;
  3018. OLECMDID_GETZOOMRANGE = 20;
  3019. OLECMDID_UPDATECOMMANDS = 21;
  3020. OLECMDID_REFRESH = 22;
  3021. OLECMDID_STOP = 23;
  3022. OLECMDID_HIDETOOLBARS = 24;
  3023. OLECMDID_SETPROGRESSMAX = 25;
  3024. OLECMDID_SETPROGRESSPOS = 26;
  3025. OLECMDID_SETPROGRESSTEXT = 27;
  3026. OLECMDID_SETTITLE = 28;
  3027. OLECMDID_SETDOWNLOADSTATE = 29;
  3028. OLECMDID_STOPDOWNLOAD = 30;
  3029. // OLECMDID_STOPDOWNLOAD is supported for QueryStatus Only
  3030. // error codes
  3031. OLECMDERR_E_FIRST = OLE_E_LAST+1;
  3032. OLECMDERR_E_NOTSUPPORTED = OLECMDERR_E_FIRST;
  3033. OLECMDERR_E_DISABLED = OLECMDERR_E_FIRST+1;
  3034. OLECMDERR_E_NOHELP = OLECMDERR_E_FIRST+2;
  3035. OLECMDERR_E_CANCELED = OLECMDERR_E_FIRST+3;
  3036. OLECMDERR_E_UNKNOWNGROUP = OLECMDERR_E_FIRST+4;
  3037. MSOCMDERR_E_FIRST = OLECMDERR_E_FIRST;
  3038. MSOCMDERR_E_NOTSUPPORTED = OLECMDERR_E_NOTSUPPORTED;
  3039. MSOCMDERR_E_DISABLED = OLECMDERR_E_DISABLED;
  3040. MSOCMDERR_E_NOHELP = OLECMDERR_E_NOHELP;
  3041. MSOCMDERR_E_CANCELED = OLECMDERR_E_CANCELED;
  3042. MSOCMDERR_E_UNKNOWNGROUP = OLECMDERR_E_UNKNOWNGROUP;
  3043. type
  3044. POleCmd = ^TOleCmd; //???
  3045. _tagOLECMD = record
  3046. cmdID: Cardinal;
  3047. cmdf: Longint;
  3048. end;
  3049. OLECMD = _tagOLECMD;
  3050. TOleCmd = _tagOLECMD;
  3051. POleCmdText = ^TOleCmdText; //???
  3052. _tagOLECMDTEXT = record
  3053. cmdtextf: Longint;
  3054. cwActual: Cardinal;
  3055. cwBuf: Cardinal; // size in wide chars of the buffer for text
  3056. rgwz: array [0..0] of WideChar; // Array into which callee writes the text
  3057. end;
  3058. OLECMDTEXT = _tagOLECMDTEXT;
  3059. TOleCmdText = _tagOLECMDTEXT;
  3060. IOleCommandTarget = interface(IUnknown)
  3061. ['{b722bccb-4e68-101b-a2bc-00aa00404770}']
  3062. function QueryStatus(CmdGroup: PGUID; cCmds: Cardinal;
  3063. prgCmds: POleCmd; CmdText: POleCmdText): HResult; stdcall;
  3064. function Exec(CmdGroup: PGUID; nCmdID, nCmdexecopt: DWORD;
  3065. const vaIn: OleVariant; var vaOut: OleVariant): HResult; stdcall;
  3066. end;
  3067. { from designer.h}
  3068. const
  3069. CATID_Designer: TGUID = '{4EB304D0-7555-11cf-A0C2-00AA0062BE57}';
  3070. type
  3071. IActiveDesigner = interface
  3072. ['{51AAE3E0-7486-11cf-A0C2-00AA0062BE57}']
  3073. function GetRuntimeClassID(var clsid: TGUID): HResult; stdcall;
  3074. function GetRuntimeMiscStatusFlags(var dwMiscFlags: DWORD): HResult; stdcall;
  3075. function QueryPersistenceInterface(const iid: TGUID): HResult; stdcall;
  3076. function SaveRuntimeState(const iidItf: TGUID; const iidObj: TGUID; Obj: IUnknown): HResult; stdcall;
  3077. function GetExtensibilityObject(var ppvObjOut: IDispatch): HResult; stdcall;
  3078. end;
  3079. { from webdc.h }
  3080. const
  3081. CATID_WebDesigntimeControl: TGUID = '{73cef3dd-ae85-11cf-a406-00aa00c00940}';
  3082. type
  3083. IPersistTextStream = interface(IPersistStreamInit)
  3084. ['{56223fe3-d397-11cf-a42e-00aa00c00940}']
  3085. end;
  3086. IProvideRuntimeText = interface
  3087. ['{56223FE1-D397-11cf-A42E-00AA00C00940}']
  3088. function GetRuntimeText( var strRuntimeText: TBSTR ): HResult; stdcall;
  3089. end;
  3090. const
  3091. { from CGUID.H }
  3092. { Standard GUIDs }
  3093. GUID_NULL: TGUID = '{00000000-0000-0000-0000-000000000000}';
  3094. GUID_OLE_COLOR: TGUID = '{66504301-BE0F-101A-8BBB-00AA00300CAB}';
  3095. { Additional GUIDs }
  3096. IID_IRpcChannel: TGUID = '{00000004-0000-0000-C000-000000000046}';
  3097. IID_IRpcStub: TGUID = '{00000005-0000-0000-C000-000000000046}';
  3098. IID_IStubManager: TGUID = '{00000006-0000-0000-C000-000000000046}';
  3099. IID_IRpcProxy: TGUID = '{00000007-0000-0000-C000-000000000046}';
  3100. IID_IProxyManager: TGUID = '{00000008-0000-0000-C000-000000000046}';
  3101. IID_IPSFactory: TGUID = '{00000009-0000-0000-C000-000000000046}';
  3102. IID_IInternalMoniker: TGUID = '{00000011-0000-0000-C000-000000000046}';
  3103. CLSID_StdMarshal: TGUID = '{00000017-0000-0000-C000-000000000046}';
  3104. IID_IEnumGeneric: TGUID = '{00000106-0000-0000-C000-000000000046}';
  3105. IID_IEnumHolder: TGUID = '{00000107-0000-0000-C000-000000000046}';
  3106. IID_IEnumCallback: TGUID = '{00000108-0000-0000-C000-000000000046}';
  3107. IID_IOleManager: TGUID = '{0000011F-0000-0000-C000-000000000046}';
  3108. IID_IOlePresObj: TGUID = '{00000120-0000-0000-C000-000000000046}';
  3109. IID_IDebug: TGUID = '{00000123-0000-0000-C000-000000000046}';
  3110. IID_IDebugStream: TGUID = '{00000124-0000-0000-C000-000000000046}';
  3111. { Standard class IDs }
  3112. CLSID_CFontPropPage: TGUID = '{2542f180-3532-1069-a2cd-00aa0034b50b}';
  3113. CLSID_CColorPropPage: TGUID = '{ddf5a600-b9c0-101a-af1a-00aa0034b50b}';
  3114. CLSID_CPicturePropPage: TGUID = '{fc7af71d-fc74-101a-84ed-08002b2ec713}';
  3115. CLSID_PersistPropset: TGUID = '{fb8f0821-0164-101b-84ed-08002b2ec713}';
  3116. CLSID_ConvertVBX: TGUID = '{fb8f0822-0164-101b-84ed-08002b2ec713}';
  3117. CLSID_StdFont: TGUID = '{fb8f0823-0164-101b-84ed-08002b2ec713}';
  3118. CLSID_StdPicture: TGUID = '{fb8f0824-0164-101b-84ed-08002b2ec713}';
  3119. { from comcat.h }
  3120. { COM Category Manager Interfaces }
  3121. type
  3122. {$NODEFINE IEnumGUID}
  3123. IEnumGUID = interface;
  3124. {$NODEFINE IEnumCATEGORYINFO}
  3125. IEnumCATEGORYINFO = interface;
  3126. {$NODEFINE ICatRegister}
  3127. ICatRegister = interface;
  3128. {$NODEFINE ICatInformation}
  3129. ICatInformation = interface;
  3130. {$NODEFINE PCATEGORYINFO}
  3131. PCATEGORYINFO = ^TCATEGORYINFO;
  3132. {$NODEFINE TCATEGORYINFO}
  3133. TCATEGORYINFO = record
  3134. catid: TGUID;
  3135. lcid: UINT;
  3136. szDescription: array[0..127] of WideChar;
  3137. end;
  3138. {$NODEFINE IEnumGUID}
  3139. IEnumGUID = interface(IUnknown)
  3140. ['{0002E000-0000-0000-C000-000000000046}']
  3141. function Next(celt: UINT; out rgelt: TGUID; out pceltFetched: UINT): HResult; stdcall;
  3142. function Skip(celt: UINT): HResult; stdcall;
  3143. function Reset: HResult; stdcall;
  3144. function Clone(out ppenum: IEnumGUID): HResult; stdcall;
  3145. end;
  3146. {$NODEFINE IEnumCATEGORYINFO}
  3147. IEnumCATEGORYINFO = interface(IUnknown)
  3148. ['{0002E011-0000-0000-C000-000000000046}']
  3149. function Next(celt: UINT; out rgelt: TCATEGORYINFO; out pceltFetched: UINT): HResult; stdcall;
  3150. function Skip(celt: UINT): HResult; stdcall;
  3151. function Reset: HResult; stdcall;
  3152. function Clone(out ppenum: IEnumCATEGORYINFO): HResult; stdcall;
  3153. end;
  3154. {$NODEFINE ICatRegister}
  3155. ICatRegister = interface(IUnknown)
  3156. ['{0002E012-0000-0000-C000-000000000046}']
  3157. function RegisterCategories(cCategories: UINT; rgCategoryInfo: PCATEGORYINFO): HResult; stdcall;
  3158. function UnRegisterCategories(cCategories: UINT; rgcatid: Pointer): HResult; stdcall;
  3159. function RegisterClassImplCategories(const rclsid: TGUID; cCategories: UINT; rgcatid: Pointer): HResult; stdcall;
  3160. function UnRegisterClassImplCategories(const rclsid: TGUID; cCategories: UINT; rgcatid: Pointer): HResult; stdcall;
  3161. function RegisterClassReqCategories(const rclsid: TGUID; cCategories: UINT; rgcatid: Pointer): HResult; stdcall;
  3162. function UnRegisterClassReqCategories(const rclsid: TGUID; cCategories: UINT; rgcatid: Pointer): HResult; stdcall;
  3163. end;
  3164. {$NODEFINE ICatInformation}
  3165. ICatInformation = interface(IUnknown)
  3166. ['{0002E013-0000-0000-C000-000000000046}']
  3167. function EnumCategories(lcid: UINT; out ppenumCategoryInfo: IEnumCATEGORYINFO): HResult; stdcall;
  3168. function GetCategoryDesc(const rcatid: TGUID; lcid: UINT; out pszDesc: PWideChar): HResult; stdcall;
  3169. function EnumClassesOfCategories(cImplemented: UINT; rgcatidImpl: Pointer; cRequired: UINT; rgcatidReq: Pointer; out ppenumClsid: IEnumGUID): HResult; stdcall;
  3170. function IsClassOfCategories(const rclsid: TGUID; cImplemented: UINT; rgcatidImpl: Pointer; cRequired: UINT; rgcatidReq: Pointer): HResult; stdcall;
  3171. function EnumImplCategoriesOfClass(var rclsid: TGUID; out ppenumCatid: IEnumGUID): HResult; stdcall;
  3172. function EnumReqCategoriesOfClass(var rclsid: TGUID; out ppenumCatid: IEnumGUID): HResult; stdcall;
  3173. end;
  3174. { IBindHost Interface }
  3175. IBindHost = interface(IUnknown)
  3176. ['{fc4801a1-2ba9-11cf-a229-00aa003d7352}']
  3177. end;
  3178. { IOleUndoManager Interface }
  3179. IOleUndoManager = interface(IUnknown)
  3180. ['{d001f200-ef97-11ce-9bc9-00aa00608e01}']
  3181. end;
  3182. { IQuickActivate Interface }
  3183. tagQACONTAINER = record
  3184. cbSize: LongInt;
  3185. pClientSite: IOleClientSite;
  3186. pAdviseSink: IAdviseSink;
  3187. pPropertyNotifySink: IPropertyNotifySink;
  3188. pUnkEventSink: IUnknown;
  3189. dwAmbientFlags: LongInt;
  3190. colorFore: OLE_COLOR;
  3191. colorBack: OLE_COLOR;
  3192. pFont: IFont;
  3193. pUndoMgr: IOleUndoManager;
  3194. dwAppearance: LongInt;
  3195. lcid: LongInt;
  3196. hpal: HPALETTE;
  3197. pBindHost: IBindHost;
  3198. end;
  3199. PQaContainer = ^tagQACONTAINER;
  3200. TQaContainer = tagQACONTAINER;
  3201. tagQACONTROL = record
  3202. cbSize: LongInt;
  3203. dwMiscStatus: LongInt;
  3204. dwViewStatus: LongInt;
  3205. dwEventCookie: LongInt;
  3206. dwPropNotifyCookie: LongInt;
  3207. dwPointerActivationPolicy: LongInt;
  3208. end;
  3209. PQaControl = ^TQaControl;
  3210. TQaControl = tagQACONTROL;
  3211. IQuickActivate = interface(IUnknown)
  3212. ['{cf51ed10-62fe-11cf-bf86-00a0c9034836}']
  3213. function QuickActivate(var qaCont: tagQACONTAINER; var qaCtrl: tagQACONTROL): HResult; stdcall;
  3214. function SetContentExtent(const sizel: TPoint): HResult; stdcall;
  3215. function GetContentExtent(out sizel: TPoint): HResult; stdcall;
  3216. end;
  3217. const
  3218. CLSID_StdComponentCategoryMgr: TGUID = '{0002E005-0000-0000-C000-000000000046}';
  3219. { from OBJSAFE.H }
  3220. //+--------------------------------------------------------------------------=
  3221. //
  3222. // Contents: IObjectSafety definition
  3223. //
  3224. //
  3225. // IObjectSafety should be implemented by objects that have interfaces which
  3226. // support "untrusted" clients (for example, scripts). It allows the owner of
  3227. // the object to specify which interfaces need to be protected from untrusted
  3228. // use. Examples of interfaces that might be protected in this way are:
  3229. //
  3230. // IID_IDispatch - "Safe for automating with untrusted automation client or script"
  3231. // IID_IPersist* - "Safe for initializing with untrusted data"
  3232. // IID_IActiveScript - "Safe for running untrusted scripts"
  3233. //
  3234. //---------------------------------------------------------------------------=
  3235. const
  3236. // Option bit definitions for IObjectSafety:
  3237. INTERFACESAFE_FOR_UNTRUSTED_CALLER = 1; // Caller of interface may be untrusted
  3238. INTERFACESAFE_FOR_UNTRUSTED_DATA = 2; // Data passed into interface may be untrusted
  3239. type
  3240. IObjectSafety = interface(IUnknown)
  3241. ['{CB5BDC81-93C1-11CF-8F20-00805F2CD064}']
  3242. function GetInterfaceSafetyOptions(const IID: TIID; pdwSupportedOptions,
  3243. pdwEnabledOptions: PDWORD): HResult; stdcall;
  3244. function SetInterfaceSafetyOptions(const IID: TIID; dwOptionSetMask,
  3245. dwEnabledOptions: DWORD): HResult; stdcall;
  3246. end;
  3247. { from DISPEX.H }
  3248. type
  3249. IDispatchEx = interface(IDispatch)
  3250. ['{A6EF9860-C720-11D0-9337-00A0C90DCAA9}']
  3251. function GetDispID(const bstrName: TBSTR; const grfdex: DWORD;
  3252. out id: TDispID): HResult; stdcall;
  3253. function InvokeEx(const id: TDispID; const lcid: LCID; const wflags:
  3254. WORD; const pdp: PDispParams; out varRes: OleVariant; out pei:
  3255. TExcepInfo; const pspCaller: PServiceProvider): HResult; stdcall;
  3256. function DeleteMemberByName(const bstr: TBSTR;
  3257. const grfdex: DWORD): HResult; stdcall;
  3258. function DeleteMemberByDispID(const id: TDispID): HResult; stdcall;
  3259. function GetMemberProperties(const id: TDispID; const grfdexFetch:
  3260. DWORD; out grfdex: DWORD): HResult; stdcall;
  3261. function GetMemberName(const id: TDispID; out bstrName: TBSTR):
  3262. HResult; stdcall;
  3263. function GetNextDispID(const grfdex: DWORD; const id: TDispID;
  3264. out nid: TDispID): HResult; stdcall;
  3265. function GetNameSpaceParent(out unk: IUnknown): HResult; stdcall;
  3266. end;
  3267. const
  3268. { Input flags for GetDispID }
  3269. fdexNameCaseSensitive = $1;
  3270. fdexNameEnsure = $2;
  3271. fdexNameImplicit = $4;
  3272. fdexNameCaseInsensitive = $8;
  3273. { input flags for GetMemberProperties }
  3274. fdexPropCanGet = $1;
  3275. fdexPropCannotGet = $2;
  3276. fdexPropCanPut = $4;
  3277. fdexPropCannotPut = $8;
  3278. fdexPropCanPutRef = $10;
  3279. fdexPropCannotPutRef = $20;
  3280. fdexPropNoSideEffects = $40;
  3281. fdexPropDynamicType = $80;
  3282. fdexPropCanCall = $100;
  3283. fdexPropCannotCall = $200;
  3284. fdexPropCanConstruct = $400;
  3285. fdexPropCannotConstruct = $800;
  3286. fdexPropCanSourceEvents = $1000;
  3287. fdexPropCannotSourceEvents = $2000;
  3288. fdexPropCanAll = fdexPropCanGet or fdexPropCanPut or
  3289. fdexPropCanPutRef or fdexPropCanCall or
  3290. fdexPropCanConstruct or fdexPropCanSourceEvents;
  3291. fdexPropCannotAll = fdexPropCannotGet or fdexPropCannotPut or
  3292. fdexPropCannotPutRef or fdexPropCannotCall or
  3293. fdexPropCannotConstruct or fdexPropCannotSourceEvents;
  3294. fdexPropExtraAll = fdexPropNoSideEffects or fdexPropDynamicType;
  3295. fdexPropAll = fdexPropCanAll or fdexPropCannotAll or fdexPropExtraAll;
  3296. { input flags for GetNextDispID }
  3297. fdexEnumDefault = $01;
  3298. fdexEnumAll = $02;
  3299. { from OBJBASE.H }
  3300. { HResult manipulation routines }
  3301. function Succeeded(Res: HResult): Boolean; {inline;}
  3302. function Failed(Res: HResult): Boolean; {inline;}
  3303. function ResultCode(Res: HResult): Integer; {inline;}
  3304. function ResultFacility(Res: HResult): Integer; {inline;}
  3305. function ResultSeverity(Res: HResult): Integer; {inline;}
  3306. function MakeResult(Severity, Facility, Code: Integer): HResult; {inline;}
  3307. { GUID functions }
  3308. function IsEqualGUID(const guid1, guid2: TGUID): Boolean; stdcall;
  3309. function IsEqualIID(const iid1, iid2: TIID): Boolean; stdcall;
  3310. function IsEqualCLSID(const clsid1, clsid2: TCLSID): Boolean; stdcall;
  3311. { Standard object API functions }
  3312. function CoBuildVersion: Longint; stdcall;
  3313. { Init/Uninit }
  3314. const
  3315. // flags passed as the coInit parameter to CoInitializeEx.
  3316. COINIT_MULTITHREADED = 0; // OLE calls objects on any thread.
  3317. COINIT_APARTMENTTHREADED = 2; // Apartment model
  3318. COINIT_DISABLE_OLE1DDE = 4; // Dont use DDE for Ole1 support.
  3319. COINIT_SPEED_OVER_MEMORY = 8; // Trade memory for speed.
  3320. function CoInitialize(pvReserved: Pointer): HResult; stdcall;
  3321. procedure CoUninitialize; stdcall;
  3322. function CoGetMalloc(dwMemContext: Longint; out malloc: IMalloc): HResult; stdcall;
  3323. function CoGetCurrentProcess: Longint; stdcall;
  3324. function CoRegisterMallocSpy(mallocSpy: IMallocSpy): HResult; stdcall;
  3325. function CoRevokeMallocSpy: HResult stdcall;
  3326. function CoCreateStandardMalloc(memctx: Longint; out malloc: IMalloc): HResult; stdcall;
  3327. function CoInitializeEx(pvReserved: Pointer; coInit: Longint): HResult; stdcall;
  3328. { Register, revoke, and get class objects }
  3329. function CoGetClassObject(const clsid: TCLSID; dwClsContext: Longint;
  3330. pvReserved: Pointer; const iid: TIID; out pv): HResult; stdcall;
  3331. function CoRegisterClassObject(const clsid: TCLSID; unk: IUnknown;
  3332. dwClsContext: Longint; flags: Longint; out dwRegister: Longint): HResult; stdcall;
  3333. function CoRevokeClassObject(dwRegister: Longint): HResult; stdcall;
  3334. function CoResumeClassObjects: HResult; stdcall;
  3335. function CoSuspendClassObjects: HResult; stdcall;
  3336. function CoAddRefServerProcess: Longint; stdcall;
  3337. function CoReleaseServerProcess: Longint; stdcall;
  3338. function CoGetPSClsid(const iid: TIID; var pClsid: TCLSID): HResult; stdcall;
  3339. function CoRegisterPSClsid(const iid: TIID; clsid: TCLSID): HResult; stdcall;
  3340. { Marshaling interface pointers }
  3341. function CoGetMarshalSizeMax(out ulSize: Longint; const iid: TIID;
  3342. unk: IUnknown; dwDestContext: Longint; pvDestContext: Pointer;
  3343. mshlflags: Longint): HResult; stdcall;
  3344. function CoMarshalInterface(stm: IStream; const iid: TIID; unk: IUnknown;
  3345. dwDestContext: Longint; pvDestContext: Pointer;
  3346. mshlflags: Longint): HResult; stdcall;
  3347. function CoUnmarshalInterface(stm: IStream; const iid: TIID;
  3348. out pv): HResult; stdcall;
  3349. function CoMarshalHResult(stm: IStream; result: HResult): HResult; stdcall;
  3350. function CoUnmarshalHResult(stm: IStream; out result: HResult): HResult; stdcall;
  3351. function CoReleaseMarshalData(stm: IStream): HResult; stdcall;
  3352. function CoDisconnectObject(unk: IUnknown; dwReserved: Longint): HResult; stdcall;
  3353. function CoLockObjectExternal(unk: IUnknown; fLock: BOOL;
  3354. fLastUnlockReleases: BOOL): HResult; stdcall;
  3355. function CoGetStandardMarshal(const iid: TIID; unk: IUnknown;
  3356. dwDestContext: Longint; pvDestContext: Pointer; mshlflags: Longint;
  3357. out marshal: IMarshal): HResult; stdcall;
  3358. function CoIsHandlerConnected(unk: IUnknown): BOOL; stdcall;
  3359. function CoHasStrongExternalConnections(unk: IUnknown): BOOL; stdcall;
  3360. { Apartment model inter-thread interface passing helpers }
  3361. function CoMarshalInterThreadInterfaceInStream(const iid: TIID;
  3362. unk: IUnknown; out stm: IStream): HResult; stdcall;
  3363. function CoGetInterfaceAndReleaseStream(stm: IStream; const iid: TIID;
  3364. out pv): HResult; stdcall;
  3365. function CoCreateFreeThreadedMarshaler(unkOuter: IUnknown;
  3366. out unkMarshal: IUnknown): HResult; stdcall;
  3367. { DLL loading helpers; keeps track of ref counts and unloads all on exit }
  3368. function CoLoadLibrary(pszLibName: POleStr; bAutoFree: BOOL): THandle; stdcall;
  3369. procedure CoFreeLibrary(hInst: THandle); stdcall;
  3370. procedure CoFreeAllLibraries; stdcall;
  3371. procedure CoFreeUnusedLibraries; stdcall;
  3372. { Call Security. }
  3373. function CoInitializeSecurity(pSecDesc: Pointer; cAuthSvc: Longint;
  3374. asAuthSvc: PSOleAuthenticationService; pReserved1: Pointer;
  3375. dwAuthnLevel, dImpLevel: Longint; pReserved2: Pointer; dwCapabilities: Longint;
  3376. pReserved3: Pointer): HResult; stdcall;
  3377. function CoGetCallContext(const iid: TIID; pInterface: Pointer): HResult; stdcall;
  3378. function CoQueryProxyBlanket(Proxy: IUnknown; pwAuthnSvc, pAuthzSvc: PLongint;
  3379. pServerPrincName: PPOleStr; pAuthnLevel, pImpLevel: PLongint;
  3380. pAuthInfo: Pointer; pCapabilites: PLongint): HResult; stdcall;
  3381. function CoSetProxyBlanket(Proxy: IUnknown; dwAuthnSvc, dwAuthzSvc: Longint;
  3382. pServerPrincName: POleStr; dwAuthnLevel, dwImpLevel: Longint;
  3383. pAuthInfo: Pointer; dwCapabilites: Longint): HResult; stdcall;
  3384. function CoCopyProxy(Proxy: IUnknown; var pCopy: IUnknown): HResult; stdcall;
  3385. function CoQueryClientBlanket(pwAuthnSvc, pAuthzSvc: PLongint;
  3386. pServerPrincName: PPOleStr; var dwAuthnLevel, dwImpLevel: Longint;
  3387. pPrivs: Pointer; var dwCapabilites: Longint): HResult; stdcall;
  3388. function CoImpersonateClient: HResult; stdcall;
  3389. function CoRevertToSelf: HResult; stdcall;
  3390. function CoQueryAuthenticationServices(pcAuthSvc: PLongint;
  3391. asAuthSvc: PSOleAuthenticationService): HResult; stdcall;
  3392. function CoSwitchCallContext(NewObject: IUnknown; var pOldObject: IUnknown): HResult; stdcall;
  3393. { Helper for creating instances }
  3394. function CoCreateInstance(const clsid: TCLSID; unkOuter: IUnknown;
  3395. dwClsContext: Longint; const iid: TIID; out pv): HResult; stdcall;
  3396. function CoGetInstanceFromFile(ServerInfo: PCoServerInfo; clsid: PCLSID;
  3397. punkOuter: IUnknown; dwClsCtx, grfMode: Longint; pwszName: POleStr;
  3398. dwCount: Longint; rgmqResults: PMultiQIArray): HResult; stdcall;
  3399. function CoGetInstanceFromIStorage(ServerInfo: PCoServerInfo; clsid: PCLSID;
  3400. punkOuter: IUnknown; dwClsCtx: Longint; stg: IUnknown;
  3401. dwCount: Longint; rgmqResults: PMultiQIArray): HResult; stdcall;
  3402. function CoCreateInstanceEx(const clsid: TCLSID;
  3403. unkOuter: IUnknown; dwClsCtx: Longint; ServerInfo: PCoServerInfo;
  3404. dwCount: Longint; rgmqResults: PMultiQIArray): HResult; stdcall;
  3405. { Other helpers }
  3406. function StringFromCLSID(const clsid: TCLSID; out psz: POleStr): HResult; stdcall;
  3407. function CLSIDFromString(psz: POleStr; out clsid: TCLSID): HResult; stdcall;
  3408. function StringFromIID(const iid: TIID; out psz: POleStr): HResult; stdcall;
  3409. function IIDFromString(psz: POleStr; out iid: TIID): HResult; stdcall;
  3410. function CoIsOle1Class(const clsid: TCLSID): BOOL; stdcall;
  3411. function ProgIDFromCLSID(const clsid: TCLSID; out pszProgID: POleStr): HResult; stdcall;
  3412. function CLSIDFromProgID(pszProgID: POleStr; out clsid: TCLSID): HResult; stdcall;
  3413. function StringFromGUID2(const guid: TGUID; psz: POleStr; cbMax: Integer): Integer; stdcall;
  3414. function CoCreateGuid(out guid: TGUID): HResult; stdcall;
  3415. function CoFileTimeToDosDateTime(const filetime: TFileTime; out dosDate: Word;
  3416. out dosTime: Word): BOOL; stdcall;
  3417. function CoDosDateTimeToFileTime(nDosDate: Word; nDosTime: Word;
  3418. out filetime: TFileTime): BOOL; stdcall;
  3419. function CoFileTimeNow(out filetime: TFileTime): HResult; stdcall;
  3420. function CoRegisterMessageFilter(messageFilter: IMessageFilter;
  3421. out pMessageFilter: IMessageFilter): HResult; stdcall;
  3422. function CoRegisterChannelHook(const ExtensionUuid: TGUID;
  3423. ChannelHook: IChannelHook): HResult; stdcall;
  3424. { TreatAs APIs }
  3425. function CoGetTreatAsClass(const clsidOld: TCLSID; out clsidNew: TCLSID): HResult; stdcall;
  3426. function CoTreatAsClass(const clsidOld: TCLSID; const clsidNew: TCLSID): HResult; stdcall;
  3427. { The server DLLs must define their DllGetClassObject and DllCanUnloadNow
  3428. to match these; the typedefs are located here to ensure all are changed at
  3429. the same time }
  3430. type
  3431. TDLLGetClassObject = function(const clsid: TCLSID; const iid: TIID;
  3432. out pv): HResult stdcall;
  3433. TDLLCanUnloadNow = function: HResult stdcall;
  3434. { Default memory allocation }
  3435. function CoTaskMemAlloc(cb: Longint): Pointer; stdcall;
  3436. function CoTaskMemRealloc(pv: Pointer; cb: Longint): Pointer; stdcall;
  3437. procedure CoTaskMemFree(pv: Pointer); stdcall;
  3438. { DV APIs }
  3439. function CreateDataAdviseHolder(out DAHolder: IDataAdviseHolder): HResult; stdcall;
  3440. function CreateDataCache(unkOuter: IUnknown; const clsid: TCLSID;
  3441. const iid: TIID; out pv): HResult; stdcall;
  3442. { Storage API prototypes }
  3443. function StgCreateDocfile(pwcsName: POleStr; grfMode: Longint;
  3444. reserved: Longint; out stgOpen: IStorage): HResult; stdcall;
  3445. function StgCreateDocfileOnILockBytes(lkbyt: ILockBytes; grfMode: Longint;
  3446. reserved: Longint; out stgOpen: IStorage): HResult; stdcall;
  3447. function StgOpenStorage(pwcsName: POleStr; stgPriority: IStorage;
  3448. grfMode: Longint; snbExclude: TSNB; reserved: Longint;
  3449. out stgOpen: IStorage): HResult; stdcall;
  3450. function StgOpenStorageOnILockBytes(lkbyt: ILockBytes; stgPriority: IStorage;
  3451. grfMode: Longint; snbExclude: TSNB; reserved: Longint;
  3452. out stgOpen: IStorage): HResult; stdcall;
  3453. function StgIsStorageFile(pwcsName: POleStr): HResult; stdcall;
  3454. function StgIsStorageILockBytes(lkbyt: ILockBytes): HResult; stdcall;
  3455. function StgSetTimes(pszName: POleStr; const ctime: TFileTime;
  3456. const atime: TFileTime; const mtime: TFileTime): HResult; stdcall;
  3457. function StgOpenAsyncDocfileOnIFillLockBytes(flb: IFillLockBytes;
  3458. grfMode, asyncFlags: Longint; var stgOpen: IStorage): HResult; stdcall;
  3459. function StgGetIFillLockBytesOnILockBytes(ilb: ILockBytes;
  3460. var flb: IFillLockBytes): HResult; stdcall;
  3461. function StgGetIFillLockBytesOnFile(pwcsName: POleStr;
  3462. var flb: IFillLockBytes): HResult; stdcall;
  3463. function StgOpenLayoutDocfile(pwcsDfName: POleStr; grfMode, reserved: Longint;
  3464. var stgOpen: IStorage): HResult; stdcall;
  3465. { Moniker APIs }
  3466. function BindMoniker(mk: IMoniker; grfOpt: Longint; const iidResult: TIID;
  3467. out pvResult): HResult; stdcall;
  3468. function CoGetObject(pszName: PWideString; pBindOptions: PBindOpts;
  3469. const iid: TIID; ppv: Pointer): HResult; stdcall;
  3470. function MkParseDisplayName(bc: IBindCtx; szUserName: POleStr;
  3471. out chEaten: Longint; out mk: IMoniker): HResult; stdcall;
  3472. function MonikerRelativePathTo(mkSrc: IMoniker; mkDest: IMoniker;
  3473. out mkRelPath: IMoniker; dwReserved: BOOL): HResult; stdcall;
  3474. function MonikerCommonPrefixWith(mkThis: IMoniker; mkOther: IMoniker;
  3475. out mkCommon: IMoniker): HResult; stdcall;
  3476. function CreateBindCtx(reserved: Longint; out bc: IBindCtx): HResult; stdcall;
  3477. function CreateGenericComposite(mkFirst: IMoniker; mkRest: IMoniker;
  3478. out mkComposite: IMoniker): HResult; stdcall;
  3479. function GetClassFile(szFilename: POleStr; out clsid: TCLSID): HResult; stdcall;
  3480. function CreateFileMoniker(pszPathName: POleStr; out mk: IMoniker): HResult; stdcall;
  3481. function CreateItemMoniker(pszDelim: POleStr; pszItem: POleStr;
  3482. out mk: IMoniker): HResult; stdcall;
  3483. function CreateAntiMoniker(out mk: IMoniker): HResult; stdcall;
  3484. function CreatePointerMoniker(unk: IUnknown; out mk: IMoniker): HResult; stdcall;
  3485. function GetRunningObjectTable(reserved: Longint;
  3486. out rot: IRunningObjectTable): HResult; stdcall;
  3487. { from OLEAUTO.H }
  3488. { TBStr API }
  3489. function SysAllocString(psz: POleStr): TBStr; stdcall;
  3490. function SysReAllocString(var bstr: TBStr; psz: POleStr): Integer; stdcall;
  3491. function SysAllocStringLen(psz: POleStr; len: Integer): TBStr; stdcall;
  3492. function SysReAllocStringLen(var bstr: TBStr; psz: POleStr;
  3493. len: Integer): Integer; stdcall;
  3494. procedure SysFreeString(bstr: TBStr); stdcall;
  3495. function SysStringLen(bstr: TBStr): Integer; stdcall;
  3496. function SysStringByteLen(bstr: TBStr): Integer; stdcall;
  3497. function SysAllocStringByteLen(psz: PAnsiChar; len: Integer): TBStr; stdcall;
  3498. { Time API }
  3499. function DosDateTimeToVariantTime(wDosDate, wDosTime: Word;
  3500. out vtime: TOleDate): Integer; stdcall;
  3501. function VariantTimeToDosDateTime(vtime: TOleDate; out wDosDate,
  3502. wDosTime: Word): Integer; stdcall;
  3503. function SystemTimeToVariantTime(var SystemTime: TSystemTime;
  3504. out vtime: TOleDate): Integer; stdcall;
  3505. function VariantTimeToSystemTime(vtime: TOleDate;
  3506. out SystemTime: TSystemTime): Integer; stdcall;
  3507. { SafeArray API }
  3508. function SafeArrayAllocDescriptor(cDims: Integer; out psaOut: PSafeArray): HResult; stdcall;
  3509. function SafeArrayAllocData(psa: PSafeArray): HResult; stdcall;
  3510. function SafeArrayCreate(vt: TVarType; cDims: Integer; const rgsabound): PSafeArray; stdcall;
  3511. function SafeArrayCreateVector(vt: TVarType; Lbound, cElements: Longint): PSafeArray; stdcall;
  3512. function SafeArrayCreateVectorEx(vt: TVarType; LBound, cElements: Longint; pvExta: pointer): PSafeArray; stdcall;
  3513. function SafeArrayCreateEx(vt: TVarType; cDims: Integer; const rgsabound; pvExtra: pointer): PSafeArray; stdcall;
  3514. function SafeArrayCopyData(psaSource, psaTarget: PSafeArray): HResult; stdcall;
  3515. function SafeArrayDestroyDescriptor(psa: PSafeArray): HResult; stdcall;
  3516. function SafeArrayDestroyData(psa: PSafeArray): HResult; stdcall;
  3517. function SafeArrayDestroy(psa: PSafeArray): HResult; stdcall;
  3518. function SafeArrayRedim(psa: PSafeArray; const saboundNew: TSafeArrayBound): HResult; stdcall;
  3519. function SafeArrayGetDim(psa: PSafeArray): Integer; stdcall;
  3520. function SafeArrayGetElemsize(psa: PSafeArray): Integer; stdcall;
  3521. function SafeArrayGetUBound(psa: PSafeArray; nDim: Integer; out lUbound: Longint): HResult; stdcall;
  3522. function SafeArrayGetLBound(psa: PSafeArray; nDim: Integer; out lLbound: Longint): HResult; stdcall;
  3523. function SafeArrayLock(psa: PSafeArray): HResult; stdcall;
  3524. function SafeArrayUnlock(psa: PSafeArray): HResult; stdcall;
  3525. function SafeArrayAccessData(psa: PSafeArray; out pvData: Pointer): HResult; stdcall;
  3526. function SafeArrayUnaccessData(psa: PSafeArray): HResult; stdcall;
  3527. function SafeArrayGetElement(psa: PSafeArray; const rgIndices; out pv): HResult; stdcall;
  3528. function SafeArrayPutElement(psa: PSafeArray; const rgIndices; const pv): HResult; stdcall;
  3529. function SafeArrayCopy(psa: PSafeArray; out psaOut: PSafeArray): HResult; stdcall;
  3530. function SafeArrayPtrOfIndex(psa: PSafeArray; var rgIndices; out pvData: Pointer): HResult; stdcall;
  3531. { Variant API }
  3532. procedure VariantInit(var varg: OleVariant); stdcall;
  3533. function VariantClear(var varg: OleVariant): HResult; stdcall;
  3534. function VariantCopy(var vargDest: OleVariant; const vargSrc: OleVariant): HResult; stdcall;
  3535. function VariantCopyInd(var varDest: OleVariant; const vargSrc: OleVariant): HResult; stdcall;
  3536. function VariantChangeType(var vargDest: OleVariant; const vargSrc: OleVariant;
  3537. wFlags: Word; vt: TVarType): HResult; stdcall;
  3538. function VariantChangeTypeEx(var vargDest: OleVariant; const vargSrc: OleVariant;
  3539. lcid: TLCID; wFlags: Word; vt: TVarType): HResult; stdcall;
  3540. { Vector <-> Bstr conversion APIs }
  3541. function VectorFromBstr(bstr: TBStr; out psa: PSafeArray): HResult; stdcall;
  3542. function BstrFromVector(psa: PSafeArray; out bstr: TBStr): HResult; stdcall;
  3543. { VarType coercion API }
  3544. { Note: The routines that convert from a string are defined
  3545. to take a POleStr rather than a TBStr because no allocation is
  3546. required, and this makes the routines a bit more generic.
  3547. They may of course still be passed a TBStr as the strIn param. }
  3548. { Any of the coersion functions that converts either from or to a string
  3549. takes an additional lcid and dwFlags arguments. The lcid argument allows
  3550. locale specific parsing to occur. The dwFlags allow additional function
  3551. specific condition to occur. All function that accept the dwFlags argument
  3552. can include either 0 or LOCALE_NOUSEROVERRIDE flag. In addition, the
  3553. VarDateFromStr functions also accepts the VAR_TIMEVALUEONLY and
  3554. VAR_DATEVALUEONLY flags }
  3555. function VarUI1FromI2(sIn: Smallint; out bOut: Byte): HResult; stdcall;
  3556. function VarUI1FromI4(lIn: Longint; out bOut: Byte): HResult; stdcall;
  3557. function VarUI1FromR4(fltIn: Single; out bOut: Byte): HResult; stdcall;
  3558. function VarUI1FromR8(dblIn: Double; out bOut: Byte): HResult; stdcall;
  3559. function VarUI1FromCy(cyIn: Currency; out bOut: Byte): HResult; stdcall;
  3560. function VarUI1FromDate(dateIn: TOleDate; out bOut: Byte): HResult; stdcall;
  3561. function VarUI1FromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out bOut: Byte): HResult; stdcall;
  3562. function VarUI1FromDisp(dispIn: IDispatch; lcid: TLCID; out bOut: Byte): HResult; stdcall;
  3563. function VarUI1FromBool(boolIn: TOleBool; out bOut: Byte): HResult; stdcall;
  3564. function VarUI1FromI1(cIn: AnsiChar; out bOut: Byte): HResult; stdcall;
  3565. function VarUI1FromUI2(uiIn: Word; out bOut: Byte): HResult; stdcall;
  3566. function VarUI1FromUI4(ulIn: Longint; out bOut: Byte): HResult; stdcall;
  3567. function VarUI1FromDec(pdecIn: PDecimal; out bOut: Byte): HResult; stdcall;
  3568. function VarI2FromUI1(bIn: Byte; out sOut: Smallint): HResult; stdcall;
  3569. function VarI2FromI4(lIn: Longint; out sOut: Smallint): HResult; stdcall;
  3570. function VarI2FromR4(fltIn: Single; out sOut: Smallint): HResult; stdcall;
  3571. function VarI2FromR8(dblIn: Double; out sOut: Smallint): HResult; stdcall;
  3572. function VarI2FromCy(cyIn: Currency; out sOut: Smallint): HResult; stdcall;
  3573. function VarI2FromDate(dateIn: TOleDate; out sOut: Smallint): HResult; stdcall;
  3574. function VarI2FromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out sOut: Smallint): HResult; stdcall;
  3575. function VarI2FromDisp(dispIn: IDispatch; lcid: TLCID; out sOut: Smallint): HResult; stdcall;
  3576. function VarI2FromBool(boolIn: TOleBool; out sOut: Smallint): HResult; stdcall;
  3577. function VarI2FromI1(cIn: AnsiChar; out bOut: Smallint): HResult; stdcall;
  3578. function VarI2FromUI2(uiIn: Word; out bOut: Smallint): HResult; stdcall;
  3579. function VarI2FromUI4(ulIn: Longint; out bOut: Smallint): HResult; stdcall;
  3580. function VarI2FromDec(pdecIn: PDecimal; out bOut: Smallint): HResult; stdcall;
  3581. function VarI4FromUI1(bIn: Byte; out lOut: Longint): HResult; stdcall;
  3582. function VarI4FromI2(sIn: Smallint; out lOut: Longint): HResult; stdcall;
  3583. function VarI4FromR4(fltIn: Single; out lOut: Longint): HResult; stdcall;
  3584. function VarI4FromR8(dblIn: Double; out lOut: Longint): HResult; stdcall;
  3585. function VarI4FromCy(cyIn: Currency; out lOut: Longint): HResult; stdcall;
  3586. function VarI4FromDate(dateIn: TOleDate; out lOut: Longint): HResult; stdcall;
  3587. function VarI4FromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out lOut: Longint): HResult; stdcall;
  3588. function VarI4FromDisp(dispIn: IDispatch; lcid: TLCID; out lOut: Longint): HResult; stdcall;
  3589. function VarI4FromBool(boolIn: TOleBool; out lOut: Longint): HResult; stdcall;
  3590. function VarI4FromI1(cIn: AnsiChar; out bOut: Longint): HResult; stdcall;
  3591. function VarI4FromUI2(uiIn: Word; out bOut: Longint): HResult; stdcall;
  3592. function VarI4FromUI4(ulIn: Longint; out bOut: Longint): HResult; stdcall;
  3593. function VarI4FromDec(pdecIn: PDecimal; out bOut: Longint): HResult; stdcall;
  3594. function VarI4FromInt(intIn: Integer; out bOut: Longint): HResult; stdcall;
  3595. function VarR4FromUI1(bIn: Byte; out fltOut: Single): HResult; stdcall;
  3596. function VarR4FromI2(sIn: Smallint; out fltOut: Single): HResult; stdcall;
  3597. function VarR4FromI4(lIn: Longint; out fltOut: Single): HResult; stdcall;
  3598. function VarR4FromR8(dblIn: Double; out fltOut: Single): HResult; stdcall;
  3599. function VarR4FromCy(cyIn: Currency; out fltOut: Single): HResult; stdcall;
  3600. function VarR4FromDate(dateIn: TOleDate; out fltOut: Single): HResult; stdcall;
  3601. function VarR4FromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out fltOut: Single): HResult; stdcall;
  3602. function VarR4FromDisp(dispIn: IDispatch; lcid: TLCID; out fltOut: Single): HResult; stdcall;
  3603. function VarR4FromBool(boolIn: TOleBool; out fltOut: Single): HResult; stdcall;
  3604. function VarR4FromI1(cIn: AnsiChar; out bOut: Single): HResult; stdcall;
  3605. function VarR4FromUI2(uiIn: Word; out bOut: Single): HResult; stdcall;
  3606. function VarR4FromUI4(ulIn: Longint; out bOut: Single): HResult; stdcall;
  3607. function VarR4FromDec(pdecIn: PDecimal; out bOut: Single): HResult; stdcall;
  3608. function VarR8FromUI1(bIn: Byte; out dblOut: Double): HResult; stdcall;
  3609. function VarR8FromI2(sIn: Smallint; out dblOut: Double): HResult; stdcall;
  3610. function VarR8FromI4(lIn: Longint; out dblOut: Double): HResult; stdcall;
  3611. function VarR8FromR4(fltIn: Single; out dblOut: Double): HResult; stdcall;
  3612. function VarR8FromCy(cyIn: Currency; out dblOut: Double): HResult; stdcall;
  3613. function VarR8FromDate(dateIn: TOleDate; out dblOut: Double): HResult; stdcall;
  3614. function VarR8FromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out dblOut: Double): HResult; stdcall;
  3615. function VarR8FromDisp(dispIn: IDispatch; lcid: TLCID; out dblOut: Double): HResult; stdcall;
  3616. function VarR8FromBool(boolIn: TOleBool; out dblOut: Double): HResult; stdcall;
  3617. function VarR8FromI1(cIn: AnsiChar; out bOut: Double): HResult; stdcall;
  3618. function VarR8FromUI2(uiIn: Word; out bOut: Double): HResult; stdcall;
  3619. function VarR8FromUI4(ulIn: Longint; out bOut: Double): HResult; stdcall;
  3620. function VarR8FromDec(pdecIn: PDecimal; out bOut: Double): HResult; stdcall;
  3621. function VarDateFromUI1(bIn: Byte; out dateOut: TOleDate): HResult; stdcall;
  3622. function VarDateFromI2(sIn: Smallint; out dateOut: TOleDate): HResult; stdcall;
  3623. function VarDateFromI4(lIn: Longint; out dateOut: TOleDate): HResult; stdcall;
  3624. function VarDateFromR4(fltIn: Single; out dateOut: TOleDate): HResult; stdcall;
  3625. function VarDateFromR8(dblIn: Double; out dateOut: TOleDate): HResult; stdcall;
  3626. function VarDateFromCy(cyIn: Currency; out dateOut: TOleDate): HResult; stdcall;
  3627. function VarDateFromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out dateOut: TOleDate): HResult; stdcall;
  3628. function VarDateFromDisp(dispIn: IDispatch; lcid: TLCID; out dateOut: TOleDate): HResult; stdcall;
  3629. function VarDateFromBool(boolIn: TOleBool; out dateOut: TOleDate): HResult; stdcall;
  3630. function VarDateFromI1(cIn: AnsiChar; out bOut: TOleDate): HResult; stdcall;
  3631. function VarDateFromUI2(uiIn: Word; out bOut: TOleDate): HResult; stdcall;
  3632. function VarDateFromUI4(ulIn: Longint; out bOut: TOleDate): HResult; stdcall;
  3633. function VarDateFromDec(pdecIn: PDecimal; out bOut: TOleDate): HResult; stdcall;
  3634. function VarCyFromUI1(bIn: Byte; out cyOut: Currency): HResult; stdcall;
  3635. function VarCyFromI2(sIn: Smallint; out cyOut: Currency): HResult; stdcall;
  3636. function VarCyFromI4(lIn: Longint; out cyOut: Currency): HResult; stdcall;
  3637. function VarCyFromR4(fltIn: Single; out cyOut: Currency): HResult; stdcall;
  3638. function VarCyFromR8(dblIn: Double; out cyOut: Currency): HResult; stdcall;
  3639. function VarCyFromDate(dateIn: TOleDate; out cyOut: Currency): HResult; stdcall;
  3640. function VarCyFromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out cyOut: Currency): HResult; stdcall;
  3641. function VarCyFromDisp(dispIn: IDispatch; lcid: TLCID; out cyOut: Currency): HResult; stdcall;
  3642. function VarCyFromBool(boolIn: TOleBool; out cyOut: Currency): HResult; stdcall;
  3643. function VarCyFromI1(cIn: AnsiChar; out bOut: Currency): HResult; stdcall;
  3644. function VarCyFromUI2(uiIn: Word; out bOut: Currency): HResult; stdcall;
  3645. function VarCyFromUI4(ulIn: Longint; out bOut: Currency): HResult; stdcall;
  3646. function VarCyFromDec(pdecIn: PDecimal; out bOut: Currency): HResult; stdcall;
  3647. function VarBStrFromUI1(bVal: Byte; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3648. function VarBStrFromI2(iVal: Smallint; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3649. function VarBStrFromI4(lIn: Longint; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3650. function VarBStrFromR4(fltIn: Single; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3651. function VarBStrFromR8(dblIn: Double; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3652. function VarBStrFromCy(cyIn: Currency; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3653. function VarBStrFromDate(dateIn: TOleDate; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3654. function VarBStrFromDisp(dispIn: IDispatch; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3655. function VarBStrFromBool(boolIn: TOleBool; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3656. function VarBStrFromI1(cIn: AnsiChar; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3657. function VarBStrFromUI2(uiIn: Word; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3658. function VarBStrFromUI4(ulIn: Longint; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3659. function VarBStrFromDec(pdecIn: PDecimal; lcid: TLCID; dwFlags: Longint; out bstrOut: WideString): HResult; stdcall;
  3660. function VarBoolFromUI1(bIn: Byte; out boolOut: TOleBool): HResult; stdcall;
  3661. function VarBoolFromI2(sIn: Smallint; out boolOut: TOleBool): HResult; stdcall;
  3662. function VarBoolFromI4(lIn: Longint; out boolOut: TOleBool): HResult; stdcall;
  3663. function VarBoolFromR4(fltIn: Single; out boolOut: TOleBool): HResult; stdcall;
  3664. function VarBoolFromR8(dblIn: Double; out boolOut: TOleBool): HResult; stdcall;
  3665. function VarBoolFromDate(dateIn: TOleDate; out boolOut: TOleBool): HResult; stdcall;
  3666. function VarBoolFromCy(cyIn: Currency; out boolOut: TOleBool): HResult; stdcall;
  3667. function VarBoolFromStr(const strIn: WideString; lcid: TLCID; dwFlags: Longint; out boolOut: TOleBool): HResult; stdcall;
  3668. function VarBoolFromDisp(dispIn: IDispatch; lcid: TLCID; out boolOut: TOleBool): HResult; stdcall;
  3669. function VarBoolFromI1(cIn: AnsiChar; out boolOut: TOleBool): HResult; stdcall;
  3670. function VarBoolFromUI2(uiIn: Word; out boolOut: TOleBool): HResult; stdcall;
  3671. function VarBoolFromUI4(ulIn: Longint; out boolOut: TOleBool): HResult; stdcall;
  3672. function VarBoolFromDec(pdecIn: PDecimal; out boolOut: TOleBool): HResult; stdcall;
  3673. { TypeInfo API }
  3674. function LHashValOfNameSys(syskind: TSysKind; lcid: TLCID;
  3675. szName: POleStr): Longint; stdcall;
  3676. function LHashValOfNameSysA(syskind: TSysKind; lcid: TLCID;
  3677. szName: PAnsiChar): Longint; stdcall;
  3678. function LHashValOfName(lcid: TLCID; szName: POleStr): Longint;
  3679. function WHashValOfLHashVal(lhashval: Longint): Word; {inline;}
  3680. function IsHashValCompatible(lhashval1, lhashval2: Longint): Boolean; {inline;}
  3681. function LoadTypeLib(szFile: POleStr; out tlib: ITypeLib): HResult; stdcall;
  3682. function LoadTypeLibEx(szFile: POleStr; regkind: TRegKind; out tlib: ITypeLib): HResult; stdcall;
  3683. function LoadRegTypeLib(const guid: TGUID; wVerMajor, wVerMinor: Word;
  3684. lcid: TLCID; out tlib: ITypeLib): HResult; stdcall;
  3685. function QueryPathOfRegTypeLib(const guid: TGUID; wMaj, wMin: Word;
  3686. lcid: TLCID; out bstrPathName: WideString): HResult; stdcall;
  3687. function RegisterTypeLib(tlib: ITypeLib; szFullPath, szHelpDir: POleStr): HResult; stdcall;
  3688. function UnRegisterTypeLib(const libID: TGUID; wVerMajor, wVerMinor: Word;
  3689. lcid: TLCID; syskind: TSysKind): HResult; stdcall;
  3690. function CreateTypeLib(syskind: TSysKind; szFile: POleStr;
  3691. out ctlib: ICreateTypeLib): HResult; stdcall;
  3692. function CreateTypeLib2(syskind: TSysKind; szFile: POleStr;
  3693. out ctlib: ICreateTypeLib2): HResult; stdcall;
  3694. { IDispatch implementation support }
  3695. function DispGetParam(const dispparams: TDispParams; position: Integer;
  3696. vtTarg: TVarType; var varResult: OleVariant; var puArgErr: Integer): HResult; stdcall;
  3697. function DispGetIDsOfNames(tinfo: ITypeInfo; rgszNames: POleStrList;
  3698. cNames: Integer; rgdispid: PDispIDList): HResult; stdcall;
  3699. function DispInvoke(This: Pointer; tinfo: ITypeInfo; dispidMember: TDispID;
  3700. wFlags: Word; var params: TDispParams; varResult: PVariant;
  3701. excepinfo: PExcepInfo; puArgErr: PInteger): HResult; stdcall;
  3702. function CreateDispTypeInfo(var idata: TInterfaceData; lcid: TLCID;
  3703. out tinfo: ITypeInfo): HResult; stdcall;
  3704. function CreateStdDispatch(unkOuter: IUnknown; pvThis: Pointer;
  3705. tinfo: ITypeInfo; out unkStdDisp: IUnknown): HResult; stdcall;
  3706. function DispCallFunc(pvInstance: Pointer; oVft: Longint; cc: TCallConv;
  3707. vtReturn: TVarType; cActuals: Longint; var rgvt: TVarType; var prgpvarg: OleVariant;
  3708. var vargResult: OleVariant): HResult; stdcall;
  3709. { Active object registration API }
  3710. const
  3711. ACTIVEOBJECT_STRONG = 0;
  3712. ACTIVEOBJECT_WEAK = 1;
  3713. function RegisterActiveObject(unk: IUnknown; const clsid: TCLSID;
  3714. dwFlags: Longint; out dwRegister: Longint): HResult; stdcall;
  3715. function RevokeActiveObject(dwRegister: Longint; pvReserved: Pointer): HResult; stdcall;
  3716. function GetActiveObject(const clsid: TCLSID; pvReserved: Pointer;
  3717. out unk: IUnknown): HResult; stdcall;
  3718. { ErrorInfo API }
  3719. function SetErrorInfo(dwReserved: Longint; errinfo: IErrorInfo): HResult; stdcall;
  3720. function GetErrorInfo(dwReserved: Longint; out errinfo: IErrorInfo): HResult; stdcall;
  3721. function CreateErrorInfo(out errinfo: ICreateErrorInfo): HResult; stdcall;
  3722. { Misc API }
  3723. function OaBuildVersion: Longint; stdcall;
  3724. procedure ClearCustData(var pCustData: TCustData); stdcall;
  3725. { from OLE2.H }
  3726. { OLE API prototypes }
  3727. function OleBuildVersion: HResult; stdcall;
  3728. { helper functions }
  3729. function ReadClassStg(stg: IStorage; out clsid: TCLSID): HResult; stdcall;
  3730. function WriteClassStg(stg: IStorage; const clsid: TIID): HResult; stdcall;
  3731. function ReadClassStm(stm: IStream; out clsid: TCLSID): HResult; stdcall;
  3732. function WriteClassStm(stm: IStream; const clsid: TIID): HResult; stdcall;
  3733. function WriteFmtUserTypeStg(stg: IStorage; cf: TClipFormat;
  3734. pszUserType: POleStr): HResult; stdcall;
  3735. function ReadFmtUserTypeStg(stg: IStorage; out cf: TClipFormat;
  3736. out pszUserType: POleStr): HResult; stdcall;
  3737. { Initialization and termination }
  3738. function OleInitialize(pwReserved: Pointer): HResult; stdcall;
  3739. procedure OleUninitialize; stdcall;
  3740. { APIs to query whether (Embedded/Linked) object can be created from
  3741. the data object }
  3742. function OleQueryLinkFromData(srcDataObject: IDataObject): HResult; stdcall;
  3743. function OleQueryCreateFromData(srcDataObject: IDataObject): HResult; stdcall;
  3744. { Object creation APIs }
  3745. function OleCreate(const clsid: TCLSID; const iid: TIID; renderopt: Longint;
  3746. formatEtc: PFormatEtc; clientSite: IOleClientSite;
  3747. stg: IStorage; out vObj): HResult; stdcall;
  3748. function OleCreateEx(const clsid: TCLSID; const iid: TIID;
  3749. dwFlags, renderopt, cFormats: Longint; rgAdvf: PLongintList; rgFFormatEtc: PFormatEtc;
  3750. AdviseSink: IAdviseSink; rgdwConnection: PLongintList; clientSite: IOleClientSite;
  3751. stg: IStorage; out vObj): HResult; stdcall;
  3752. function OleCreateFromData(srcDataObj: IDataObject; const iid: TIID;
  3753. renderopt: Longint; formatEtc: PFormatEtc; clientSite: IOleClientSite;
  3754. stg: IStorage; out vObj): HResult; stdcall;
  3755. function OleCreateFromDataEx(srcDataObj: IDataObject; const iid: TIID;
  3756. dwFlags, renderopt, cFormats: Longint; rgAdvf: PLongintList; rgFFormatEtc: PFormatEtc;
  3757. AdviseSink: IAdviseSink; rgdwConnection: PLongintList; clientSite: IOleClientSite;
  3758. stg: IStorage; out vObj): HResult; stdcall;
  3759. function OleCreateLinkFromData(srcDataObj: IDataObject; const iid: TIID;
  3760. renderopt: Longint; formatEtc: PFormatEtc; clientSite: IOleClientSite;
  3761. stg: IStorage; out vObj): HResult; stdcall;
  3762. function OleCreateLinkFromDataEx(srcDataObj: IDataObject; const iid: TIID;
  3763. dwFlags, renderopt, cFormats: Longint; rgAdvf: PLongintList; rgFFormatEtc: PFormatEtc;
  3764. AdviseSink: IAdviseSink; rgdwConnection: PLongintList; clientSite: IOleClientSite;
  3765. stg: IStorage; out vObj): HResult; stdcall;
  3766. function OleCreateStaticFromData(srcDataObj: IDataObject; const iid: TIID;
  3767. renderopt: Longint; formatEtc: PFormatEtc; clientSite: IOleClientSite;
  3768. stg: IStorage; out vObj): HResult; stdcall;
  3769. function OleCreateLink(mkLinkSrc: IMoniker; const iid: TIID;
  3770. renderopt: Longint; formatEtc: PFormatEtc; clientSite: IOleClientSite;
  3771. stg: IStorage; out vObj): HResult; stdcall;
  3772. function OleCreateLinkEx(mkLinkSrc: IMoniker; const iid: TIID;
  3773. dwFlags, renderopt, cFormats: Longint; rgAdvf: PLongintList; rgFFormatEtc: PFormatEtc;
  3774. AdviseSink: IAdviseSink; rgdwConnection: PLongintList; clientSite: IOleClientSite;
  3775. stg: IStorage; out vObj): HResult; stdcall;
  3776. function OleCreateLinkToFile(pszFileName: POleStr; const iid: TIID;
  3777. renderopt: Longint; formatEtc: PFormatEtc; clientSite: IOleClientSite;
  3778. stg: IStorage; out vObj): HResult; stdcall;
  3779. function OleCreateLinkToFileEx(pszFileName: POleStr; const iid: TIID;
  3780. dwFlags, renderopt, cFormats: Longint; rgAdvf: PLongintList; rgFFormatEtc: PFormatEtc;
  3781. AdviseSink: IAdviseSink; rgdwConnection: PLongintList; clientSite: IOleClientSite;
  3782. stg: IStorage; out vObj): HResult; stdcall;
  3783. function OleCreateFromFile(const clsid: TCLSID; pszFileName: POleStr;
  3784. const iid: TIID; renderopt: Longint; formatEtc: PFormatEtc;
  3785. clientSite: IOleClientSite; stg: IStorage; out vObj): HResult; stdcall;
  3786. function OleCreateFromFileEx(const clsid: TCLSID; pszFileName: POleStr; const iid: TIID;
  3787. dwFlags, renderopt, cFormats: Longint; rgAdvf: PLongintList; rgFFormatEtc: PFormatEtc;
  3788. AdviseSink: IAdviseSink; rgdwConnection: PLongintList; clientSite: IOleClientSite;
  3789. stg: IStorage; out vObj): HResult; stdcall;
  3790. function OleLoad(stg: IStorage; const iid: TIID; clientSite: IOleClientSite;
  3791. out vObj): HResult; stdcall;
  3792. function OleSave(ps: IPersistStorage; stg: IStorage; fSameAsLoad: BOOL): HResult; stdcall;
  3793. function OleLoadFromStream(stm: IStream; const iidInterface: TIID;
  3794. out vObj): HResult; stdcall;
  3795. function OleSaveToStream(pstm: IPersistStream; stm: IStream): HResult; stdcall;
  3796. function OleSetContainedObject(unknown: IUnknown; fContained: BOOL): HResult; stdcall;
  3797. function OleNoteObjectVisible(unknown: IUnknown; fVisible: BOOL): HResult; stdcall;
  3798. { DragDrop APIs }
  3799. function RegisterDragDrop(wnd: HWnd; dropTarget: IDropTarget): HResult; stdcall;
  3800. function RevokeDragDrop(wnd: HWnd): HResult; stdcall;
  3801. function DoDragDrop(dataObj: IDataObject; dropSource: IDropSource;
  3802. dwOKEffects: Longint; var dwEffect: Longint): HResult; stdcall;
  3803. { Clipboard APIs }
  3804. function OleSetClipboard(dataObj: IDataObject): HResult; stdcall;
  3805. function OleGetClipboard(out dataObj: IDataObject): HResult; stdcall;
  3806. function OleFlushClipboard: HResult; stdcall;
  3807. function OleIsCurrentClipboard(dataObj: IDataObject): HResult; stdcall;
  3808. { In-place editing APIs }
  3809. function OleCreateMenuDescriptor(hmenuCombined: HMenu;
  3810. var menuWidths: TOleMenuGroupWidths): HMenu; stdcall;
  3811. function OleSetMenuDescriptor(holemenu: HMenu; hwndFrame: HWnd;
  3812. hwndActiveObject: HWnd; frame: IOleInPlaceFrame;
  3813. activeObj: IOleInPlaceActiveObject): HResult; stdcall;
  3814. function OleDestroyMenuDescriptor(holemenu: HMenu): HResult; stdcall;
  3815. function OleTranslateAccelerator(frame: IOleInPlaceFrame;
  3816. var frameInfo: TOleInPlaceFrameInfo; msg: PMsg): HResult; stdcall;
  3817. { Helper APIs }
  3818. function OleDuplicateData(hSrc: THandle; cfFormat: TClipFormat;
  3819. uiFlags: Integer): THandle; stdcall;
  3820. function OleDraw(unknown: IUnknown; dwAspect: Longint; hdcDraw: HDC;
  3821. const rcBounds: TRect): HResult; stdcall;
  3822. function OleRun(unknown: IUnknown): HResult; stdcall;
  3823. function OleIsRunning(obj: IOleObject): BOOL; stdcall;
  3824. function OleLockRunning(unknown: IUnknown; fLock: BOOL;
  3825. fLastUnlockCloses: BOOL): HResult; stdcall;
  3826. procedure ReleaseStgMedium(var medium: TStgMedium); stdcall;
  3827. function CreateOleAdviseHolder(out OAHolder: IOleAdviseHolder): HResult; stdcall;
  3828. function OleCreateDefaultHandler(const clsid: TCLSID; unkOuter: IUnknown;
  3829. const iid: TIID; out vObj): HResult; stdcall;
  3830. function OleCreateEmbeddingHelper(const clsid: TCLSID; unkOuter: IUnknown;
  3831. flags: Longint; cf: IClassFactory; const iid: TIID; out vObj): HResult; stdcall;
  3832. function IsAccelerator(accel: HAccel; cAccelEntries: Integer; msg: PMsg;
  3833. var pwCmd: Word): BOOL; stdcall;
  3834. { Icon extraction helper APIs }
  3835. function OleGetIconOfFile(pszPath: POleStr; fUseFileAsLabel: BOOL): HGlobal; stdcall;
  3836. function OleGetIconOfClass(const clsid: TCLSID; pszLabel: POleStr;
  3837. fUseTypeAsLabel: BOOL): HGlobal; stdcall;
  3838. function OleMetafilePictFromIconAndLabel(icon: HIcon; pszLabel: POleStr;
  3839. pszSourceFile: POleStr; iIconIndex: Integer): HGlobal; stdcall;
  3840. { Registration database helper APIs }
  3841. function OleRegGetUserType(const clsid: TCLSID; dwFormOfType: Longint;
  3842. out pszUserType: POleStr): HResult; stdcall;
  3843. function OleRegGetMiscStatus(const clsid: TCLSID; dwAspect: Longint;
  3844. out dwStatus: Longint): HResult; stdcall;
  3845. function OleRegEnumFormatEtc(const clsid: TCLSID; dwDirection: Longint;
  3846. out Enum: IEnumFormatEtc): HResult; stdcall;
  3847. function OleRegEnumVerbs(const clsid: TCLSID;
  3848. out Enum: IEnumOleVerb): HResult; stdcall;
  3849. { OLE 1.0 conversion APIs }
  3850. function OleConvertIStorageToOLESTREAM(stg: IStorage;
  3851. polestm: Pointer): HResult; stdcall;
  3852. function OleConvertOLESTREAMToIStorage(polestm: Pointer; stg: IStorage;
  3853. td: PDVTargetDevice): HResult; stdcall;
  3854. function OleConvertIStorageToOLESTREAMEx(stg: IStorage; cfFormat: TClipFormat;
  3855. lWidth: Longint; lHeight: Longint; dwSize: Longint; var medium: TStgMedium;
  3856. polestm: Pointer): HResult; stdcall;
  3857. function OleConvertOLESTREAMToIStorageEx(polestm: Pointer; stg: IStorage;
  3858. var cfFormat: TClipFormat; var lWidth: Longint; var lHeight: Longint;
  3859. var dwSize: Longint; var medium: TStgMedium): HResult; stdcall;
  3860. { Storage utility APIs }
  3861. function GetHGlobalFromILockBytes(lkbyt: ILockBytes; out hglob: HGlobal): HResult; stdcall;
  3862. function CreateILockBytesOnHGlobal(hglob: HGlobal; fDeleteOnRelease: BOOL;
  3863. out lkbyt: ILockBytes): HResult; stdcall;
  3864. function GetHGlobalFromStream(stm: IStream; out hglob: HGlobal): HResult; stdcall;
  3865. function CreateStreamOnHGlobal(hglob: HGlobal; fDeleteOnRelease: BOOL;
  3866. out stm: IStream): HResult; stdcall;
  3867. { ConvertTo APIs }
  3868. function OleDoAutoConvert(stg: IStorage; out clsidNew: TCLSID): HResult; stdcall;
  3869. function OleGetAutoConvert(const clsidOld: TCLSID; out clsidNew: TCLSID): HResult; stdcall;
  3870. function OleSetAutoConvert(const clsidOld: TCLSID; const clsidNew: TCLSID): HResult; stdcall;
  3871. function GetConvertStg(stg: IStorage): HResult; stdcall;
  3872. function SetConvertStg(stg: IStorage; fConvert: BOOL): HResult; stdcall;
  3873. { from OLECTL.H }
  3874. { Property frame APIs }
  3875. function OleCreatePropertyFrame(hwndOwner: HWnd; x, y: Integer;
  3876. lpszCaption: POleStr; cObjects: Integer; pObjects: Pointer;
  3877. cPages: Integer; pPageCLSIDs: Pointer; lcid: TLCID; dwReserved: Longint;
  3878. pvReserved: Pointer): HResult; stdcall;
  3879. function OleCreatePropertyFrameIndirect(const Params: TOCPFIParams): HResult; stdcall;
  3880. { Standard type APIs }
  3881. function OleTranslateColor(clr: TOleColor; hpal: HPalette;
  3882. out colorref: TColorRef): HResult; stdcall;
  3883. function OleCreateFontIndirect(const FontDesc: TFontDesc; const iid: TIID;
  3884. out vObject): HResult; stdcall;
  3885. function OleCreatePictureIndirect(const PictDesc: TPictDesc; const iid: TIID;
  3886. fOwn: BOOL; out vObject): HResult; stdcall;
  3887. function OleLoadPicture(stream: IStream; lSize: Longint; fRunmode: BOOL;
  3888. const iid: TIID; out vObject): HResult; stdcall;
  3889. function OleLoadPicturePath(szURLorPath: POleStr; unkCaller: IUnknown;
  3890. dwReserved: Longint; clrReserved: TOleColor; const iid: TIID;
  3891. ppvRet: Pointer): HResult; stdcall;
  3892. function OleLoadPictureFile(varFileName: OleVariant;
  3893. var lpdispPicture: IDispatch): HResult; stdcall;
  3894. function OleSavePictureFile(dispPicture: IDispatch;
  3895. bstrFileName: TBStr): HResult; stdcall;
  3896. function OleIconToCursor(hinstExe: THandle; hIcon: THandle): HCursor; stdcall;
  3897. // Macros for parsing the OS Version of the Property Set Header
  3898. function PROPSETHDR_OSVER_KIND(dwOSVer: DWORD): Word; {inline;}
  3899. function PROPSETHDR_OSVER_MAJOR(dwOSVer: DWORD): Byte; {inline;}
  3900. function PROPSETHDR_OSVER_MINOR(dwOSVer: DWORD): Byte; {inline;}
  3901. const
  3902. PROPSETHDR_OSVERSION_UNKNOWN = $FFFFFFFF;
  3903. implementation
  3904. const
  3905. ole32 = 'ole32.dll';
  3906. oleaut32 = 'oleaut32.dll';
  3907. olepro32 = 'olepro32.dll';
  3908. { Externals from ole32.dll }
  3909. function IsEqualGUID; external ole32 name 'IsEqualGUID';
  3910. function IsEqualIID; external ole32 name 'IsEqualGUID';
  3911. function IsEqualCLSID; external ole32 name 'IsEqualGUID';
  3912. function CoBuildVersion; external ole32 name 'CoBuildVersion';
  3913. function CoInitialize; external ole32 name 'CoInitialize';
  3914. function CoInitializeEx; external ole32 name 'CoInitializeEx';
  3915. procedure CoUninitialize; external ole32 name 'CoUninitialize';
  3916. function CoGetMalloc; external ole32 name 'CoGetMalloc';
  3917. function CoGetCurrentProcess; external ole32 name 'CoGetCurrentProcess';
  3918. function CoRegisterMallocSpy; external ole32 name 'CoRegisterMallocSpy';
  3919. function CoRevokeMallocSpy; external ole32 name 'CoRevokeMallocSpy';
  3920. function CoCreateStandardMalloc; external ole32 name 'CoCreateStandardMalloc';
  3921. function CoGetClassObject; external ole32 name 'CoGetClassObject';
  3922. function CoRegisterClassObject; external ole32 name 'CoRegisterClassObject';
  3923. function CoRevokeClassObject; external ole32 name 'CoRevokeClassObject';
  3924. function CoResumeClassObjects; external ole32 name 'CoResumeClassObjects';
  3925. function CoSuspendClassObjects; external ole32 name 'CoSuspendClassObjects';
  3926. function CoAddRefServerProcess; external ole32 name 'CoAddRefServerProcess';
  3927. function CoReleaseServerProcess; external ole32 name 'CoReleaseServerProcess';
  3928. function CoGetPSClsid; external ole32 name 'CoGetPSClsid';
  3929. function CoRegisterPSClsid; external ole32 name 'CoRegisterPSClsid';
  3930. function CoGetMarshalSizeMax; external ole32 name 'CoGetMarshalSizeMax';
  3931. function CoMarshalInterface; external ole32 name 'CoMarshalInterface';
  3932. function CoUnmarshalInterface; external ole32 name 'CoUnmarshalInterface';
  3933. function CoMarshalHResult; external ole32 name 'CoMarshalHResult';
  3934. function CoUnmarshalHResult; external ole32 name 'CoUnmarshalHResult';
  3935. function CoReleaseMarshalData; external ole32 name 'CoReleaseMarshalData';
  3936. function CoDisconnectObject; external ole32 name 'CoDisconnectObject';
  3937. function CoLockObjectExternal; external ole32 name 'CoLockObjectExternal';
  3938. function CoGetStandardMarshal; external ole32 name 'CoGetStandardMarshal';
  3939. function CoIsHandlerConnected; external ole32 name 'CoIsHandlerConnected';
  3940. function CoHasStrongExternalConnections; external ole32 name 'CoHasStrongExternalConnections';
  3941. function CoMarshalInterThreadInterfaceInStream; external ole32 name 'CoMarshalInterThreadInterfaceInStream';
  3942. function CoGetInterfaceAndReleaseStream; external ole32 name 'CoGetInterfaceAndReleaseStream';
  3943. function CoCreateFreeThreadedMarshaler; external ole32 name 'CoCreateFreeThreadedMarshaler';
  3944. function CoLoadLibrary; external ole32 name 'CoLoadLibrary';
  3945. procedure CoFreeLibrary; external ole32 name 'CoFreeLibrary';
  3946. procedure CoFreeAllLibraries; external ole32 name 'CoFreeAllLibraries';
  3947. procedure CoFreeUnusedLibraries; external ole32 name 'CoFreeUnusedLibraries';
  3948. function CoInitializeSecurity; external ole32 name 'CoInitializeSecurity';
  3949. function CoGetCallContext; external ole32 name 'CoGetCallContext';
  3950. function CoQueryProxyBlanket; external ole32 name 'CoQueryProxyBlanket';
  3951. function CoSetProxyBlanket; external ole32 name 'CoSetProxyBlanket';
  3952. function CoCopyProxy; external ole32 name 'CoCopyProxy';
  3953. function CoQueryClientBlanket; external ole32 name 'CoQueryClientBlanket';
  3954. function CoImpersonateClient; external ole32 name 'CoImpersonateClient';
  3955. function CoRevertToSelf; external ole32 name 'CoRevertToSelf';
  3956. function CoQueryAuthenticationServices; external ole32 name 'CoQueryAuthenticationServices';
  3957. function CoSwitchCallContext; external ole32 name 'CoSwitchCallContext';
  3958. function CoCreateInstance; external ole32 name 'CoCreateInstance';
  3959. function CoGetInstanceFromFile; external ole32 name 'CoGetInstanceFromFile';
  3960. function CoGetInstanceFromIStorage; external ole32 name 'CoGetInstanceFromIStorage';
  3961. function CoCreateInstanceEx; external ole32 name 'CoCreateInstanceEx';
  3962. function StringFromCLSID; external ole32 name 'StringFromCLSID';
  3963. function CLSIDFromString; external ole32 name 'CLSIDFromString';
  3964. function StringFromIID; external ole32 name 'StringFromIID';
  3965. function IIDFromString; external ole32 name 'IIDFromString';
  3966. function CoIsOle1Class; external ole32 name 'CoIsOle1Class';
  3967. function ProgIDFromCLSID; external ole32 name 'ProgIDFromCLSID';
  3968. function CLSIDFromProgID; external ole32 name 'CLSIDFromProgID';
  3969. function StringFromGUID2; external ole32 name 'StringFromGUID2';
  3970. function CoCreateGuid; external ole32 name 'CoCreateGuid';
  3971. function CoFileTimeToDosDateTime; external ole32 name 'CoFileTimeToDosDateTime';
  3972. function CoDosDateTimeToFileTime; external ole32 name 'CoDosDateTimeToFileTime';
  3973. function CoFileTimeNow; external ole32 name 'CoFileTimeNow';
  3974. function CoRegisterMessageFilter; external ole32 name 'CoRegisterMessageFilter';
  3975. function CoRegisterChannelHook; external ole32 name 'CoRegisterChannelHook';
  3976. function CoGetTreatAsClass; external ole32 name 'CoGetTreatAsClass';
  3977. function CoTreatAsClass; external ole32 name 'CoTreatAsClass';
  3978. function CoTaskMemAlloc; external ole32 name 'CoTaskMemAlloc';
  3979. function CoTaskMemRealloc; external ole32 name 'CoTaskMemRealloc';
  3980. procedure CoTaskMemFree; external ole32 name 'CoTaskMemFree';
  3981. function CreateDataAdviseHolder; external ole32 name 'CreateDataAdviseHolder';
  3982. function CreateDataCache; external ole32 name 'CreateDataCache';
  3983. function StgCreateDocfile; external ole32 name 'StgCreateDocfile';
  3984. function StgCreateDocfileOnILockBytes; external ole32 name 'StgCreateDocfileOnILockBytes';
  3985. function StgOpenStorage; external ole32 name 'StgOpenStorage';
  3986. function StgOpenStorageOnILockBytes; external ole32 name 'StgOpenStorageOnILockBytes';
  3987. function StgIsStorageFile; external ole32 name 'StgIsStorageFile';
  3988. function StgIsStorageILockBytes; external ole32 name 'StgIsStorageILockBytes';
  3989. function StgSetTimes; external ole32 name 'StgSetTimes';
  3990. function StgOpenAsyncDocfileOnIFillLockBytes; external ole32 name 'StgOpenAsyncDocfileOnIFillLockBytes';
  3991. function StgGetIFillLockBytesOnILockBytes; external ole32 name 'StgGetIFillLockBytesOnILockBytes';
  3992. function StgGetIFillLockBytesOnFile; external ole32 name 'StgGetIFillLockBytesOnFile';
  3993. function StgOpenLayoutDocfile; external ole32 name 'StgOpenLayoutDocfile';
  3994. function BindMoniker; external ole32 name 'BindMoniker';
  3995. function CoGetObject; external ole32 name 'CoGetObject';
  3996. function MkParseDisplayName; external ole32 name 'MkParseDisplayName';
  3997. function MonikerRelativePathTo; external ole32 name 'MonikerRelativePathTo';
  3998. function MonikerCommonPrefixWith; external ole32 name 'MonikerCommonPrefixWith';
  3999. function CreateBindCtx; external ole32 name 'CreateBindCtx';
  4000. function CreateGenericComposite; external ole32 name 'CreateGenericComposite';
  4001. function GetClassFile; external ole32 name 'GetClassFile';
  4002. function CreateFileMoniker; external ole32 name 'CreateFileMoniker';
  4003. function CreateItemMoniker; external ole32 name 'CreateItemMoniker';
  4004. function CreateAntiMoniker; external ole32 name 'CreateAntiMoniker';
  4005. function CreatePointerMoniker; external ole32 name 'CreatePointerMoniker';
  4006. function GetRunningObjectTable; external ole32 name 'GetRunningObjectTable';
  4007. function OleBuildVersion; external ole32 name 'OleBuildVersion';
  4008. function ReadClassStg; external ole32 name 'ReadClassStg';
  4009. function WriteClassStg; external ole32 name 'WriteClassStg';
  4010. function ReadClassStm; external ole32 name 'ReadClassStm';
  4011. function WriteClassStm; external ole32 name 'WriteClassStm';
  4012. function WriteFmtUserTypeStg; external ole32 name 'WriteFmtUserTypeStg';
  4013. function ReadFmtUserTypeStg; external ole32 name 'ReadFmtUserTypeStg';
  4014. function OleInitialize; external ole32 name 'OleInitialize';
  4015. procedure OleUninitialize; external ole32 name 'OleUninitialize';
  4016. function OleQueryLinkFromData; external ole32 name 'OleQueryLinkFromData';
  4017. function OleQueryCreateFromData; external ole32 name 'OleQueryCreateFromData';
  4018. function OleCreate; external ole32 name 'OleCreate';
  4019. function OleCreateEx; external ole32 name 'OleCreateEx';
  4020. function OleCreateFromDataEx; external ole32 name 'OleCreateFromDataEx';
  4021. function OleCreateFromData; external ole32 name 'OleCreateFromData';
  4022. function OleCreateLinkFromData; external ole32 name 'OleCreateLinkFromData';
  4023. function OleCreateLinkFromDataEx; external ole32 name 'OleCreateLinkFromDataEx';
  4024. function OleCreateStaticFromData; external ole32 name 'OleCreateStaticFromData';
  4025. function OleCreateLink; external ole32 name 'OleCreateLink';
  4026. function OleCreateLinkEx; external ole32 name 'OleCreateLinkEx';
  4027. function OleCreateLinkToFile; external ole32 name 'OleCreateLinkToFile';
  4028. function OleCreateLinkToFileEx; external ole32 name 'OleCreateLinkToFileEx';
  4029. function OleCreateFromFile; external ole32 name 'OleCreateFromFile';
  4030. function OleCreateFromFileEx; external ole32 name 'OleCreateFromFileEx';
  4031. function OleLoad; external ole32 name 'OleLoad';
  4032. function OleSave; external ole32 name 'OleSave';
  4033. function OleLoadFromStream; external ole32 name 'OleLoadFromStream';
  4034. function OleSaveToStream; external ole32 name 'OleSaveToStream';
  4035. function OleSetContainedObject; external ole32 name 'OleSetContainedObject';
  4036. function OleNoteObjectVisible; external ole32 name 'OleNoteObjectVisible';
  4037. function RegisterDragDrop; external ole32 name 'RegisterDragDrop';
  4038. function RevokeDragDrop; external ole32 name 'RevokeDragDrop';
  4039. function DoDragDrop; external ole32 name 'DoDragDrop';
  4040. function OleSetClipboard; external ole32 name 'OleSetClipboard';
  4041. function OleGetClipboard; external ole32 name 'OleGetClipboard';
  4042. function OleFlushClipboard; external ole32 name 'OleFlushClipboard';
  4043. function OleIsCurrentClipboard; external ole32 name 'OleIsCurrentClipboard';
  4044. function OleCreateMenuDescriptor; external ole32 name 'OleCreateMenuDescriptor';
  4045. function OleSetMenuDescriptor; external ole32 name 'OleSetMenuDescriptor';
  4046. function OleDestroyMenuDescriptor; external ole32 name 'OleDestroyMenuDescriptor';
  4047. function OleTranslateAccelerator; external ole32 name 'OleTranslateAccelerator';
  4048. function OleDuplicateData; external ole32 name 'OleDuplicateData';
  4049. function OleDraw; external ole32 name 'OleDraw';
  4050. function OleRun; external ole32 name 'OleRun';
  4051. function OleIsRunning; external ole32 name 'OleIsRunning';
  4052. function OleLockRunning; external ole32 name 'OleLockRunning';
  4053. procedure ReleaseStgMedium; external ole32 name 'ReleaseStgMedium';
  4054. function CreateOleAdviseHolder; external ole32 name 'CreateOleAdviseHolder';
  4055. function OleCreateDefaultHandler; external ole32 name 'OleCreateDefaultHandler';
  4056. function OleCreateEmbeddingHelper; external ole32 name 'OleCreateEmbeddingHelper';
  4057. function IsAccelerator; external ole32 name 'IsAccelerator';
  4058. function OleGetIconOfFile; external ole32 name 'OleGetIconOfFile';
  4059. function OleGetIconOfClass; external ole32 name 'OleGetIconOfClass';
  4060. function OleMetafilePictFromIconAndLabel; external ole32 name 'OleMetafilePictFromIconAndLabel';
  4061. function OleRegGetUserType; external ole32 name 'OleRegGetUserType';
  4062. function OleRegGetMiscStatus; external ole32 name 'OleRegGetMiscStatus';
  4063. function OleRegEnumFormatEtc; external ole32 name 'OleRegEnumFormatEtc';
  4064. function OleRegEnumVerbs; external ole32 name 'OleRegEnumVerbs';
  4065. function OleConvertIStorageToOLESTREAM; external ole32 name 'OleConvertIStorageToOLESTREAM';
  4066. function OleConvertOLESTREAMToIStorage; external ole32 name 'OleConvertOLESTREAMToIStorage';
  4067. function OleConvertIStorageToOLESTREAMEx; external ole32 name 'OleConvertIStorageToOLESTREAMEx';
  4068. function OleConvertOLESTREAMToIStorageEx; external ole32 name 'OleConvertOLESTREAMToIStorageEx';
  4069. function GetHGlobalFromILockBytes; external ole32 name 'GetHGlobalFromILockBytes';
  4070. function CreateILockBytesOnHGlobal; external ole32 name 'CreateILockBytesOnHGlobal';
  4071. function GetHGlobalFromStream; external ole32 name 'GetHGlobalFromStream';
  4072. function CreateStreamOnHGlobal; external ole32 name 'CreateStreamOnHGlobal';
  4073. function OleDoAutoConvert; external ole32 name 'OleDoAutoConvert';
  4074. function OleGetAutoConvert; external ole32 name 'OleGetAutoConvert';
  4075. function OleSetAutoConvert; external ole32 name 'OleSetAutoConvert';
  4076. function GetConvertStg; external ole32 name 'GetConvertStg';
  4077. function SetConvertStg; external ole32 name 'SetConvertStg';
  4078. { Externals from oleaut32.dll }
  4079. function SysAllocString; external oleaut32 name 'SysAllocString';
  4080. function SysReAllocString; external oleaut32 name 'SysReAllocString';
  4081. function SysAllocStringLen; external oleaut32 name 'SysAllocStringLen';
  4082. function SysReAllocStringLen; external oleaut32 name 'SysReAllocStringLen';
  4083. procedure SysFreeString; external oleaut32 name 'SysFreeString';
  4084. function SysStringLen; external oleaut32 name 'SysStringLen';
  4085. function SysStringByteLen; external oleaut32 name 'SysStringByteLen';
  4086. function SysAllocStringByteLen; external oleaut32 name 'SysAllocStringByteLen';
  4087. function DosDateTimeToVariantTime; external oleaut32 name 'DosDateTimeToVariantTime';
  4088. function VariantTimeToDosDateTime; external oleaut32 name 'VariantTimeToDosDateTime';
  4089. function SystemTimeToVariantTime; external oleaut32 name 'SystemTimeToVariantTime';
  4090. function VariantTimeToSystemTime; external oleaut32 name 'VariantTimeToSystemTime';
  4091. function SafeArrayAllocDescriptor; external oleaut32 name 'SafeArrayAllocDescriptor';
  4092. function SafeArrayAllocData; external oleaut32 name 'SafeArrayAllocData';
  4093. function SafeArrayCreate; external oleaut32 name 'SafeArrayCreate';
  4094. function SafeArrayCreateEx; external oleaut32 name 'SafeArrayCreateEx';
  4095. function SafeArrayCreateVector; external oleaut32 name 'SafeArrayCreateVector';
  4096. function SafeArrayCreateVectorEx; external oleaut32 name 'SafeArrayCreateVectorEx';
  4097. function SafeArrayCopyData; external oleaut32 name 'SafeArrayCopyData';
  4098. function SafeArrayDestroyDescriptor; external oleaut32 name 'SafeArrayDestroyDescriptor';
  4099. function SafeArrayDestroyData; external oleaut32 name 'SafeArrayDestroyData';
  4100. function SafeArrayDestroy; external oleaut32 name 'SafeArrayDestroy';
  4101. function SafeArrayRedim; external oleaut32 name 'SafeArrayRedim';
  4102. function SafeArrayGetDim; external oleaut32 name 'SafeArrayGetDim';
  4103. function SafeArrayGetElemsize; external oleaut32 name 'SafeArrayGetElemsize';
  4104. function SafeArrayGetUBound; external oleaut32 name 'SafeArrayGetUBound';
  4105. function SafeArrayGetLBound; external oleaut32 name 'SafeArrayGetLBound';
  4106. function SafeArrayLock; external oleaut32 name 'SafeArrayLock';
  4107. function SafeArrayUnlock; external oleaut32 name 'SafeArrayUnlock';
  4108. function SafeArrayAccessData; external oleaut32 name 'SafeArrayAccessData';
  4109. function SafeArrayUnaccessData; external oleaut32 name 'SafeArrayUnaccessData';
  4110. function SafeArrayGetElement; external oleaut32 name 'SafeArrayGetElement';
  4111. function SafeArrayPutElement; external oleaut32 name 'SafeArrayPutElement';
  4112. function SafeArrayCopy; external oleaut32 name 'SafeArrayCopy';
  4113. function SafeArrayPtrOfIndex; external oleaut32 name 'SafeArrayPtrOfIndex';
  4114. procedure VariantInit; external oleaut32 name 'VariantInit';
  4115. function VariantClear; external oleaut32 name 'VariantClear';
  4116. function VariantCopy; external oleaut32 name 'VariantCopy';
  4117. function VariantCopyInd; external oleaut32 name 'VariantCopyInd';
  4118. function VariantChangeType; external oleaut32 name 'VariantChangeType';
  4119. function VariantChangeTypeEx; external oleaut32 name 'VariantChangeTypeEx';
  4120. function VectorFromBstr; external oleaut32 name 'VectorFromBstr';
  4121. function BstrFromVector; external oleaut32 name 'BstrFromVector';
  4122. function VarUI1FromI2; external oleaut32 name 'VarUI1FromI2';
  4123. function VarUI1FromI4; external oleaut32 name 'VarUI1FromI4';
  4124. function VarUI1FromR4; external oleaut32 name 'VarUI1FromR4';
  4125. function VarUI1FromR8; external oleaut32 name 'VarUI1FromR8';
  4126. function VarUI1FromCy; external oleaut32 name 'VarUI1FromCy';
  4127. function VarUI1FromDate; external oleaut32 name 'VarUI1FromDate';
  4128. function VarUI1FromStr; external oleaut32 name 'VarUI1FromStr';
  4129. function VarUI1FromDisp; external oleaut32 name 'VarUI1FromDisp';
  4130. function VarUI1FromBool; external oleaut32 name 'VarUI1FromBool';
  4131. function VarUI1FromI1; external oleaut32 name 'VarUI1FromI1';
  4132. function VarUI1FromUI2; external oleaut32 name 'VarUI1FromUI2';
  4133. function VarUI1FromUI4; external oleaut32 name 'VarUI1FromUI4';
  4134. function VarUI1FromDec; external oleaut32 name 'VarUI1FromDec';
  4135. function VarI2FromUI1; external oleaut32 name 'VarI2FromUI1';
  4136. function VarI2FromI4; external oleaut32 name 'VarI2FromI4';
  4137. function VarI2FromR4; external oleaut32 name 'VarI2FromR4';
  4138. function VarI2FromR8; external oleaut32 name 'VarI2FromR8';
  4139. function VarI2FromCy; external oleaut32 name 'VarI2FromCy';
  4140. function VarI2FromDate; external oleaut32 name 'VarI2FromDate';
  4141. function VarI2FromStr; external oleaut32 name 'VarI2FromStr';
  4142. function VarI2FromDisp; external oleaut32 name 'VarI2FromDisp';
  4143. function VarI2FromBool; external oleaut32 name 'VarI2FromBool';
  4144. function VarI2FromI1; external oleaut32 name 'VarI2FromI1';
  4145. function VarI2FromUI2; external oleaut32 name 'VarI2FromUI2';
  4146. function VarI2FromUI4; external oleaut32 name 'VarI2FromUI4';
  4147. function VarI2FromDec; external oleaut32 name 'VarI2FromDec';
  4148. function VarI4FromUI1; external oleaut32 name 'VarI4FromUI1';
  4149. function VarI4FromI2; external oleaut32 name 'VarI4FromI2';
  4150. function VarI4FromR4; external oleaut32 name 'VarI4FromR4';
  4151. function VarI4FromR8; external oleaut32 name 'VarI4FromR8';
  4152. function VarI4FromCy; external oleaut32 name 'VarI4FromCy';
  4153. function VarI4FromDate; external oleaut32 name 'VarI4FromDate';
  4154. function VarI4FromStr; external oleaut32 name 'VarI4FromStr';
  4155. function VarI4FromDisp; external oleaut32 name 'VarI4FromDisp';
  4156. function VarI4FromBool; external oleaut32 name 'VarI4FromBool';
  4157. function VarI4FromI1; external oleaut32 name 'VarI4FromI1';
  4158. function VarI4FromUI2; external oleaut32 name 'VarI4FromUI2';
  4159. function VarI4FromUI4; external oleaut32 name 'VarI4FromUI4';
  4160. function VarI4FromDec; external oleaut32 name 'VarI4FromDec';
  4161. function VarI4FromInt; external oleaut32 name 'VarI4FromInt';
  4162. function VarR4FromUI1; external oleaut32 name 'VarR4FromUI1';
  4163. function VarR4FromI2; external oleaut32 name 'VarR4FromI2';
  4164. function VarR4FromI4; external oleaut32 name 'VarR4FromI4';
  4165. function VarR4FromR8; external oleaut32 name 'VarR4FromR8';
  4166. function VarR4FromCy; external oleaut32 name 'VarR4FromCy';
  4167. function VarR4FromDate; external oleaut32 name 'VarR4FromDate';
  4168. function VarR4FromStr; external oleaut32 name 'VarR4FromStr';
  4169. function VarR4FromDisp; external oleaut32 name 'VarR4FromDisp';
  4170. function VarR4FromBool; external oleaut32 name 'VarR4FromBool';
  4171. function VarR4FromI1; external oleaut32 name 'VarR4FromI1';
  4172. function VarR4FromUI2; external oleaut32 name 'VarR4FromUI2';
  4173. function VarR4FromUI4; external oleaut32 name 'VarR4FromUI4';
  4174. function VarR4FromDec; external oleaut32 name 'VarR4FromDec';
  4175. function VarR8FromUI1; external oleaut32 name 'VarR8FromUI1';
  4176. function VarR8FromI2; external oleaut32 name 'VarR8FromI2';
  4177. function VarR8FromI4; external oleaut32 name 'VarR8FromI4';
  4178. function VarR8FromR4; external oleaut32 name 'VarR8FromR4';
  4179. function VarR8FromCy; external oleaut32 name 'VarR8FromCy';
  4180. function VarR8FromDate; external oleaut32 name 'VarR8FromDate';
  4181. function VarR8FromStr; external oleaut32 name 'VarR8FromStr';
  4182. function VarR8FromDisp; external oleaut32 name 'VarR8FromDisp';
  4183. function VarR8FromBool; external oleaut32 name 'VarR8FromBool';
  4184. function VarR8FromI1; external oleaut32 name 'VarR8FromI1';
  4185. function VarR8FromUI2; external oleaut32 name 'VarR8FromUI2';
  4186. function VarR8FromUI4; external oleaut32 name 'VarR8FromUI4';
  4187. function VarR8FromDec; external oleaut32 name 'VarR8FromDec';
  4188. function VarDateFromUI1; external oleaut32 name 'VarDateFromUI1';
  4189. function VarDateFromI2; external oleaut32 name 'VarDateFromI2';
  4190. function VarDateFromI4; external oleaut32 name 'VarDateFromI4';
  4191. function VarDateFromR4; external oleaut32 name 'VarDateFromR4';
  4192. function VarDateFromR8; external oleaut32 name 'VarDateFromR8';
  4193. function VarDateFromCy; external oleaut32 name 'VarDateFromCy';
  4194. function VarDateFromStr; external oleaut32 name 'VarDateFromStr';
  4195. function VarDateFromDisp; external oleaut32 name 'VarDateFromDisp';
  4196. function VarDateFromBool; external oleaut32 name 'VarDateFromBool';
  4197. function VarDateFromI1; external oleaut32 name 'VarDateFromI1';
  4198. function VarDateFromUI2; external oleaut32 name 'VarDateFromUI2';
  4199. function VarDateFromUI4; external oleaut32 name 'VarDateFromUI4';
  4200. function VarDateFromDec; external oleaut32 name 'VarDateFromDec';
  4201. function VarCyFromUI1; external oleaut32 name 'VarCyFromUI1';
  4202. function VarCyFromI2; external oleaut32 name 'VarCyFromI2';
  4203. function VarCyFromI4; external oleaut32 name 'VarCyFromI4';
  4204. function VarCyFromR4; external oleaut32 name 'VarCyFromR4';
  4205. function VarCyFromR8; external oleaut32 name 'VarCyFromR8';
  4206. function VarCyFromDate; external oleaut32 name 'VarCyFromDate';
  4207. function VarCyFromStr; external oleaut32 name 'VarCyFromStr';
  4208. function VarCyFromDisp; external oleaut32 name 'VarCyFromDisp';
  4209. function VarCyFromBool; external oleaut32 name 'VarCyFromBool';
  4210. function VarCyFromI1; external oleaut32 name 'VarCyFromI1';
  4211. function VarCyFromUI2; external oleaut32 name 'VarCyFromUI2';
  4212. function VarCyFromUI4; external oleaut32 name 'VarCyFromUI4';
  4213. function VarCyFromDec; external oleaut32 name 'VarCyFromDec';
  4214. function VarBStrFromUI1; external oleaut32 name 'VarBStrFromUI1';
  4215. function VarBStrFromI2; external oleaut32 name 'VarBStrFromI2';
  4216. function VarBStrFromI4; external oleaut32 name 'VarBStrFromI4';
  4217. function VarBStrFromR4; external oleaut32 name 'VarBStrFromR4';
  4218. function VarBStrFromR8; external oleaut32 name 'VarBStrFromR8';
  4219. function VarBStrFromCy; external oleaut32 name 'VarBStrFromCy';
  4220. function VarBStrFromDate; external oleaut32 name 'VarBStrFromDate';
  4221. function VarBStrFromDisp; external oleaut32 name 'VarBStrFromDisp';
  4222. function VarBStrFromBool; external oleaut32 name 'VarBStrFromBool';
  4223. function VarBstrFromI1; external oleaut32 name 'VarBstrFromI1';
  4224. function VarBstrFromUI2; external oleaut32 name 'VarBstrFromUI2';
  4225. function VarBstrFromUI4; external oleaut32 name 'VarBstrFromUI4';
  4226. function VarBstrFromDec; external oleaut32 name 'VarBstrFromDec';
  4227. function VarBoolFromUI1; external oleaut32 name 'VarBoolFromUI1';
  4228. function VarBoolFromI2; external oleaut32 name 'VarBoolFromI2';
  4229. function VarBoolFromI4; external oleaut32 name 'VarBoolFromI4';
  4230. function VarBoolFromR4; external oleaut32 name 'VarBoolFromR4';
  4231. function VarBoolFromR8; external oleaut32 name 'VarBoolFromR8';
  4232. function VarBoolFromDate; external oleaut32 name 'VarBoolFromDate';
  4233. function VarBoolFromCy; external oleaut32 name 'VarBoolFromCy';
  4234. function VarBoolFromStr; external oleaut32 name 'VarBoolFromStr';
  4235. function VarBoolFromDisp; external oleaut32 name 'VarBoolFromDisp';
  4236. function VarBoolFromI1; external oleaut32 name 'VarBoolFromI1';
  4237. function VarBoolFromUI2; external oleaut32 name 'VarBoolFromUI2';
  4238. function VarBoolFromUI4; external oleaut32 name 'VarBoolFromUI4';
  4239. function VarBoolFromDec; external oleaut32 name 'VarBoolFromDec';
  4240. function LHashValOfNameSys; external oleaut32 name 'LHashValOfNameSys';
  4241. function LHashValOfNameSysA; external oleaut32 name 'LHashValOfNameSysA';
  4242. function LoadTypeLib; external oleaut32 name 'LoadTypeLib';
  4243. function LoadTypeLibEx; external oleaut32 name 'LoadTypeLibEx';
  4244. function LoadRegTypeLib; external oleaut32 name 'LoadRegTypeLib';
  4245. function QueryPathOfRegTypeLib; external oleaut32 name 'QueryPathOfRegTypeLib';
  4246. function RegisterTypeLib; external oleaut32 name 'RegisterTypeLib';
  4247. function UnRegisterTypeLib; external oleaut32 name 'UnRegisterTypeLib';
  4248. function CreateTypeLib; external oleaut32 name 'CreateTypeLib';
  4249. function CreateTypeLib2; external oleaut32 name 'CreateTypeLib2';
  4250. function DispGetParam; external oleaut32 name 'DispGetParam';
  4251. function DispGetIDsOfNames; external oleaut32 name 'DispGetIDsOfNames';
  4252. function DispInvoke; external oleaut32 name 'DispInvoke';
  4253. function CreateDispTypeInfo; external oleaut32 name 'CreateDispTypeInfo';
  4254. function CreateStdDispatch; external oleaut32 name 'CreateStdDispatch';
  4255. function DispCallFunc; external oleaut32 name 'DispCallFunc';
  4256. function RegisterActiveObject; external oleaut32 name 'RegisterActiveObject';
  4257. function RevokeActiveObject; external oleaut32 name 'RevokeActiveObject';
  4258. function GetActiveObject; external oleaut32 name 'GetActiveObject';
  4259. function SetErrorInfo; external oleaut32 name 'SetErrorInfo';
  4260. function GetErrorInfo; external oleaut32 name 'GetErrorInfo';
  4261. function CreateErrorInfo; external oleaut32 name 'CreateErrorInfo';
  4262. function OaBuildVersion; external oleaut32 name 'OaBuildVersion';
  4263. procedure ClearCustData; external oleaut32 name 'ClearCustData';
  4264. { Externals from olepro32.dll }
  4265. function OleCreatePropertyFrame; external olepro32 name 'OleCreatePropertyFrame';
  4266. function OleCreatePropertyFrameIndirect; external olepro32 name 'OleCreatePropertyFrameIndirect';
  4267. function OleTranslateColor; external olepro32 name 'OleTranslateColor';
  4268. function OleCreateFontIndirect; external olepro32 name 'OleCreateFontIndirect';
  4269. function OleCreatePictureIndirect; external olepro32 name 'OleCreatePictureIndirect';
  4270. function OleLoadPicture; external olepro32 name 'OleLoadPicture';
  4271. function OleLoadPicturePath; external olepro32 name 'OleLoadPicturePath';
  4272. function OleLoadPictureFile; external olepro32 name 'OleLoadPictureFile';
  4273. function OleSavePictureFile; external olepro32 name 'OleSavePictureFile';
  4274. function OleIconToCursor; external olepro32 name 'OleIconToCursor';
  4275. { Helper functions }
  4276. function Succeeded(Res: HResult): Boolean;
  4277. begin
  4278. Result := Res and $80000000 = 0;
  4279. end;
  4280. function Failed(Res: HResult): Boolean;
  4281. begin
  4282. Result := Res and $80000000 <> 0;
  4283. end;
  4284. function ResultCode(Res: HResult): Integer;
  4285. begin
  4286. Result := Res and $0000FFFF;
  4287. end;
  4288. function ResultFacility(Res: HResult): Integer;
  4289. begin
  4290. Result := (Res shr 16) and $00001FFF;
  4291. end;
  4292. function ResultSeverity(Res: HResult): Integer;
  4293. begin
  4294. Result := Res shr 31;
  4295. end;
  4296. function MakeResult(Severity, Facility, Code: Integer): HResult;
  4297. begin
  4298. Result := (Severity shl 31) or (Facility shl 16) or Code;
  4299. end;
  4300. function LHashValOfName(lcid: TLCID; szName: POleStr): Longint;
  4301. begin
  4302. Result := LHashValOfNameSys(SYS_WIN32, lcid, szName);
  4303. end;
  4304. function WHashValOfLHashVal(lhashval: Longint): Word;
  4305. begin
  4306. Result := lhashval and $0000FFFF;
  4307. end;
  4308. function IsHashValCompatible(lhashval1, lhashval2: Longint): Boolean;
  4309. begin
  4310. Result := lhashval1 and $00FF0000 = lhashval2 and $00FF0000;
  4311. end;
  4312. function PROPSETHDR_OSVER_KIND(dwOSVer: DWORD): Word;
  4313. begin
  4314. Result := HiWord(dwOSVer);
  4315. end;
  4316. function PROPSETHDR_OSVER_MAJOR(dwOSVer: DWORD): Byte;
  4317. begin
  4318. Result := LoByte(dwOSVer);
  4319. end;
  4320. function PROPSETHDR_OSVER_MINOR(dwOSVer: DWORD): Byte;
  4321. begin
  4322. Result := HiByte(LoWord(dwOSVer));
  4323. end;
  4324. end.