2 * Copyright 2002 Ove Kaaven
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 interface IRecordInfo;
30 pointer_default(unique)
32 interface IOleAutomationTypes
39 typedef struct tagSAFEARRAYBOUND {
42 } SAFEARRAYBOUND, *LPSAFEARRAYBOUND;
44 typedef [unique] struct _wireVARIANT *wireVARIANT;
45 typedef [unique] struct _wireBRECORD *wireBRECORD;
47 typedef struct _wireSAFEARR_BSTR {
49 [size_is(Size), ref] wireBSTR *aBstr;
52 typedef struct _wireSAFEARR_UNKNOWN {
54 [size_is(Size), ref] IUnknown **apUnknown;
57 typedef struct _wireSAFEARR_DISPATCH {
59 [size_is(Size), ref] IDispatch **apDispatch;
62 typedef struct _wireSAFEARR_VARIANT {
64 [size_is(Size), ref] wireVARIANT *aVariant;
67 typedef struct _wireSAFEARR_BRECORD {
69 [size_is(Size), ref] wireBRECORD *aRecord;
72 typedef struct _wireSAFEARR_HAVEIID {
74 [size_is(Size), ref] IUnknown **apUnknown;
78 typedef [v1_enum] enum tagSF_TYPE {
85 SF_UNKNOWN = VT_UNKNOWN,
86 SF_DISPATCH = VT_DISPATCH,
87 SF_VARIANT = VT_VARIANT,
88 SF_RECORD = VT_RECORD,
89 SF_HAVEIID = VT_UNKNOWN|VT_RESERVED,
92 typedef union _wireSAFEARRAY_UNION switch(ULONG sfType) u {
93 case SF_BSTR: SAFEARR_BSTR BstrStr;
94 case SF_UNKNOWN: SAFEARR_UNKNOWN UnknownStr;
95 case SF_DISPATCH: SAFEARR_DISPATCH DispatchStr;
96 case SF_VARIANT: SAFEARR_VARIANT VariantStr;
97 case SF_RECORD: SAFEARR_BRECORD RecordStr;
98 case SF_HAVEIID: SAFEARR_HAVEIID HaveIidStr;
99 case SF_I1: BYTE_SIZEDARR ByteStr;
100 case SF_I2: WORD_SIZEDARR WordStr;
101 case SF_I4: DWORD_SIZEDARR LongStr;
102 case SF_I8: HYPER_SIZEDARR HyperStr;
105 typedef [unique] struct _wireSAFEARRAY {
110 SAFEARRAYUNION uArrayStructs;
111 [size_is(cDims)] SAFEARRAYBOUND rgsabound[];
114 typedef [unique] wireSAFEARRAY *wirePSAFEARRAY;
116 typedef struct tagSAFEARRAY {
122 SAFEARRAYBOUND rgsabound[];
125 typedef [wire_marshal(wirePSAFEARRAY)] SAFEARRAY *LPSAFEARRAY;
127 const USHORT FADF_AUTO = 0x0001;
128 const USHORT FADF_STATIC = 0x0002;
129 const USHORT FADF_EMBEDDED = 0x0004;
130 const USHORT FADF_FIXEDSIZE = 0x0010;
131 const USHORT FADF_RECORD = 0x0020;
132 const USHORT FADF_HAVEIID = 0x0040;
133 const USHORT FADF_HAVEVARTYPE = 0x0080;
134 const USHORT FADF_BSTR = 0x0100;
135 const USHORT FADF_UNKNOWN = 0x0200;
136 const USHORT FADF_DISPATCH = 0x0400;
137 const USHORT FADF_VARIANT = 0x0800;
138 const USHORT FADF_RESERVED = 0xF008;
139 /* Undocumented flags */
140 const USHORT FADF_DATADELETED = 0x1000; /* Data in a vector has been deleted */
141 const USHORT FADF_CREATEVECTOR = 0x2000; /* This array is a vector */
145 cpp_quote("#if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)")
146 cpp_quote("#define __VARIANT_NAME_1 n1")
147 cpp_quote("#define __VARIANT_NAME_2 n2")
148 cpp_quote("#define __VARIANT_NAME_3 n3")
149 cpp_quote("#define __VARIANT_NAME_4 brecVal")
151 cpp_quote("#define __tagVARIANT")
152 cpp_quote("#define __VARIANT_NAME_1")
153 cpp_quote("#define __VARIANT_NAME_2")
154 cpp_quote("#define __VARIANT_NAME_3")
155 cpp_quote("#define __tagBRECORD")
156 cpp_quote("#define __VARIANT_NAME_4")
159 typedef [wire_marshal(wireVARIANT)] struct tagVARIANT VARIANT;
163 struct __tagVARIANT {
179 VARIANT_BOOL boolVal;
180 #if 0 /* illegal in C++ */
202 VARIANT_BOOL *pboolVal;
204 _VARIANT_BOOL *pbool;
214 IDispatch **ppdispVal;
218 struct __tagBRECORD {
220 IRecordInfo *pRecInfo;
229 typedef VARIANT *LPVARIANT;
230 typedef VARIANT VARIANTARG;
231 typedef VARIANTARG *LPVARIANTARG;
233 struct _wireBRECORD {
236 IRecordInfo *pRecInfo;
237 [size_is(clSize)] byte *pRecord;
240 struct _wireVARIANT {
247 [switch_is(vt)] union {
248 [case(VT_EMPTY, VT_NULL)] ;
249 [case(VT_I1)] signed char cVal;
250 [case(VT_UI2)] USHORT uiVal;
251 [case(VT_UI4)] ULONG ulVal;
252 [case(VT_INT)] INT intVal;
253 [case(VT_UINT)] UINT uintVal;
254 [case(VT_UI1)] BYTE bVal;
255 [case(VT_I2)] SHORT iVal;
256 [case(VT_I4)] LONG lVal;
257 [case(VT_R4)] FLOAT fltVal;
258 [case(VT_R8)] DOUBLE dblVal;
259 [case(VT_BOOL)] VARIANT_BOOL boolVal;
260 [case(VT_ERROR)] SCODE scode;
261 [case(VT_DATE)] DATE date;
262 [case(VT_BSTR)] wireBSTR bstrVal;
263 [case(VT_CY)] CY cyVal;
264 [case(VT_DECIMAL)] DECIMAL decVal;
265 [case(VT_UNKNOWN)] IUnknown *punkVal;
266 [case(VT_DISPATCH)] IDispatch *pdispVal;
267 [case(VT_ARRAY)] wireSAFEARRAY parray;
268 [case(VT_I1|VT_BYREF)] signed char *pcVal;
269 [case(VT_UI2|VT_BYREF)] USHORT *puiVal;
270 [case(VT_UI4|VT_BYREF)] ULONG *pulVal;
271 [case(VT_INT|VT_BYREF)] INT *pintVal;
272 [case(VT_UINT|VT_BYREF)] UINT *puintVal;
273 [case(VT_UI1|VT_BYREF)] BYTE *pbVal;
274 [case(VT_I2|VT_BYREF)] SHORT *piVal;
275 [case(VT_I4|VT_BYREF)] LONG *plVal;
276 [case(VT_R4|VT_BYREF)] FLOAT *pfltVal;
277 [case(VT_R8|VT_BYREF)] DOUBLE *pdblVal;
278 [case(VT_BOOL|VT_BYREF)] VARIANT_BOOL *pboolVal;
279 [case(VT_ERROR|VT_BYREF)] SCODE *pscode;
280 [case(VT_DATE|VT_BYREF)] DATE *pdate;
281 [case(VT_BSTR|VT_BYREF)] wireBSTR *pbstrVal;
282 [case(VT_VARIANT|VT_BYREF)] wireVARIANT *pvarVal;
283 [case(VT_CY|VT_BYREF)] CY *pcyVal;
284 [case(VT_DECIMAL|VT_BYREF)] DECIMAL *pdecVal;
285 [case(VT_UNKNOWN|VT_BYREF)] IUnknown **ppunkVal;
286 [case(VT_DISPATCH|VT_BYREF)] IDispatch **ppdispVal;
287 [case(VT_ARRAY|VT_BYREF)] wireSAFEARRAY *pparray;
288 [case(VT_RECORD, VT_RECORD|VT_BYREF)] wireBRECORD brecVal;
295 typedef DWORD HREFTYPE;
296 typedef DISPID MEMBERID;
298 typedef [v1_enum] enum tagTYPEKIND {
310 typedef struct tagTYPEDESC {
311 [switch_is(vt)] union {
312 [case(VT_PTR, VT_SAFEARRAY)] struct tagTYPEDESC *lptdesc;
313 [case(VT_CARRAY)] struct tagARRAYDESC *lpadesc;
314 [case(VT_USERDEFINED)] HREFTYPE hreftype;
320 typedef struct tagARRAYDESC {
323 [size_is(cDims)] SAFEARRAYBOUND rgbounds[];
326 typedef struct tagPARAMDESCEX {
328 VARIANTARG varDefaultValue;
329 } PARAMDESCEX, *LPPARAMDESCEX;
331 typedef struct tagPARAMDESC {
332 LPPARAMDESCEX pparamdescex;
334 } PARAMDESC, *LPPARAMDESC;
336 const USHORT PARAMFLAG_NONE = 0x00;
337 const USHORT PARAMFLAG_FIN = 0x01;
338 const USHORT PARAMFLAG_FOUT = 0x02;
339 const USHORT PARAMFLAG_FLCID = 0x04;
340 const USHORT PARAMFLAG_FRETVAL = 0x08;
341 const USHORT PARAMFLAG_FOPT = 0x10;
342 const USHORT PARAMFLAG_FHASDEFAULT = 0x20;
343 const USHORT PARAMFLAG_FHASCUSTDATA = 0x40;
345 typedef struct tagIDLDESC {
348 } IDLDESC, *LPIDLDESC;
350 const USHORT IDLFLAG_NONE = PARAMFLAG_NONE;
351 const USHORT IDLFLAG_FIN = PARAMFLAG_FIN;
352 const USHORT IDLFLAG_FOUT = PARAMFLAG_FOUT;
353 const USHORT IDLFLAG_FLCID = PARAMFLAG_FLCID;
354 const USHORT IDLFLAG_FRETVAL = PARAMFLAG_FRETVAL;
356 cpp_quote("#if 0") /* for IDL only */
357 typedef struct tagELEMDESC {
361 cpp_quote("#else") /* C/C++ defs */
362 cpp_quote("typedef struct tagELEMDESC {")
363 cpp_quote(" TYPEDESC tdesc;")
364 cpp_quote(" union {")
365 cpp_quote(" IDLDESC idldesc;")
366 cpp_quote(" PARAMDESC paramdesc;")
367 cpp_quote(" } DUMMYUNIONNAME;")
368 cpp_quote("} ELEMDESC, *LPELEMDESC;")
371 typedef struct tagTYPEATTR {
375 MEMBERID memidConstructor;
376 MEMBERID memidDestructor;
377 LPOLESTR lpstrSchema;
378 ULONG cbSizeInstance;
390 } TYPEATTR, *LPTYPEATTR;
392 typedef struct tagDISPPARAMS {
393 [size_is(cArgs)] VARIANTARG *rgvarg;
394 [size_is(cNamedArgs)] DISPID *rgdispidNamedArgs;
399 cpp_quote("#if 0") /* for IDL only */
400 typedef struct tagEXCEPINFO {
404 BSTR bstrDescription;
408 ULONG pfnDeferredFillIn;
412 cpp_quote("typedef struct tagEXCEPINFO {")
413 cpp_quote(" WORD wCode;")
414 cpp_quote(" WORD wReserved;")
415 cpp_quote(" BSTR bstrSource;")
416 cpp_quote(" BSTR bstrDescription;")
417 cpp_quote(" BSTR bstrHelpFile;")
418 cpp_quote(" DWORD dwHelpContext;")
419 cpp_quote(" PVOID pvReserved;")
420 cpp_quote(" HRESULT (__stdcall *pfnDeferredFillIn)(struct tagEXCEPINFO *);")
421 cpp_quote(" SCODE scode;")
422 cpp_quote("} EXCEPINFO, *LPEXCEPINFO;")
425 typedef [v1_enum] enum tagCALLCONV {
429 CC_PASCAL = CC_MSCPASCAL,
439 typedef [v1_enum] enum tagFUNCKIND {
447 typedef [v1_enum] enum tagINVOKEKIND {
449 INVOKE_PROPERTYGET = 2,
450 INVOKE_PROPERTYPUT = 4,
451 INVOKE_PROPERTYPUTREF = 8
454 typedef struct tagFUNCDESC {
456 [size_is(cScodes)] SCODE *lprgscode;
457 [size_is(cParams)] ELEMDESC *lprgelemdescParam;
465 ELEMDESC elemdescFunc;
467 } FUNCDESC, *LPFUNCDESC;
469 typedef [v1_enum] enum tagVARKIND {
476 const USHORT IMPLTYPEFLAG_FDEFAULT = 0x1;
477 const USHORT IMPLTYPEFLAG_FSOURCE = 0x2;
478 const USHORT IMPLTYPEFLAG_FRESTRICTED = 0x4;
479 const USHORT IMPLTYPEFLAG_FDEFAULTVTABLE = 0x8;
481 typedef struct tagVARDESC {
483 LPOLESTR lpstrSchema;
484 [switch_is(varkind)] union {
485 [case(VAR_PERINSTANCE, VAR_DISPATCH, VAR_STATIC)] ULONG oInst;
486 [case(VAR_CONST)] VARIANT *lpvarValue;
488 ELEMDESC elemdescVar;
491 } VARDESC, *LPVARDESC;
493 typedef enum tagTYPEFLAGS {
494 TYPEFLAG_FAPPOBJECT = 0x0001,
495 TYPEFLAG_FCANCREATE = 0x0002,
496 TYPEFLAG_FLICENSED = 0x0004,
497 TYPEFLAG_FPREDECLID = 0x0008,
498 TYPEFLAG_FHIDDEN = 0x0010,
499 TYPEFLAG_FCONTROL = 0x0020,
500 TYPEFLAG_FDUAL = 0x0040,
501 TYPEFLAG_FNONEXTENSIBLE = 0x0080,
502 TYPEFLAG_FOLEAUTOMATION = 0x0100,
503 TYPEFLAG_FRESTRICTED = 0x0200,
504 TYPEFLAG_FAGGREGATABLE = 0x0400,
505 TYPEFLAG_FREPLACEABLE = 0x0800,
506 TYPEFLAG_FDISPATCHABLE = 0x1000,
507 TYPEFLAG_FREVERSEBIND = 0x2000,
508 TYPEFLAG_FPROXY = 0x4000
511 typedef enum tagFUNCFLAGS {
512 FUNCFLAG_FRESTRICTED = 0x0001,
513 FUNCFLAG_FSOURCE = 0x0002,
514 FUNCFLAG_FBINDABLE = 0x0004,
515 FUNCFLAG_FREQUESTEDIT = 0x0008,
516 FUNCFLAG_FDISPLAYBIND = 0x0010,
517 FUNCFLAG_FDEFAULTBIND = 0x0020,
518 FUNCFLAG_FHIDDEN = 0x0040,
519 FUNCFLAG_FUSESGETLASTERROR = 0x0080,
520 FUNCFLAG_FDEFAULTCOLLELEM = 0x0100,
521 FUNCFLAG_FUIDEFAULT = 0x0200,
522 FUNCFLAG_FNONBROWSABLE = 0x0400,
523 FUNCFLAG_FREPLACEABLE = 0x0800,
524 FUNCFLAG_FIMMEDIATEBIND = 0x1000
527 typedef enum tagVARFLAGS {
528 VARFLAG_FREADONLY = 0x0001,
529 VARFLAG_FSOURCE = 0x0002,
530 VARFLAG_FBINDABLE = 0x0004,
531 VARFLAG_FREQUESTEDIT = 0x0008,
532 VARFLAG_FDISPLAYBIND = 0x0010,
533 VARFLAG_FDEFAULTBIND = 0x0020,
534 VARFLAG_FHIDDEN = 0x0040,
535 VARFLAG_FRESTRICTED = 0x0080,
536 VARFLAG_FDEFAULTCOLLELEM = 0x0100,
537 VARFLAG_FUIDEFAULT = 0x0200,
538 VARFLAG_FNONBROWSABLE = 0x0400,
539 VARFLAG_FREPLACEABLE = 0x0800,
540 VARFLAG_FIMMEDIATEBIND = 0x1000
543 typedef [wire_marshal(DWORD)] struct tagCLEANLOCALSTORAGE {
544 IUnknown *pInterface;
549 typedef struct tagCUSTDATAITEM {
552 } CUSTDATAITEM, *LPCUSTDATAITEM;
554 typedef struct tagCUSTDATA {
556 [size_is(cCustData)] LPCUSTDATAITEM prgCustData;
557 } CUSTDATA, *LPCUSTDATA;
559 } /* interface IOleAutomationTypes */
561 /******************** INTERFACES ********************/
565 uuid(00020400-0000-0000-C000-000000000046),
566 pointer_default(unique)
568 interface IDispatch : IUnknown
570 typedef [unique] IDispatch *LPDISPATCH;
572 const DISPID DISPID_UNKNOWN = -1;
573 const DISPID DISPID_VALUE = 0;
574 const DISPID DISPID_PROPERTYPUT = -3;
575 const DISPID DISPID_NEWENUM = -4;
576 const DISPID DISPID_EVALUATE = -5;
577 const DISPID DISPID_CONSTRUCTOR = -6;
578 const DISPID DISPID_DESTRUCTOR = -7;
579 const DISPID DISPID_COLLECT = -8;
581 HRESULT GetTypeInfoCount(
582 [out] UINT *pctinfo);
587 [out] ITypeInfo **ppTInfo);
589 HRESULT GetIDsOfNames(
591 [in, size_is(cNames)] LPOLESTR *rgszNames,
594 [out, size_is(cNames)] DISPID *rgDispId);
598 [in] DISPID dispIdMember,
602 [in, out] DISPPARAMS *pDispParams,
603 [out] VARIANT *pVarResult,
604 [out] EXCEPINFO *pExcepInfo,
605 [out] UINT *puArgErr);
608 HRESULT RemoteInvoke(
609 [in] DISPID dispIdMember,
613 [in] DISPPARAMS *pDispParams,
614 [out] VARIANT *pVarResult,
615 [out] EXCEPINFO *pExcepInfo,
618 [in, size_is(cVarRef)] UINT *rgVarRefIdx,
619 [in, out, size_is(cVarRef)] VARIANTARG *rgVarRef);
624 uuid(00020404-0000-0000-C000-000000000046),
625 pointer_default(unique)
627 interface IEnumVARIANT : IUnknown
629 typedef [unique] IEnumVARIANT *LPENUMVARIANT;
634 [out] VARIANT *rgVar,
635 [out] ULONG *pCeltFetched);
640 [out, size_is(celt), length_is(*pCeltFetched)]
642 [out] ULONG *pCeltFetched);
650 [out] IEnumVARIANT **ppEnum);
655 uuid(00020403-0000-0000-C000-000000000046),
656 pointer_default(unique)
658 interface ITypeComp : IUnknown
660 typedef [unique] ITypeComp *LPTYPECOMP;
662 typedef [v1_enum] enum tagDESCKIND {
667 DESCKIND_IMPLICITAPPOBJ,
671 typedef union tagBINDPTR {
672 FUNCDESC *lpfuncdesc;
675 } BINDPTR, *LPBINDPTR;
679 [in] LPOLESTR szName,
682 [out] ITypeInfo **ppTInfo,
683 [out] DESCKIND *pDescKind,
684 [out] BINDPTR *pBindPtr);
688 [in] LPOLESTR szName,
691 [out] ITypeInfo **ppTInfo,
692 [out] DESCKIND *pDescKind,
693 [out] LPFUNCDESC *ppFuncDesc,
694 [out] LPVARDESC *ppVarDesc,
695 [out] ITypeComp **ppTypeComp,
696 [out] CLEANLOCALSTORAGE *pDummy);
700 [in] LPOLESTR szName,
702 [out] ITypeInfo **ppTInfo,
703 [out] ITypeComp **ppTComp);
706 HRESULT RemoteBindType(
707 [in] LPOLESTR szName,
709 [out] ITypeInfo **ppTInfo);
714 uuid(00020401-0000-0000-C000-000000000046),
715 pointer_default(unique)
717 interface ITypeInfo : IUnknown
719 typedef [unique] ITypeInfo *LPTYPEINFO;
723 [out] TYPEATTR **ppTypeAttr);
725 [call_as(GetTypeAttr)]
726 HRESULT RemoteGetTypeAttr(
727 [out] LPTYPEATTR *ppTypeAttr,
728 [out] CLEANLOCALSTORAGE *pDummy);
731 [out] ITypeComp **ppTComp);
736 [out] FUNCDESC **ppFuncDesc);
738 [call_as(GetFuncDesc)]
739 HRESULT RemoteGetFuncDesc(
741 [out] LPFUNCDESC *ppFuncDesc,
742 [out] CLEANLOCALSTORAGE *pDummy);
747 [out] VARDESC **ppVarDesc);
749 [call_as(GetVarDesc)]
750 HRESULT RemoteGetVarDesc(
752 [out] LPVARDESC *ppVarDesc,
753 [out] CLEANLOCALSTORAGE *pDummy);
758 [out, size_is(cMaxNames), length_is(*pcNames)] BSTR *rgBstrNames,
760 [out] UINT *pcNames);
763 HRESULT RemoteGetNames(
765 [out, size_is(cMaxNames), length_is(*pcNames)] BSTR *rgBstrNames,
767 [out] UINT *pcNames);
769 HRESULT GetRefTypeOfImplType(
771 [out] HREFTYPE *pRefType);
773 HRESULT GetImplTypeFlags(
775 [out] INT *pImplTypeFlags);
778 HRESULT GetIDsOfNames(
779 [in, size_is(cNames)] LPOLESTR *rgszNames,
781 [out, size_is(cNames)] MEMBERID *pMemId);
783 [call_as(GetIDsOfNames)]
784 HRESULT LocalGetIDsOfNames();
788 [in] PVOID pvInstance,
791 [in, out] DISPPARAMS *pDispParams,
792 [out] VARIANT *pVarResult,
793 [out] EXCEPINFO *pExcepInfo,
794 [out] UINT *puArgErr);
797 HRESULT LocalInvoke();
800 HRESULT GetDocumentation(
802 [out] BSTR *pBstrName,
803 [out] BSTR *pBstrDocString,
804 [out] DWORD *pdwHelpContext,
805 [out] BSTR *pBstrHelpFile);
807 [call_as(GetDocumentation)]
808 HRESULT RemoteGetDocumentation(
810 [in] DWORD refPtrFlags,
811 [out] BSTR *pBstrName,
812 [out] BSTR *pBstrDocString,
813 [out] DWORD *pdwHelpContext,
814 [out] BSTR *pBstrHelpFile);
819 [in] INVOKEKIND invKind,
820 [out] BSTR *pBstrDllName,
821 [out] BSTR *pBstrName,
822 [out] WORD *pwOrdinal);
824 [call_as(GetDllEntry)]
825 HRESULT RemoteGetDllEntry(
827 [in] INVOKEKIND invKind,
828 [in] DWORD refPtrFlags,
829 [out] BSTR *pBstrDllName,
830 [out] BSTR *pBstrName,
831 [out] WORD *pwOrdinal);
833 HRESULT GetRefTypeInfo(
834 [in] HREFTYPE hRefType,
835 [out] ITypeInfo **ppTInfo);
838 HRESULT AddressOfMember(
840 [in] INVOKEKIND invKind,
843 [call_as(AddressOfMember)]
844 HRESULT LocalAddressOfMember();
847 HRESULT CreateInstance(
848 [in] IUnknown *pUnkOuter,
850 [out, iid_is(riid)] PVOID *ppvObj);
852 [call_as(CreateInstance)]
853 HRESULT RemoteCreateInstance(
855 [out, iid_is(riid)] IUnknown **ppvObj);
859 [out] BSTR *pBstrMops);
862 HRESULT GetContainingTypeLib(
863 [out] ITypeLib **ppTLib,
866 [call_as(GetContainingTypeLib)]
867 HRESULT RemoteGetContainingTypeLib(
868 [out] ITypeLib **ppTLib,
872 void ReleaseTypeAttr(
873 [in] TYPEATTR *pTypeAttr);
875 [call_as(ReleaseTypeAttr)]
876 HRESULT LocalReleaseTypeAttr();
879 void ReleaseFuncDesc(
880 [in] FUNCDESC *pFuncDesc);
882 [call_as(ReleaseFuncDesc)]
883 HRESULT LocalReleaseFuncDesc();
887 [in] VARDESC *pVarDesc);
889 [call_as(ReleaseVarDesc)]
890 HRESULT LocalReleaseVarDesc();
895 uuid(00020412-0000-0000-C000-000000000046),
896 pointer_default(unique)
898 interface ITypeInfo2 : ITypeInfo
900 typedef [unique] ITypeInfo2 *LPTYPEINFO2;
903 [out] TYPEKIND *pTypeKind);
905 HRESULT GetTypeFlags(
906 [out] ULONG *pTypeFlags);
908 HRESULT GetFuncIndexOfMemId(
910 [in] INVOKEKIND invKind,
911 [out] UINT *pFuncIndex);
913 HRESULT GetVarIndexOfMemId(
915 [out] UINT *pVarIndex);
919 [out] VARIANT *pVarVal);
921 HRESULT GetFuncCustData(
924 [out] VARIANT *pVarVal);
926 HRESULT GetParamCustData(
928 [in] UINT indexParam,
930 [out] VARIANT *pVarVal);
932 HRESULT GetVarCustData(
935 [out] VARIANT *pVarVal);
937 HRESULT GetImplTypeCustData(
940 [out] VARIANT *pVarVal);
943 HRESULT GetDocumentation2(
946 [out] BSTR *pbstrHelpString,
947 [out] DWORD *pdwHelpStringContext,
948 [out] BSTR *pbstrHelpStringDll);
950 [call_as(GetDocumentation2)]
951 HRESULT RemoteGetDocumentation2(
954 [in] DWORD refPtrFlags,
955 [out] BSTR *pbstrHelpString,
956 [out] DWORD *pdwHelpStringContext,
957 [out] BSTR *pbstrHelpStringDll);
959 HRESULT GetAllCustData(
960 [out] CUSTDATA *pCustData);
962 HRESULT GetAllFuncCustData(
964 [out] CUSTDATA *pCustData);
966 HRESULT GetAllParamCustData(
968 [in] UINT indexParam,
969 [out] CUSTDATA *pCustData);
971 HRESULT GetAllVarCustData(
973 [out] CUSTDATA *pCustData);
975 HRESULT GetAllImplTypeCustData(
977 [out] CUSTDATA *pCustData);
982 uuid(00020402-0000-0000-C000-000000000046),
983 pointer_default(unique)
985 interface ITypeLib : IUnknown
987 typedef [unique] ITypeLib *LPTYPELIB;
989 typedef [v1_enum] enum tagSYSKIND {
995 typedef [v1_enum] enum tagLIBFLAGS {
996 LIBFLAG_FRESTRICTED = 0x01,
997 LIBFLAG_FCONTROL = 0x02,
998 LIBFLAG_FHIDDEN = 0x04,
999 LIBFLAG_FHASDISKIMAGE = 0x08
1002 typedef struct tagTLIBATTR {
1009 } TLIBATTR, *LPTLIBATTR;
1012 UINT GetTypeInfoCount();
1014 [call_as(GetTypeInfoCount)]
1015 HRESULT RemoteGetTypeInfoCount(
1016 [out] UINT *pcTInfo);
1018 HRESULT GetTypeInfo(
1020 [out] ITypeInfo **ppTInfo);
1022 HRESULT GetTypeInfoType(
1024 [out] TYPEKIND *pTKind);
1026 HRESULT GetTypeInfoOfGuid(
1028 [out] ITypeInfo **ppTinfo);
1032 [out] TLIBATTR **ppTLibAttr);
1034 [call_as(GetLibAttr)]
1035 HRESULT RemoteGetLibAttr(
1036 [out] LPTLIBATTR *ppTLibAttr,
1037 [out] CLEANLOCALSTORAGE *pDummy);
1039 HRESULT GetTypeComp(
1040 [out] ITypeComp **ppTComp);
1043 HRESULT GetDocumentation(
1045 [out] BSTR *pBstrName,
1046 [out] BSTR *pBstrDocString,
1047 [out] DWORD *pdwHelpContext,
1048 [out] BSTR *pBstrHelpFile);
1050 [call_as(GetDocumentation)]
1051 HRESULT RemoteGetDocumentation(
1053 [in] DWORD refPtrFlags,
1054 [out] BSTR *pBstrName,
1055 [out] BSTR *pBstrDocString,
1056 [out] DWORD *pdwHelpContext,
1057 [out] BSTR *pBstrHelpFile);
1061 [in, out] LPOLESTR szNameBuf,
1062 [in] ULONG lHashVal,
1063 [out] BOOL *pfName);
1066 HRESULT RemoteIsName(
1067 [in] LPOLESTR szNameBuf,
1068 [in] ULONG lHashVal,
1070 [out] BSTR *pBstrLibName);
1074 [in, out] LPOLESTR szNameBuf,
1075 [in] ULONG lHashVal,
1076 [out, size_is(*pcFound), length_is(*pcFound)] ITypeInfo **ppTInfo,
1077 [out, size_is(*pcFound), length_is(*pcFound)] MEMBERID *rgMemId,
1078 [in, out] USHORT *pcFound);
1081 HRESULT RemoteFindName(
1082 [in] LPOLESTR szNameBuf,
1083 [in] ULONG lHashVal,
1084 [out, size_is(*pcFound), length_is(*pcFound)] ITypeInfo **ppTInfo,
1085 [out, size_is(*pcFound), length_is(*pcFound)] MEMBERID *rgMemId,
1086 [in, out] USHORT *pcFound,
1087 [out] BSTR *pBstrLibName);
1090 void ReleaseTLibAttr(
1091 [in] TLIBATTR *pTLibAttr);
1093 [call_as(ReleaseTLibAttr)]
1094 HRESULT LocalReleaseTLibAttr();
1099 uuid(00020411-0000-0000-C000-000000000046),
1100 pointer_default(unique)
1102 interface ITypeLib2 : ITypeLib
1104 typedef [unique] ITypeLib2 *LPTYPELIB2;
1106 HRESULT GetCustData(
1108 [out] VARIANT *pVarVal);
1111 HRESULT GetLibStatistics(
1112 [out] ULONG *pcUniqueNames,
1113 [out] ULONG *pcchUniqueNames);
1115 [call_as(GetLibStatistics)]
1116 HRESULT RemoteGetLibStatistics(
1117 [out] ULONG *pcUniqueNames,
1118 [out] ULONG *pcchUniqueNames);
1121 HRESULT GetDocumentation2(
1124 [out] BSTR *pbstrHelpString,
1125 [out] DWORD *pdwHelpStringContext,
1126 [out] BSTR *pbstrHelpStringDll);
1128 [call_as(GetDocumentation2)]
1129 HRESULT RemoteGetDocumentation2(
1132 [in] DWORD refPtrFlags,
1133 [out] BSTR *pbstrHelpString,
1134 [out] DWORD *pdwHelpStringContext,
1135 [out] BSTR *pbstrHelpStringDll);
1137 HRESULT GetAllCustData(
1138 [out] CUSTDATA *pCustData);
1144 uuid(00020410-0000-0000-C000-000000000046),
1145 pointer_default(unique)
1147 interface ITypeChangeEvents : IUnknown
1149 typedef [unique] ITypeChangeEvents *LPTYPECHANGEEVENTS;
1151 typedef enum tagCHANGEKIND {
1152 CHANGEKIND_ADDMEMBER,
1153 CHANGEKIND_DELETEMEMBER,
1154 CHANGEKIND_SETNAMES,
1155 CHANGEKIND_SETDOCUMENTATION,
1157 CHANGEKIND_INVALIDATE,
1158 CHANGEKIND_CHANGEFAILED,
1162 HRESULT RequestTypeChange(
1163 [in] CHANGEKIND changeKind,
1164 [in] ITypeInfo *pTInfoBefore,
1165 [in] LPOLESTR pStrName,
1166 [out] INT *pfCancel);
1168 HRESULT AfterTypeChange(
1169 [in] CHANGEKIND changeKind,
1170 [in] ITypeInfo *pTInfoAfter,
1171 [in] LPOLESTR pStrName);
1176 uuid(1CF2B120-547D-101B-8E65-08002B2BD119),
1177 pointer_default(unique)
1179 interface IErrorInfo : IUnknown
1181 typedef [unique] IErrorInfo *LPERRORINFO;
1187 [out] BSTR *pBstrSource);
1189 HRESULT GetDescription(
1190 [out] BSTR *pBstrDescription);
1192 HRESULT GetHelpFile(
1193 [out] BSTR *pBstrHelpFile);
1195 HRESULT GetHelpContext(
1196 [out] DWORD *pdwHelpContext);
1201 uuid(22F03340-547D-101B-8E65-08002B2BD119),
1202 pointer_default(unique)
1204 interface ICreateErrorInfo : IUnknown
1206 typedef [unique] ICreateErrorInfo *LPCREATEERRORINFO;
1209 [in] REFGUID rguid);
1212 [in] LPOLESTR szSource);
1214 HRESULT SetDescription(
1215 [in] LPOLESTR szDescription);
1217 HRESULT SetHelpFile(
1218 [in] LPOLESTR szHelpFile);
1220 HRESULT SetHelpContext(
1221 [in] DWORD dwHelpContext);
1226 uuid(DF0B3D60-548F-101B-8E65-08002B2BD119),
1227 pointer_default(unique)
1229 interface ISupportErrorInfo : IUnknown
1231 typedef [unique] ISupportErrorInfo *LPSUPPORTERRORINFO;
1233 HRESULT InterfaceSupportsErrorInfo(
1239 uuid(0000002E-0000-0000-C000-000000000046)
1241 interface ITypeFactory : IUnknown
1243 HRESULT CreateFromTypeInfo(
1244 [in] ITypeInfo *pTypeInfo,
1246 [out, iid_is(riid)] IUnknown **ppv);
1252 uuid(0000002D-0000-0000-C000-000000000046)
1254 interface ITypeMarshal : IUnknown
1258 [in] DWORD dwDestContext,
1259 [in] PVOID pvDestContext,
1260 [out] ULONG *pSize);
1264 [in] DWORD dwDestContext,
1265 [in] PVOID pvDestContext,
1266 [in] ULONG cbBufferLength,
1267 [out] BYTE *pBuffer,
1268 [out] ULONG *pcbWritten);
1273 [in] ULONG cbBufferLength,
1275 [out] ULONG *pcbRead);
1284 uuid(0000002F-0000-0000-C000-000000000046)
1286 interface IRecordInfo : IUnknown
1288 typedef [unique] IRecordInfo *LPRECORDINFO;
1293 HRESULT RecordClear(
1294 [in] PVOID pvExisting);
1297 [in] PVOID pvExisting,
1304 [out] BSTR *pbstrName);
1307 [out] ULONG *pcbSize);
1309 HRESULT GetTypeInfo(
1310 [out] ITypeInfo **ppTypeInfo);
1314 [in] LPCOLESTR szFieldName,
1315 [out] VARIANT *pvarField);
1317 HRESULT GetFieldNoCopy(
1319 [in] LPCOLESTR szFieldName,
1320 [out] VARIANT *pvarField,
1321 [out] PVOID *ppvDataCArray);
1325 [in, out] PVOID pvData,
1326 [in] LPCOLESTR szFieldName,
1327 [in] VARIANT *pvarField);
1329 HRESULT PutFieldNoCopy(
1331 [in, out] PVOID pvData,
1332 [in] LPCOLESTR szFieldName,
1333 [in] VARIANT *pvarField);
1335 HRESULT GetFieldNames(
1336 [in, out] ULONG *pcNames,
1337 [out, size_is(*pcNames), length_is(*pcNames)] BSTR *rgBstrNames);
1339 BOOL IsMatchingType(
1340 [in] IRecordInfo *pRecordInfo);
1342 PVOID RecordCreate();
1344 HRESULT RecordCreateCopy(
1345 [in] PVOID pvSource,
1346 [out] PVOID *ppvDest);
1348 HRESULT RecordDestroy(
1349 [in] PVOID pvRecord);
1355 uuid(00020405-0000-0000-C000-000000000046),
1356 pointer_default(unique)
1358 interface ICreateTypeInfo : IUnknown
1360 typedef [unique] ICreateTypeInfo *LPCREATETYPEINFO;
1365 HRESULT SetTypeFlags(
1366 [in] UINT uTypeFlags);
1368 HRESULT SetDocString(
1369 [in] LPOLESTR pStrDoc);
1371 HRESULT SetHelpContext(
1372 [in] DWORD dwHelpContext);
1375 [in] WORD wMajorVerNum,
1376 [in] WORD wMinorVerNum);
1378 HRESULT AddRefTypeInfo(
1379 [in] ITypeInfo *pTInfo,
1380 [in] HREFTYPE *phRefType);
1382 HRESULT AddFuncDesc(
1384 [in] FUNCDESC *pFuncDesc);
1386 HRESULT AddImplType(
1388 [in] HREFTYPE hRefType);
1390 HRESULT SetImplTypeFlags(
1392 [in] INT implTypeFlags);
1394 HRESULT SetAlignment(
1395 [in] WORD cbAlignment);
1398 [in] LPOLESTR pStrSchema);
1402 [in] VARDESC *pVarDesc);
1404 HRESULT SetFuncAndParamNames(
1406 [in, size_is(cNames)] LPOLESTR *rgszNames,
1411 [in] LPOLESTR szName);
1413 HRESULT SetTypeDescAlias(
1414 [in] TYPEDESC *pTDescAlias);
1416 HRESULT DefineFuncAsDllEntry(
1418 [in] LPOLESTR szDllName,
1419 [in] LPOLESTR szProcName);
1421 HRESULT SetFuncDocString(
1423 [in] LPOLESTR szDocString);
1425 HRESULT SetVarDocString(
1427 [in] LPOLESTR szDocString);
1429 HRESULT SetFuncHelpContext(
1431 [in] DWORD dwHelpContext);
1433 HRESULT SetVarHelpContext(
1435 [in] DWORD dwHelpContext);
1439 [in] BSTR bstrMops);
1441 HRESULT SetTypeIdldesc(
1442 [in] IDLDESC * pIdlDesc);
1450 uuid(0002040E-0000-0000-C000-000000000046),
1451 pointer_default(unique)
1453 interface ICreateTypeInfo2 : ICreateTypeInfo
1455 typedef [unique] ICreateTypeInfo2 *LPCREATETYPEINFO2;
1457 HRESULT DeleteFuncDesc(
1460 HRESULT DeleteFuncDescByMemId(
1461 [in] MEMBERID memid,
1462 [in] INVOKEKIND invKind);
1464 HRESULT DeleteVarDesc(
1467 HRESULT DeleteVarDescByMemId(
1468 [in] MEMBERID memid);
1470 HRESULT DeleteImplType(
1473 HRESULT SetCustData(
1475 [in] VARIANT *pVarVal);
1477 HRESULT SetFuncCustData(
1480 [in] VARIANT *pVarVal);
1482 HRESULT SetParamCustData(
1483 [in] UINT indexFunc,
1484 [in] UINT indexParam,
1486 [in] VARIANT *pVarVal);
1488 HRESULT SetVarCustData(
1491 [in] VARIANT *pVarVal);
1493 HRESULT SetImplTypeCustData(
1496 [in] VARIANT *pVarVal);
1498 HRESULT SetHelpStringContext(
1499 [in] ULONG dwHelpStringContext);
1501 HRESULT SetFuncHelpStringContext(
1503 [in] ULONG dwHelpStringContext);
1505 HRESULT SetVarHelpStringContext(
1507 [in] ULONG dwHelpStringContext);
1509 HRESULT Invalidate();
1512 [in] LPOLESTR szName);
1518 uuid(00020406-0000-0000-C000-000000000046),
1519 pointer_default(unique)
1521 interface ICreateTypeLib : IUnknown
1523 typedef [unique] ICreateTypeLib *LPCREATETYPELIB;
1525 HRESULT CreateTypeInfo(
1526 [in] LPOLESTR szName,
1527 [in] TYPEKIND tkind,
1528 [out] ICreateTypeInfo **ppCTInfo);
1531 [in] LPOLESTR szName);
1534 [in] WORD wMajorVerNum,
1535 [in] WORD wMinorVerNum);
1540 HRESULT SetDocString(
1541 [in] LPOLESTR szDoc);
1543 HRESULT SetHelpFileName(
1544 [in] LPOLESTR szHelpFileName);
1546 HRESULT SetHelpContext(
1547 [in] DWORD dwHelpContext);
1552 HRESULT SetLibFlags(
1553 [in] UINT uLibFlags);
1555 HRESULT SaveAllChanges();
1561 uuid(0002040F-0000-0000-C000-000000000046),
1562 pointer_default(unique)
1564 interface ICreateTypeLib2 : ICreateTypeLib
1566 typedef [unique] ICreateTypeLib2 *LPCREATETYPELIB2;
1568 HRESULT DeleteTypeInfo(
1569 [in] LPOLESTR szName);
1571 HRESULT SetCustData(
1573 [in] VARIANT *pVarVal);
1575 HRESULT SetHelpStringContext(
1576 [in] ULONG dwHelpStringContext);
1578 HRESULT SetHelpStringDll(
1579 [in] LPOLESTR szFileName);
1583 /*****************************************************************************
1584 * IErrorLog interface
1588 uuid(3127ca40-446e-11ce-8135-00aa004bb851),
1589 pointer_default(unique)
1591 interface IErrorLog : IUnknown
1593 typedef IErrorLog *LPERRORLOG;
1596 [in] LPCOLESTR pszPropName,
1597 [in] EXCEPINFO *pExcepInfo);
1601 /*****************************************************************************
1602 * IPropertyBag interface
1606 uuid(55272a00-42cb-11ce-8135-00aa004bb851),
1607 pointer_default(unique)
1609 interface IPropertyBag : IUnknown
1611 typedef IPropertyBag *LPPROPERTYBAG;
1615 [in] LPCOLESTR pszPropName,
1616 [in, out] VARIANT *pVar,
1617 [in] IErrorLog *pErrorLog);
1621 [in] LPCOLESTR pszPropName,
1622 [out] VARIANT *pVar,
1623 [in] IErrorLog *pErrorLog,
1625 [in] IUnknown *pUnkObj);
1628 [in] LPCOLESTR pszPropName,
1629 [in] VARIANT *pVar);