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 {
996 typedef [v1_enum] enum tagLIBFLAGS {
997 LIBFLAG_FRESTRICTED = 0x01,
998 LIBFLAG_FCONTROL = 0x02,
999 LIBFLAG_FHIDDEN = 0x04,
1000 LIBFLAG_FHASDISKIMAGE = 0x08
1003 typedef struct tagTLIBATTR {
1010 } TLIBATTR, *LPTLIBATTR;
1013 UINT GetTypeInfoCount();
1015 [call_as(GetTypeInfoCount)]
1016 HRESULT RemoteGetTypeInfoCount(
1017 [out] UINT *pcTInfo);
1019 HRESULT GetTypeInfo(
1021 [out] ITypeInfo **ppTInfo);
1023 HRESULT GetTypeInfoType(
1025 [out] TYPEKIND *pTKind);
1027 HRESULT GetTypeInfoOfGuid(
1029 [out] ITypeInfo **ppTinfo);
1033 [out] TLIBATTR **ppTLibAttr);
1035 [call_as(GetLibAttr)]
1036 HRESULT RemoteGetLibAttr(
1037 [out] LPTLIBATTR *ppTLibAttr,
1038 [out] CLEANLOCALSTORAGE *pDummy);
1040 HRESULT GetTypeComp(
1041 [out] ITypeComp **ppTComp);
1044 HRESULT GetDocumentation(
1046 [out] BSTR *pBstrName,
1047 [out] BSTR *pBstrDocString,
1048 [out] DWORD *pdwHelpContext,
1049 [out] BSTR *pBstrHelpFile);
1051 [call_as(GetDocumentation)]
1052 HRESULT RemoteGetDocumentation(
1054 [in] DWORD refPtrFlags,
1055 [out] BSTR *pBstrName,
1056 [out] BSTR *pBstrDocString,
1057 [out] DWORD *pdwHelpContext,
1058 [out] BSTR *pBstrHelpFile);
1062 [in, out] LPOLESTR szNameBuf,
1063 [in] ULONG lHashVal,
1064 [out] BOOL *pfName);
1067 HRESULT RemoteIsName(
1068 [in] LPOLESTR szNameBuf,
1069 [in] ULONG lHashVal,
1071 [out] BSTR *pBstrLibName);
1075 [in, out] LPOLESTR szNameBuf,
1076 [in] ULONG lHashVal,
1077 [out, size_is(*pcFound), length_is(*pcFound)] ITypeInfo **ppTInfo,
1078 [out, size_is(*pcFound), length_is(*pcFound)] MEMBERID *rgMemId,
1079 [in, out] USHORT *pcFound);
1082 HRESULT RemoteFindName(
1083 [in] LPOLESTR szNameBuf,
1084 [in] ULONG lHashVal,
1085 [out, size_is(*pcFound), length_is(*pcFound)] ITypeInfo **ppTInfo,
1086 [out, size_is(*pcFound), length_is(*pcFound)] MEMBERID *rgMemId,
1087 [in, out] USHORT *pcFound,
1088 [out] BSTR *pBstrLibName);
1091 void ReleaseTLibAttr(
1092 [in] TLIBATTR *pTLibAttr);
1094 [call_as(ReleaseTLibAttr)]
1095 HRESULT LocalReleaseTLibAttr();
1100 uuid(00020411-0000-0000-C000-000000000046),
1101 pointer_default(unique)
1103 interface ITypeLib2 : ITypeLib
1105 typedef [unique] ITypeLib2 *LPTYPELIB2;
1107 HRESULT GetCustData(
1109 [out] VARIANT *pVarVal);
1112 HRESULT GetLibStatistics(
1113 [out] ULONG *pcUniqueNames,
1114 [out] ULONG *pcchUniqueNames);
1116 [call_as(GetLibStatistics)]
1117 HRESULT RemoteGetLibStatistics(
1118 [out] ULONG *pcUniqueNames,
1119 [out] ULONG *pcchUniqueNames);
1122 HRESULT GetDocumentation2(
1125 [out] BSTR *pbstrHelpString,
1126 [out] DWORD *pdwHelpStringContext,
1127 [out] BSTR *pbstrHelpStringDll);
1129 [call_as(GetDocumentation2)]
1130 HRESULT RemoteGetDocumentation2(
1133 [in] DWORD refPtrFlags,
1134 [out] BSTR *pbstrHelpString,
1135 [out] DWORD *pdwHelpStringContext,
1136 [out] BSTR *pbstrHelpStringDll);
1138 HRESULT GetAllCustData(
1139 [out] CUSTDATA *pCustData);
1145 uuid(00020410-0000-0000-C000-000000000046),
1146 pointer_default(unique)
1148 interface ITypeChangeEvents : IUnknown
1150 typedef [unique] ITypeChangeEvents *LPTYPECHANGEEVENTS;
1152 typedef enum tagCHANGEKIND {
1153 CHANGEKIND_ADDMEMBER,
1154 CHANGEKIND_DELETEMEMBER,
1155 CHANGEKIND_SETNAMES,
1156 CHANGEKIND_SETDOCUMENTATION,
1158 CHANGEKIND_INVALIDATE,
1159 CHANGEKIND_CHANGEFAILED,
1163 HRESULT RequestTypeChange(
1164 [in] CHANGEKIND changeKind,
1165 [in] ITypeInfo *pTInfoBefore,
1166 [in] LPOLESTR pStrName,
1167 [out] INT *pfCancel);
1169 HRESULT AfterTypeChange(
1170 [in] CHANGEKIND changeKind,
1171 [in] ITypeInfo *pTInfoAfter,
1172 [in] LPOLESTR pStrName);
1177 uuid(1CF2B120-547D-101B-8E65-08002B2BD119),
1178 pointer_default(unique)
1180 interface IErrorInfo : IUnknown
1182 typedef [unique] IErrorInfo *LPERRORINFO;
1188 [out] BSTR *pBstrSource);
1190 HRESULT GetDescription(
1191 [out] BSTR *pBstrDescription);
1193 HRESULT GetHelpFile(
1194 [out] BSTR *pBstrHelpFile);
1196 HRESULT GetHelpContext(
1197 [out] DWORD *pdwHelpContext);
1202 uuid(22F03340-547D-101B-8E65-08002B2BD119),
1203 pointer_default(unique)
1205 interface ICreateErrorInfo : IUnknown
1207 typedef [unique] ICreateErrorInfo *LPCREATEERRORINFO;
1210 [in] REFGUID rguid);
1213 [in] LPOLESTR szSource);
1215 HRESULT SetDescription(
1216 [in] LPOLESTR szDescription);
1218 HRESULT SetHelpFile(
1219 [in] LPOLESTR szHelpFile);
1221 HRESULT SetHelpContext(
1222 [in] DWORD dwHelpContext);
1227 uuid(DF0B3D60-548F-101B-8E65-08002B2BD119),
1228 pointer_default(unique)
1230 interface ISupportErrorInfo : IUnknown
1232 typedef [unique] ISupportErrorInfo *LPSUPPORTERRORINFO;
1234 HRESULT InterfaceSupportsErrorInfo(
1240 uuid(0000002E-0000-0000-C000-000000000046)
1242 interface ITypeFactory : IUnknown
1244 HRESULT CreateFromTypeInfo(
1245 [in] ITypeInfo *pTypeInfo,
1247 [out, iid_is(riid)] IUnknown **ppv);
1253 uuid(0000002D-0000-0000-C000-000000000046)
1255 interface ITypeMarshal : IUnknown
1259 [in] DWORD dwDestContext,
1260 [in] PVOID pvDestContext,
1261 [out] ULONG *pSize);
1265 [in] DWORD dwDestContext,
1266 [in] PVOID pvDestContext,
1267 [in] ULONG cbBufferLength,
1268 [out] BYTE *pBuffer,
1269 [out] ULONG *pcbWritten);
1274 [in] ULONG cbBufferLength,
1276 [out] ULONG *pcbRead);
1285 uuid(0000002F-0000-0000-C000-000000000046)
1287 interface IRecordInfo : IUnknown
1289 typedef [unique] IRecordInfo *LPRECORDINFO;
1294 HRESULT RecordClear(
1295 [in] PVOID pvExisting);
1298 [in] PVOID pvExisting,
1305 [out] BSTR *pbstrName);
1308 [out] ULONG *pcbSize);
1310 HRESULT GetTypeInfo(
1311 [out] ITypeInfo **ppTypeInfo);
1315 [in] LPCOLESTR szFieldName,
1316 [out] VARIANT *pvarField);
1318 HRESULT GetFieldNoCopy(
1320 [in] LPCOLESTR szFieldName,
1321 [out] VARIANT *pvarField,
1322 [out] PVOID *ppvDataCArray);
1326 [in, out] PVOID pvData,
1327 [in] LPCOLESTR szFieldName,
1328 [in] VARIANT *pvarField);
1330 HRESULT PutFieldNoCopy(
1332 [in, out] PVOID pvData,
1333 [in] LPCOLESTR szFieldName,
1334 [in] VARIANT *pvarField);
1336 HRESULT GetFieldNames(
1337 [in, out] ULONG *pcNames,
1338 [out, size_is(*pcNames), length_is(*pcNames)] BSTR *rgBstrNames);
1340 BOOL IsMatchingType(
1341 [in] IRecordInfo *pRecordInfo);
1343 PVOID RecordCreate();
1345 HRESULT RecordCreateCopy(
1346 [in] PVOID pvSource,
1347 [out] PVOID *ppvDest);
1349 HRESULT RecordDestroy(
1350 [in] PVOID pvRecord);
1356 uuid(00020405-0000-0000-C000-000000000046),
1357 pointer_default(unique)
1359 interface ICreateTypeInfo : IUnknown
1361 typedef [unique] ICreateTypeInfo *LPCREATETYPEINFO;
1366 HRESULT SetTypeFlags(
1367 [in] UINT uTypeFlags);
1369 HRESULT SetDocString(
1370 [in] LPOLESTR pStrDoc);
1372 HRESULT SetHelpContext(
1373 [in] DWORD dwHelpContext);
1376 [in] WORD wMajorVerNum,
1377 [in] WORD wMinorVerNum);
1379 HRESULT AddRefTypeInfo(
1380 [in] ITypeInfo *pTInfo,
1381 [in] HREFTYPE *phRefType);
1383 HRESULT AddFuncDesc(
1385 [in] FUNCDESC *pFuncDesc);
1387 HRESULT AddImplType(
1389 [in] HREFTYPE hRefType);
1391 HRESULT SetImplTypeFlags(
1393 [in] INT implTypeFlags);
1395 HRESULT SetAlignment(
1396 [in] WORD cbAlignment);
1399 [in] LPOLESTR pStrSchema);
1403 [in] VARDESC *pVarDesc);
1405 HRESULT SetFuncAndParamNames(
1407 [in, size_is(cNames)] LPOLESTR *rgszNames,
1412 [in] LPOLESTR szName);
1414 HRESULT SetTypeDescAlias(
1415 [in] TYPEDESC *pTDescAlias);
1417 HRESULT DefineFuncAsDllEntry(
1419 [in] LPOLESTR szDllName,
1420 [in] LPOLESTR szProcName);
1422 HRESULT SetFuncDocString(
1424 [in] LPOLESTR szDocString);
1426 HRESULT SetVarDocString(
1428 [in] LPOLESTR szDocString);
1430 HRESULT SetFuncHelpContext(
1432 [in] DWORD dwHelpContext);
1434 HRESULT SetVarHelpContext(
1436 [in] DWORD dwHelpContext);
1440 [in] BSTR bstrMops);
1442 HRESULT SetTypeIdldesc(
1443 [in] IDLDESC * pIdlDesc);
1451 uuid(0002040E-0000-0000-C000-000000000046),
1452 pointer_default(unique)
1454 interface ICreateTypeInfo2 : ICreateTypeInfo
1456 typedef [unique] ICreateTypeInfo2 *LPCREATETYPEINFO2;
1458 HRESULT DeleteFuncDesc(
1461 HRESULT DeleteFuncDescByMemId(
1462 [in] MEMBERID memid,
1463 [in] INVOKEKIND invKind);
1465 HRESULT DeleteVarDesc(
1468 HRESULT DeleteVarDescByMemId(
1469 [in] MEMBERID memid);
1471 HRESULT DeleteImplType(
1474 HRESULT SetCustData(
1476 [in] VARIANT *pVarVal);
1478 HRESULT SetFuncCustData(
1481 [in] VARIANT *pVarVal);
1483 HRESULT SetParamCustData(
1484 [in] UINT indexFunc,
1485 [in] UINT indexParam,
1487 [in] VARIANT *pVarVal);
1489 HRESULT SetVarCustData(
1492 [in] VARIANT *pVarVal);
1494 HRESULT SetImplTypeCustData(
1497 [in] VARIANT *pVarVal);
1499 HRESULT SetHelpStringContext(
1500 [in] ULONG dwHelpStringContext);
1502 HRESULT SetFuncHelpStringContext(
1504 [in] ULONG dwHelpStringContext);
1506 HRESULT SetVarHelpStringContext(
1508 [in] ULONG dwHelpStringContext);
1510 HRESULT Invalidate();
1513 [in] LPOLESTR szName);
1519 uuid(00020406-0000-0000-C000-000000000046),
1520 pointer_default(unique)
1522 interface ICreateTypeLib : IUnknown
1524 typedef [unique] ICreateTypeLib *LPCREATETYPELIB;
1526 HRESULT CreateTypeInfo(
1527 [in] LPOLESTR szName,
1528 [in] TYPEKIND tkind,
1529 [out] ICreateTypeInfo **ppCTInfo);
1532 [in] LPOLESTR szName);
1535 [in] WORD wMajorVerNum,
1536 [in] WORD wMinorVerNum);
1541 HRESULT SetDocString(
1542 [in] LPOLESTR szDoc);
1544 HRESULT SetHelpFileName(
1545 [in] LPOLESTR szHelpFileName);
1547 HRESULT SetHelpContext(
1548 [in] DWORD dwHelpContext);
1553 HRESULT SetLibFlags(
1554 [in] UINT uLibFlags);
1556 HRESULT SaveAllChanges();
1562 uuid(0002040F-0000-0000-C000-000000000046),
1563 pointer_default(unique)
1565 interface ICreateTypeLib2 : ICreateTypeLib
1567 typedef [unique] ICreateTypeLib2 *LPCREATETYPELIB2;
1569 HRESULT DeleteTypeInfo(
1570 [in] LPOLESTR szName);
1572 HRESULT SetCustData(
1574 [in] VARIANT *pVarVal);
1576 HRESULT SetHelpStringContext(
1577 [in] ULONG dwHelpStringContext);
1579 HRESULT SetHelpStringDll(
1580 [in] LPOLESTR szFileName);
1584 /*****************************************************************************
1585 * IErrorLog interface
1589 uuid(3127ca40-446e-11ce-8135-00aa004bb851),
1590 pointer_default(unique)
1592 interface IErrorLog : IUnknown
1594 typedef IErrorLog *LPERRORLOG;
1597 [in] LPCOLESTR pszPropName,
1598 [in] EXCEPINFO *pExcepInfo);
1602 /*****************************************************************************
1603 * IPropertyBag interface
1607 uuid(55272a00-42cb-11ce-8135-00aa004bb851),
1608 pointer_default(unique)
1610 interface IPropertyBag : IUnknown
1612 typedef IPropertyBag *LPPROPERTYBAG;
1616 [in] LPCOLESTR pszPropName,
1617 [in, out] VARIANT *pVar,
1618 [in] IErrorLog *pErrorLog);
1622 [in] LPCOLESTR pszPropName,
1623 [out] VARIANT *pVar,
1624 [in] IErrorLog *pErrorLog,
1626 [in] IUnknown *pUnkObj);
1629 [in] LPCOLESTR pszPropName,
1630 [in] VARIANT *pVar);