wininet: Use address length returned by GetAddress in NETCON_connect.
[wine] / include / oaidl.idl
1 /*
2  * Copyright 2002 Ove Kaaven
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef DO_NO_IMPORTS
20 import "objidl.idl";
21 #endif
22
23 interface IDispatch;
24 interface ITypeInfo;
25 interface ITypeLib;
26 interface IRecordInfo;
27
28 [
29   version(1.0),
30   pointer_default(unique)
31 ]
32 interface IOleAutomationTypes
33 {
34
35 typedef CY CURRENCY;
36
37 /* Safe Array */
38
39 typedef struct tagSAFEARRAYBOUND {
40   ULONG cElements;
41   LONG lLbound;
42 } SAFEARRAYBOUND, *LPSAFEARRAYBOUND;
43
44 typedef [unique] struct _wireVARIANT *wireVARIANT;
45 typedef [unique] struct _wireBRECORD *wireBRECORD;
46
47 typedef struct _wireSAFEARR_BSTR {
48   ULONG Size;
49   [size_is(Size), ref] wireBSTR *aBstr;
50 } SAFEARR_BSTR;
51
52 typedef struct _wireSAFEARR_UNKNOWN {
53   ULONG Size;
54   [size_is(Size), ref] IUnknown **apUnknown;
55 } SAFEARR_UNKNOWN;
56
57 typedef struct _wireSAFEARR_DISPATCH {
58   ULONG Size;
59   [size_is(Size), ref] IDispatch **apDispatch;
60 } SAFEARR_DISPATCH;
61
62 typedef struct _wireSAFEARR_VARIANT {
63   ULONG Size;
64   [size_is(Size), ref] wireVARIANT *aVariant;
65 } SAFEARR_VARIANT;
66
67 typedef struct _wireSAFEARR_BRECORD {
68   ULONG Size;
69   [size_is(Size), ref] wireBRECORD *aRecord;
70 } SAFEARR_BRECORD;
71
72 typedef struct _wireSAFEARR_HAVEIID {
73   ULONG Size;
74   [size_is(Size), ref] IUnknown **apUnknown;
75   IID iid;
76 } SAFEARR_HAVEIID;
77
78 typedef [v1_enum] enum tagSF_TYPE {
79   SF_ERROR    = VT_ERROR,
80   SF_I1       = VT_I1,
81   SF_I2       = VT_I2,
82   SF_I4       = VT_I4,
83   SF_I8       = VT_I8,
84   SF_BSTR     = VT_BSTR,
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,
90 } SF_TYPE;
91
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;
103 } SAFEARRAYUNION;
104
105 typedef [unique] struct _wireSAFEARRAY {
106   USHORT cDims;
107   USHORT fFeatures;
108   ULONG cbElements;
109   ULONG cLocks;
110   SAFEARRAYUNION uArrayStructs;
111   [size_is(cDims)] SAFEARRAYBOUND rgsabound[];
112 } *wireSAFEARRAY;
113
114 typedef [unique] wireSAFEARRAY *wirePSAFEARRAY;
115
116 typedef struct tagSAFEARRAY {
117   USHORT cDims;
118   USHORT fFeatures;
119   ULONG cbElements;
120   ULONG cLocks;
121   PVOID pvData;
122   SAFEARRAYBOUND rgsabound[];
123 } SAFEARRAY;
124
125 typedef [wire_marshal(wirePSAFEARRAY)] SAFEARRAY *LPSAFEARRAY;
126
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 */
142
143 /* Variant */
144
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")
150 cpp_quote("#else")
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")
157 cpp_quote("#endif")
158
159 typedef [wire_marshal(wireVARIANT)] struct tagVARIANT VARIANT;
160
161 struct tagVARIANT {
162   union {
163     struct __tagVARIANT {
164       VARTYPE vt;
165       WORD wReserved1;
166       WORD wReserved2;
167       WORD wReserved3;
168       union {
169         signed char cVal;
170         USHORT uiVal;
171         ULONG ulVal;
172         INT intVal;
173         UINT uintVal;
174         BYTE bVal;
175         SHORT iVal;
176         LONG lVal;
177         FLOAT fltVal;
178         DOUBLE dblVal;
179         VARIANT_BOOL boolVal;
180 #if 0 /* illegal in C++ */
181         _VARIANT_BOOL bool;
182 #endif
183         SCODE scode;
184         DATE date;
185         BSTR bstrVal;
186         CY cyVal;
187         IUnknown *punkVal;
188         IDispatch *pdispVal;
189         SAFEARRAY *parray;
190         LONGLONG llVal;
191         ULONGLONG ullVal;
192         signed char *pcVal;
193         USHORT *puiVal;
194         ULONG *pulVal;
195         INT *pintVal;
196         UINT *puintVal;
197         BYTE *pbVal;
198         SHORT *piVal;
199         LONG *plVal;
200         FLOAT *pfltVal;
201         DOUBLE *pdblVal;
202         VARIANT_BOOL *pboolVal;
203 #if 0
204         _VARIANT_BOOL *pbool;
205 #endif
206         SCODE *pscode;
207         DATE *pdate;
208         BSTR *pbstrVal;
209         VARIANT *pvarVal;
210         PVOID byref;
211         CY *pcyVal;
212         DECIMAL *pdecVal;
213         IUnknown **ppunkVal;
214         IDispatch **ppdispVal;
215         SAFEARRAY **pparray;
216         LONGLONG *pllVal;
217         ULONGLONG *pullVal;
218         struct __tagBRECORD {
219           PVOID pvRecord;
220           IRecordInfo *pRecInfo;
221         } __VARIANT_NAME_4;
222       } __VARIANT_NAME_3;
223     } __VARIANT_NAME_2;
224
225     DECIMAL decVal;
226   } __VARIANT_NAME_1;
227 };
228
229 typedef VARIANT *LPVARIANT;
230 typedef VARIANT VARIANTARG;
231 typedef VARIANTARG *LPVARIANTARG;
232
233 struct _wireBRECORD {
234   ULONG fFlags;
235   ULONG clSize;
236   IRecordInfo *pRecInfo;
237   [size_is(clSize)] byte *pRecord;
238 };
239
240 struct _wireVARIANT {
241   DWORD clSize;
242   DWORD rpcReserved;
243   USHORT vt;
244   USHORT wReserved1;
245   USHORT wReserved2;
246   USHORT wReserved3;
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;
289   } DUMMYUNIONNAME;
290 };
291
292 /* Dispatch */
293
294 typedef LONG DISPID;
295 typedef DWORD HREFTYPE;
296 typedef DISPID MEMBERID;
297
298 typedef [v1_enum] enum tagTYPEKIND {
299   TKIND_ENUM = 0,
300   TKIND_RECORD,
301   TKIND_MODULE,
302   TKIND_INTERFACE,
303   TKIND_DISPATCH,
304   TKIND_COCLASS,
305   TKIND_ALIAS,
306   TKIND_UNION,
307   TKIND_MAX
308 } TYPEKIND;
309
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;
315   [default]                    ;
316   } DUMMYUNIONNAME;
317   VARTYPE vt;
318 } TYPEDESC;
319
320 typedef struct tagARRAYDESC {
321   TYPEDESC tdescElem;
322   USHORT cDims;
323   [size_is(cDims)] SAFEARRAYBOUND rgbounds[];
324 } ARRAYDESC;
325
326 typedef struct tagPARAMDESCEX {
327   ULONG cBytes;
328   VARIANTARG varDefaultValue;
329 } PARAMDESCEX, *LPPARAMDESCEX;
330
331 typedef struct tagPARAMDESC {
332   LPPARAMDESCEX pparamdescex;
333   USHORT wParamFlags;
334 } PARAMDESC, *LPPARAMDESC;
335
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;
344
345 typedef struct tagIDLDESC {
346   ULONG dwReserved;
347   USHORT wIDLFlags;
348 } IDLDESC, *LPIDLDESC;
349
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;
355
356 cpp_quote("#if 0") /* for IDL only */
357 typedef struct tagELEMDESC {
358   TYPEDESC tdesc;
359   PARAMDESC paramdesc;
360 } ELEMDESC;
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;")
369 cpp_quote("#endif")
370
371 typedef struct tagTYPEATTR {
372   GUID guid;
373   LCID lcid;
374   DWORD dwReserved;
375   MEMBERID memidConstructor;
376   MEMBERID memidDestructor;
377   LPOLESTR lpstrSchema;
378   ULONG cbSizeInstance;
379   TYPEKIND typekind;
380   WORD cFuncs;
381   WORD cVars;
382   WORD cImplTypes;
383   WORD cbSizeVft;
384   WORD cbAlignment;
385   WORD wTypeFlags;
386   WORD wMajorVerNum;
387   WORD wMinorVerNum;
388   TYPEDESC tdescAlias;
389   IDLDESC idldescType;
390 } TYPEATTR, *LPTYPEATTR;
391
392 typedef struct tagDISPPARAMS {
393   [size_is(cArgs)] VARIANTARG *rgvarg;
394   [size_is(cNamedArgs)] DISPID *rgdispidNamedArgs;
395   UINT cArgs;
396   UINT cNamedArgs;
397 } DISPPARAMS;
398
399 cpp_quote("#if 0") /* for IDL only */
400 typedef struct tagEXCEPINFO {
401   WORD wCode;
402   WORD wReserved;
403   BSTR bstrSource;
404   BSTR bstrDescription;
405   BSTR bstrHelpFile;
406   DWORD dwHelpContext;
407   ULONG pvReserved;
408   ULONG pfnDeferredFillIn;
409   SCODE scode;
410 } EXCEPINFO;
411 cpp_quote("#else")
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;")
423 cpp_quote("#endif")
424
425 typedef [v1_enum] enum tagCALLCONV {
426   CC_FASTCALL = 0,
427   CC_CDECL = 1,
428   CC_MSCPASCAL,
429   CC_PASCAL = CC_MSCPASCAL,
430   CC_MACPASCAL,
431   CC_STDCALL,
432   CC_FPFASTCALL,
433   CC_SYSCALL,
434   CC_MPWCDECL,
435   CC_MPWPASCAL,
436   CC_MAX
437 } CALLCONV;
438
439 typedef [v1_enum] enum tagFUNCKIND {
440   FUNC_VIRTUAL,
441   FUNC_PUREVIRTUAL,
442   FUNC_NONVIRTUAL,
443   FUNC_STATIC,
444   FUNC_DISPATCH
445 } FUNCKIND;
446
447 typedef [v1_enum] enum tagINVOKEKIND {
448   INVOKE_FUNC = 1,
449   INVOKE_PROPERTYGET = 2,
450   INVOKE_PROPERTYPUT = 4,
451   INVOKE_PROPERTYPUTREF = 8
452 } INVOKEKIND;
453
454 typedef struct tagFUNCDESC {
455   MEMBERID memid;
456   [size_is(cScodes)] SCODE *lprgscode;
457   [size_is(cParams)] ELEMDESC *lprgelemdescParam;
458   FUNCKIND funckind;
459   INVOKEKIND invkind;
460   CALLCONV callconv;
461   SHORT cParams;
462   SHORT cParamsOpt;
463   SHORT oVft;
464   SHORT cScodes;
465   ELEMDESC elemdescFunc;
466   WORD wFuncFlags;
467 } FUNCDESC, *LPFUNCDESC;
468
469 typedef [v1_enum] enum tagVARKIND {
470   VAR_PERINSTANCE,
471   VAR_STATIC,
472   VAR_CONST,
473   VAR_DISPATCH
474 } VARKIND;
475
476 const USHORT IMPLTYPEFLAG_FDEFAULT       = 0x1;
477 const USHORT IMPLTYPEFLAG_FSOURCE        = 0x2;
478 const USHORT IMPLTYPEFLAG_FRESTRICTED    = 0x4;
479 const USHORT IMPLTYPEFLAG_FDEFAULTVTABLE = 0x8;
480
481 typedef struct tagVARDESC {
482   MEMBERID memid;
483   LPOLESTR lpstrSchema;
484   [switch_is(varkind)] union {
485   [case(VAR_PERINSTANCE, VAR_DISPATCH, VAR_STATIC)] ULONG oInst;
486   [case(VAR_CONST)] VARIANT *lpvarValue;
487   } DUMMYUNIONNAME;
488   ELEMDESC elemdescVar;
489   WORD wVarFlags;
490   VARKIND varkind;
491 } VARDESC, *LPVARDESC;
492
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
509 } TYPEFLAGS;
510
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
525 } FUNCFLAGS;
526
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
541 } VARFLAGS;
542
543 typedef [wire_marshal(DWORD)] struct tagCLEANLOCALSTORAGE {
544   IUnknown *pInterface;
545   PVOID pStorage;
546   DWORD flags;
547 } CLEANLOCALSTORAGE;
548
549 typedef struct tagCUSTDATAITEM {
550   GUID guid;
551   VARIANTARG varValue;
552 } CUSTDATAITEM, *LPCUSTDATAITEM;
553
554 typedef struct tagCUSTDATA {
555   DWORD cCustData;
556   [size_is(cCustData)] LPCUSTDATAITEM prgCustData;
557 } CUSTDATA, *LPCUSTDATA;
558
559 } /* interface IOleAutomationTypes */
560
561 /******************** INTERFACES ********************/
562
563 [
564   object,
565   uuid(00020400-0000-0000-C000-000000000046),
566   pointer_default(unique)
567 ]
568 interface IDispatch : IUnknown
569 {
570   typedef [unique] IDispatch *LPDISPATCH;
571
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;
580
581   HRESULT GetTypeInfoCount(
582     [out] UINT *pctinfo);
583
584   HRESULT GetTypeInfo(
585     [in] UINT iTInfo,
586     [in] LCID lcid,
587     [out] ITypeInfo **ppTInfo);
588
589   HRESULT GetIDsOfNames(
590     [in] REFIID riid,
591     [in, size_is(cNames)] LPOLESTR *rgszNames,
592     [in] UINT cNames,
593     [in] LCID lcid,
594     [out, size_is(cNames)] DISPID *rgDispId);
595
596   [local]
597   HRESULT Invoke(
598     [in] DISPID dispIdMember,
599     [in] REFIID riid,
600     [in] LCID lcid,
601     [in] WORD wFlags,
602     [in, out] DISPPARAMS *pDispParams,
603     [out] VARIANT *pVarResult,
604     [out] EXCEPINFO *pExcepInfo,
605     [out] UINT *puArgErr);
606
607   [call_as(Invoke)]
608   HRESULT RemoteInvoke(
609     [in] DISPID dispIdMember,
610     [in] REFIID riid,
611     [in] LCID lcid,
612     [in] DWORD dwFlags,
613     [in] DISPPARAMS *pDispParams,
614     [out] VARIANT *pVarResult,
615     [out] EXCEPINFO *pExcepInfo,
616     [out] UINT *pArgErr,
617     [in] UINT cVarRef,
618     [in, size_is(cVarRef)] UINT *rgVarRefIdx,
619     [in, out, size_is(cVarRef)] VARIANTARG *rgVarRef);
620 }
621
622 [
623   object,
624   uuid(00020404-0000-0000-C000-000000000046),
625   pointer_default(unique)
626 ]
627 interface IEnumVARIANT : IUnknown
628 {
629   typedef [unique] IEnumVARIANT *LPENUMVARIANT;
630
631   [local]
632   HRESULT Next(
633     [in] ULONG celt,
634     [out] VARIANT *rgVar,
635     [out] ULONG *pCeltFetched);
636
637   [call_as(Next)]
638   HRESULT RemoteNext(
639     [in] ULONG celt,
640     [out, size_is(celt), length_is(*pCeltFetched)]
641     VARIANT *rgVar,
642     [out] ULONG *pCeltFetched);
643
644   HRESULT Skip(
645     [in] ULONG celt);
646
647   HRESULT Reset();
648
649   HRESULT Clone(
650     [out] IEnumVARIANT **ppEnum);
651 }
652
653 [
654   object,
655   uuid(00020403-0000-0000-C000-000000000046),
656   pointer_default(unique)
657 ]
658 interface ITypeComp : IUnknown
659 {
660   typedef [unique] ITypeComp *LPTYPECOMP;
661
662   typedef [v1_enum] enum tagDESCKIND {
663     DESCKIND_NONE = 0,
664     DESCKIND_FUNCDESC,
665     DESCKIND_VARDESC,
666     DESCKIND_TYPECOMP,
667     DESCKIND_IMPLICITAPPOBJ,
668     DESCKIND_MAX
669   } DESCKIND;
670
671   typedef union tagBINDPTR {
672     FUNCDESC *lpfuncdesc;
673     VARDESC *lpvardesc;
674     ITypeComp *lptcomp;
675   } BINDPTR, *LPBINDPTR;
676
677   [local]
678   HRESULT Bind(
679     [in] LPOLESTR szName,
680     [in] ULONG lHashVal,
681     [in] WORD wFlags,
682     [out] ITypeInfo **ppTInfo,
683     [out] DESCKIND *pDescKind,
684     [out] BINDPTR *pBindPtr);
685
686   [call_as(Bind)]
687   HRESULT RemoteBind(
688     [in] LPOLESTR szName,
689     [in] ULONG lHashVal,
690     [in] WORD wFlags,
691     [out] ITypeInfo **ppTInfo,
692     [out] DESCKIND *pDescKind,
693     [out] LPFUNCDESC *ppFuncDesc,
694     [out] LPVARDESC *ppVarDesc,
695     [out] ITypeComp **ppTypeComp,
696     [out] CLEANLOCALSTORAGE *pDummy);
697
698   [local]
699   HRESULT BindType(
700     [in] LPOLESTR szName,
701     [in] ULONG lHashVal,
702     [out] ITypeInfo **ppTInfo,
703     [out] ITypeComp **ppTComp);
704
705   [call_as(BindType)]
706   HRESULT RemoteBindType(
707     [in] LPOLESTR szName,
708     [in] ULONG lHashVal,
709     [out] ITypeInfo **ppTInfo);
710 }
711
712 [
713   object,
714   uuid(00020401-0000-0000-C000-000000000046),
715   pointer_default(unique)
716 ]
717 interface ITypeInfo : IUnknown
718 {
719   typedef [unique] ITypeInfo *LPTYPEINFO;
720
721   [local]
722   HRESULT GetTypeAttr(
723     [out] TYPEATTR **ppTypeAttr);
724
725   [call_as(GetTypeAttr)]
726   HRESULT RemoteGetTypeAttr(
727     [out] LPTYPEATTR *ppTypeAttr,
728     [out] CLEANLOCALSTORAGE *pDummy);
729
730   HRESULT GetTypeComp(
731     [out] ITypeComp **ppTComp);
732
733   [local]
734   HRESULT GetFuncDesc(
735     [in] UINT index,
736     [out] FUNCDESC **ppFuncDesc);
737
738   [call_as(GetFuncDesc)]
739   HRESULT RemoteGetFuncDesc(
740     [in] UINT index,
741     [out] LPFUNCDESC *ppFuncDesc,
742     [out] CLEANLOCALSTORAGE *pDummy);
743
744   [local]
745   HRESULT GetVarDesc(
746     [in] UINT index,
747     [out] VARDESC **ppVarDesc);
748
749   [call_as(GetVarDesc)]
750   HRESULT RemoteGetVarDesc(
751     [in] UINT index,
752     [out] LPVARDESC *ppVarDesc,
753     [out] CLEANLOCALSTORAGE *pDummy);
754
755   [local]
756   HRESULT GetNames(
757     [in] MEMBERID memid,
758     [out, size_is(cMaxNames), length_is(*pcNames)] BSTR *rgBstrNames,
759     [in] UINT cMaxNames,
760     [out] UINT *pcNames);
761
762   [call_as(GetNames)]
763   HRESULT RemoteGetNames(
764     [in] MEMBERID memid,
765     [out, size_is(cMaxNames), length_is(*pcNames)] BSTR *rgBstrNames,
766     [in] UINT cMaxNames,
767     [out] UINT *pcNames);
768
769   HRESULT GetRefTypeOfImplType(
770     [in] UINT index,
771     [out] HREFTYPE *pRefType);
772
773   HRESULT GetImplTypeFlags(
774     [in] UINT index,
775     [out] INT *pImplTypeFlags);
776
777   [local]
778   HRESULT GetIDsOfNames(
779     [in, size_is(cNames)] LPOLESTR *rgszNames,
780     [in] UINT cNames,
781     [out, size_is(cNames)] MEMBERID *pMemId);
782
783   [call_as(GetIDsOfNames)]
784   HRESULT LocalGetIDsOfNames();
785
786   [local]
787   HRESULT Invoke(
788     [in] PVOID pvInstance,
789     [in] MEMBERID memid,
790     [in] WORD wFlags,
791     [in, out] DISPPARAMS *pDispParams,
792     [out] VARIANT *pVarResult,
793     [out] EXCEPINFO *pExcepInfo,
794     [out] UINT *puArgErr);
795
796   [call_as(Invoke)]
797   HRESULT LocalInvoke();
798
799   [local]
800   HRESULT GetDocumentation(
801     [in] MEMBERID memid,
802     [out] BSTR *pBstrName,
803     [out] BSTR *pBstrDocString,
804     [out] DWORD *pdwHelpContext,
805     [out] BSTR *pBstrHelpFile);
806
807   [call_as(GetDocumentation)]
808   HRESULT RemoteGetDocumentation(
809     [in] MEMBERID memid,
810     [in] DWORD refPtrFlags,
811     [out] BSTR *pBstrName,
812     [out] BSTR *pBstrDocString,
813     [out] DWORD *pdwHelpContext,
814     [out] BSTR *pBstrHelpFile);
815
816   [local]
817   HRESULT GetDllEntry(
818     [in] MEMBERID memid,
819     [in] INVOKEKIND invKind,
820     [out] BSTR *pBstrDllName,
821     [out] BSTR *pBstrName,
822     [out] WORD *pwOrdinal);
823
824   [call_as(GetDllEntry)]
825   HRESULT RemoteGetDllEntry(
826     [in] MEMBERID memid,
827     [in] INVOKEKIND invKind,
828     [in] DWORD refPtrFlags,
829     [out] BSTR *pBstrDllName,
830     [out] BSTR *pBstrName,
831     [out] WORD *pwOrdinal);
832
833   HRESULT GetRefTypeInfo(
834     [in] HREFTYPE hRefType,
835     [out] ITypeInfo **ppTInfo);
836
837   [local]
838   HRESULT AddressOfMember(
839     [in] MEMBERID memid,
840     [in] INVOKEKIND invKind,
841     [out] PVOID *ppv);
842
843   [call_as(AddressOfMember)]
844   HRESULT LocalAddressOfMember();
845
846   [local]
847   HRESULT CreateInstance(
848     [in] IUnknown *pUnkOuter,
849     [in] REFIID riid,
850     [out, iid_is(riid)] PVOID *ppvObj);
851
852   [call_as(CreateInstance)]
853   HRESULT RemoteCreateInstance(
854     [in] REFIID riid,
855     [out, iid_is(riid)] IUnknown **ppvObj);
856
857   HRESULT GetMops(
858     [in] MEMBERID memid,
859     [out] BSTR *pBstrMops);
860
861   [local]
862   HRESULT GetContainingTypeLib(
863     [out] ITypeLib **ppTLib,
864     [out] UINT *pIndex);
865
866   [call_as(GetContainingTypeLib)]
867   HRESULT RemoteGetContainingTypeLib(
868     [out] ITypeLib **ppTLib,
869     [out] UINT *pIndex);
870
871   [local]
872   void ReleaseTypeAttr(
873     [in] TYPEATTR *pTypeAttr);
874
875   [call_as(ReleaseTypeAttr)]
876   HRESULT LocalReleaseTypeAttr();
877
878   [local]
879   void ReleaseFuncDesc(
880     [in] FUNCDESC *pFuncDesc);
881
882   [call_as(ReleaseFuncDesc)]
883   HRESULT LocalReleaseFuncDesc();
884
885   [local]
886   void ReleaseVarDesc(
887     [in] VARDESC *pVarDesc);
888
889   [call_as(ReleaseVarDesc)]
890   HRESULT LocalReleaseVarDesc();
891 }
892
893 [
894   object,
895   uuid(00020412-0000-0000-C000-000000000046),
896   pointer_default(unique)
897 ]
898 interface ITypeInfo2 : ITypeInfo
899 {
900   typedef [unique] ITypeInfo2 *LPTYPEINFO2;
901
902   HRESULT GetTypeKind(
903     [out] TYPEKIND *pTypeKind);
904
905   HRESULT GetTypeFlags(
906     [out] ULONG *pTypeFlags);
907
908   HRESULT GetFuncIndexOfMemId(
909     [in] MEMBERID memid,
910     [in] INVOKEKIND invKind,
911     [out] UINT *pFuncIndex);
912
913   HRESULT GetVarIndexOfMemId(
914     [in] MEMBERID memid,
915     [out] UINT *pVarIndex);
916
917   HRESULT GetCustData(
918     [in] REFGUID guid,
919     [out] VARIANT *pVarVal);
920
921   HRESULT GetFuncCustData(
922     [in] UINT index,
923     [in] REFGUID guid,
924     [out] VARIANT *pVarVal);
925
926   HRESULT GetParamCustData(
927     [in] UINT indexFunc,
928     [in] UINT indexParam,
929     [in] REFGUID guid,
930     [out] VARIANT *pVarVal);
931
932   HRESULT GetVarCustData(
933     [in] UINT index,
934     [in] REFGUID guid,
935     [out] VARIANT *pVarVal);
936
937   HRESULT GetImplTypeCustData(
938     [in] UINT index,
939     [in] REFGUID guid,
940     [out] VARIANT *pVarVal);
941
942   [local]
943   HRESULT GetDocumentation2(
944     [in] MEMBERID memid,
945     [in] LCID lcid,
946     [out] BSTR *pbstrHelpString,
947     [out] DWORD *pdwHelpStringContext,
948     [out] BSTR *pbstrHelpStringDll);
949
950   [call_as(GetDocumentation2)]
951   HRESULT RemoteGetDocumentation2(
952     [in] MEMBERID memid,
953     [in] LCID lcid,
954     [in] DWORD refPtrFlags,
955     [out] BSTR *pbstrHelpString,
956     [out] DWORD *pdwHelpStringContext,
957     [out] BSTR *pbstrHelpStringDll);
958
959   HRESULT GetAllCustData(
960     [out] CUSTDATA *pCustData);
961
962   HRESULT GetAllFuncCustData(
963     [in] UINT index,
964     [out] CUSTDATA *pCustData);
965
966   HRESULT GetAllParamCustData(
967     [in] UINT indexFunc,
968     [in] UINT indexParam,
969     [out] CUSTDATA *pCustData);
970
971   HRESULT GetAllVarCustData(
972     [in] UINT index,
973     [out] CUSTDATA *pCustData);
974
975   HRESULT GetAllImplTypeCustData(
976     [in] UINT index,
977     [out] CUSTDATA *pCustData);
978 }
979
980 [
981   object,
982   uuid(00020402-0000-0000-C000-000000000046),
983   pointer_default(unique)
984 ]
985 interface ITypeLib : IUnknown
986 {
987   typedef [unique] ITypeLib *LPTYPELIB;
988
989   typedef [v1_enum] enum tagSYSKIND {
990     SYS_WIN16 = 0,
991     SYS_WIN32,
992     SYS_MAC,
993     SYS_WIN64
994   } SYSKIND;
995
996   typedef [v1_enum] enum tagLIBFLAGS {
997     LIBFLAG_FRESTRICTED   = 0x01,
998     LIBFLAG_FCONTROL      = 0x02,
999     LIBFLAG_FHIDDEN       = 0x04,
1000     LIBFLAG_FHASDISKIMAGE = 0x08
1001   } LIBFLAGS;
1002
1003   typedef struct tagTLIBATTR {
1004     GUID guid;
1005     LCID lcid;
1006     SYSKIND syskind;
1007     WORD wMajorVerNum;
1008     WORD wMinorVerNum;
1009     WORD wLibFlags;
1010   } TLIBATTR, *LPTLIBATTR;
1011
1012   [local]
1013   UINT GetTypeInfoCount();
1014
1015   [call_as(GetTypeInfoCount)]
1016   HRESULT RemoteGetTypeInfoCount(
1017     [out] UINT *pcTInfo);
1018
1019   HRESULT GetTypeInfo(
1020     [in] UINT index,
1021     [out] ITypeInfo **ppTInfo);
1022
1023   HRESULT GetTypeInfoType(
1024     [in] UINT index,
1025     [out] TYPEKIND *pTKind);
1026
1027   HRESULT GetTypeInfoOfGuid(
1028     [in] REFGUID guid,
1029     [out] ITypeInfo **ppTinfo);
1030
1031   [local]
1032   HRESULT GetLibAttr(
1033     [out] TLIBATTR **ppTLibAttr);
1034
1035   [call_as(GetLibAttr)]
1036   HRESULT RemoteGetLibAttr(
1037     [out] LPTLIBATTR *ppTLibAttr,
1038     [out] CLEANLOCALSTORAGE *pDummy);
1039
1040   HRESULT GetTypeComp(
1041     [out] ITypeComp **ppTComp);
1042
1043   [local]
1044   HRESULT GetDocumentation(
1045     [in] INT index,
1046     [out] BSTR *pBstrName,
1047     [out] BSTR *pBstrDocString,
1048     [out] DWORD *pdwHelpContext,
1049     [out] BSTR *pBstrHelpFile);
1050
1051   [call_as(GetDocumentation)]
1052   HRESULT RemoteGetDocumentation(
1053     [in] INT index,
1054     [in] DWORD refPtrFlags,
1055     [out] BSTR *pBstrName,
1056     [out] BSTR *pBstrDocString,
1057     [out] DWORD *pdwHelpContext,
1058     [out] BSTR *pBstrHelpFile);
1059
1060   [local]
1061   HRESULT IsName(
1062     [in, out] LPOLESTR szNameBuf,
1063     [in] ULONG lHashVal,
1064     [out] BOOL *pfName);
1065
1066   [call_as(IsName)]
1067   HRESULT RemoteIsName(
1068     [in] LPOLESTR szNameBuf,
1069     [in] ULONG lHashVal,
1070     [out] BOOL *pfName,
1071     [out] BSTR *pBstrLibName);
1072
1073   [local]
1074   HRESULT FindName(
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);
1080
1081   [call_as(FindName)]
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);
1089
1090   [local]
1091   void ReleaseTLibAttr(
1092     [in] TLIBATTR *pTLibAttr);
1093
1094   [call_as(ReleaseTLibAttr)]
1095   HRESULT LocalReleaseTLibAttr();
1096 }
1097
1098 [
1099   object,
1100   uuid(00020411-0000-0000-C000-000000000046),
1101   pointer_default(unique)
1102 ]
1103 interface ITypeLib2 : ITypeLib
1104 {
1105   typedef [unique] ITypeLib2 *LPTYPELIB2;
1106
1107   HRESULT GetCustData(
1108     [in] REFGUID guid,
1109     [out] VARIANT *pVarVal);
1110
1111   [local]
1112   HRESULT GetLibStatistics(
1113     [out] ULONG *pcUniqueNames,
1114     [out] ULONG *pcchUniqueNames);
1115
1116   [call_as(GetLibStatistics)]
1117   HRESULT RemoteGetLibStatistics(
1118     [out] ULONG *pcUniqueNames,
1119     [out] ULONG *pcchUniqueNames);
1120
1121   [local]
1122   HRESULT GetDocumentation2(
1123     [in] INT index,
1124     [in] LCID lcid,
1125     [out] BSTR *pbstrHelpString,
1126     [out] DWORD *pdwHelpStringContext,
1127     [out] BSTR *pbstrHelpStringDll);
1128
1129   [call_as(GetDocumentation2)]
1130   HRESULT RemoteGetDocumentation2(
1131     [in] INT index,
1132     [in] LCID lcid,
1133     [in] DWORD refPtrFlags,
1134     [out] BSTR *pbstrHelpString,
1135     [out] DWORD *pdwHelpStringContext,
1136     [out] BSTR *pbstrHelpStringDll);
1137
1138   HRESULT GetAllCustData(
1139     [out] CUSTDATA *pCustData);
1140 }
1141
1142 [
1143   local,
1144   object,
1145   uuid(00020410-0000-0000-C000-000000000046),
1146   pointer_default(unique)
1147 ]
1148 interface ITypeChangeEvents : IUnknown
1149 {
1150   typedef [unique] ITypeChangeEvents *LPTYPECHANGEEVENTS;
1151
1152   typedef enum tagCHANGEKIND {
1153     CHANGEKIND_ADDMEMBER,
1154     CHANGEKIND_DELETEMEMBER,
1155     CHANGEKIND_SETNAMES,
1156     CHANGEKIND_SETDOCUMENTATION,
1157     CHANGEKIND_GENERAL,
1158     CHANGEKIND_INVALIDATE,
1159     CHANGEKIND_CHANGEFAILED,
1160     CHANGEKIND_MAX
1161   } CHANGEKIND;
1162
1163   HRESULT RequestTypeChange(
1164     [in] CHANGEKIND changeKind,
1165     [in] ITypeInfo *pTInfoBefore,
1166     [in] LPOLESTR pStrName,
1167     [out] INT *pfCancel);
1168   
1169   HRESULT AfterTypeChange(
1170     [in] CHANGEKIND changeKind,
1171     [in] ITypeInfo *pTInfoAfter,
1172     [in] LPOLESTR pStrName);
1173 }
1174
1175 [
1176   object,
1177   uuid(1CF2B120-547D-101B-8E65-08002B2BD119),
1178   pointer_default(unique)
1179 ]
1180 interface IErrorInfo : IUnknown
1181 {
1182   typedef [unique] IErrorInfo *LPERRORINFO;
1183
1184   HRESULT GetGUID(
1185     [out] GUID *pGUID);
1186
1187   HRESULT GetSource(
1188     [out] BSTR *pBstrSource);
1189
1190   HRESULT GetDescription(
1191     [out] BSTR *pBstrDescription);
1192
1193   HRESULT GetHelpFile(
1194     [out] BSTR *pBstrHelpFile);
1195
1196   HRESULT GetHelpContext(
1197     [out] DWORD *pdwHelpContext);
1198 }
1199
1200 [
1201   object,
1202   uuid(22F03340-547D-101B-8E65-08002B2BD119),
1203   pointer_default(unique)
1204 ]
1205 interface ICreateErrorInfo : IUnknown
1206 {
1207   typedef [unique] ICreateErrorInfo *LPCREATEERRORINFO;
1208
1209   HRESULT SetGUID(
1210     [in] REFGUID rguid);
1211
1212   HRESULT SetSource(
1213     [in] LPOLESTR szSource);
1214
1215   HRESULT SetDescription(
1216     [in] LPOLESTR szDescription);
1217
1218   HRESULT SetHelpFile(
1219     [in] LPOLESTR szHelpFile);
1220
1221   HRESULT SetHelpContext(
1222     [in] DWORD dwHelpContext);
1223 }
1224
1225 [
1226   object,
1227   uuid(DF0B3D60-548F-101B-8E65-08002B2BD119),
1228   pointer_default(unique)
1229 ]
1230 interface ISupportErrorInfo : IUnknown
1231 {
1232   typedef [unique] ISupportErrorInfo *LPSUPPORTERRORINFO;
1233
1234   HRESULT InterfaceSupportsErrorInfo(
1235     [in] REFIID riid);
1236 }
1237
1238 [
1239   object,
1240   uuid(0000002E-0000-0000-C000-000000000046)
1241 ]
1242 interface ITypeFactory : IUnknown
1243 {
1244   HRESULT CreateFromTypeInfo(
1245     [in] ITypeInfo *pTypeInfo,
1246     [in] REFIID riid,
1247     [out, iid_is(riid)] IUnknown **ppv);
1248 }
1249
1250 [
1251   local,
1252   object,
1253   uuid(0000002D-0000-0000-C000-000000000046)
1254 ]
1255 interface ITypeMarshal : IUnknown
1256 {
1257   HRESULT Size(
1258     [in] PVOID pvType,
1259     [in] DWORD dwDestContext,
1260     [in] PVOID pvDestContext,
1261     [out] ULONG *pSize);
1262
1263   HRESULT Marshal(
1264     [in] PVOID pvType,
1265     [in] DWORD dwDestContext,
1266     [in] PVOID pvDestContext,
1267     [in] ULONG cbBufferLength,
1268     [out] BYTE *pBuffer,
1269     [out] ULONG *pcbWritten);
1270
1271   HRESULT Unmarshal(
1272     [out] PVOID pvType,
1273     [in] DWORD dwFlags,
1274     [in] ULONG cbBufferLength,
1275     [in] BYTE *pBuffer,
1276     [out] ULONG *pcbRead);
1277
1278   HRESULT Free(
1279     [in] PVOID pvType);
1280 }
1281
1282 [
1283   local,
1284   object,
1285   uuid(0000002F-0000-0000-C000-000000000046)
1286 ]
1287 interface IRecordInfo : IUnknown
1288 {
1289   typedef [unique] IRecordInfo *LPRECORDINFO;
1290
1291   HRESULT RecordInit(
1292     [out] PVOID pvNew);
1293
1294   HRESULT RecordClear(
1295     [in] PVOID pvExisting);
1296
1297   HRESULT RecordCopy(
1298     [in] PVOID pvExisting,
1299     [out] PVOID pvNew);
1300
1301   HRESULT GetGuid(
1302     [out] GUID *pguid);
1303
1304   HRESULT GetName(
1305     [out] BSTR *pbstrName);
1306
1307   HRESULT GetSize(
1308     [out] ULONG *pcbSize);
1309
1310   HRESULT GetTypeInfo(
1311     [out] ITypeInfo **ppTypeInfo);
1312
1313   HRESULT GetField(
1314     [in] PVOID pvData,
1315     [in] LPCOLESTR szFieldName,
1316     [out] VARIANT *pvarField);
1317
1318   HRESULT GetFieldNoCopy(
1319     [in] PVOID pvData,
1320     [in] LPCOLESTR szFieldName,
1321     [out] VARIANT *pvarField,
1322     [out] PVOID *ppvDataCArray);
1323
1324   HRESULT PutField(
1325     [in] ULONG wFlags,
1326     [in, out] PVOID pvData,
1327     [in] LPCOLESTR szFieldName,
1328     [in] VARIANT *pvarField);
1329
1330   HRESULT PutFieldNoCopy(
1331     [in] ULONG wFlags,
1332     [in, out] PVOID pvData,
1333     [in] LPCOLESTR szFieldName,
1334     [in] VARIANT *pvarField);
1335
1336   HRESULT GetFieldNames(
1337     [in, out] ULONG *pcNames,
1338     [out, size_is(*pcNames), length_is(*pcNames)] BSTR *rgBstrNames);
1339
1340   BOOL IsMatchingType(
1341     [in] IRecordInfo *pRecordInfo);
1342
1343   PVOID RecordCreate();
1344
1345   HRESULT RecordCreateCopy(
1346     [in] PVOID pvSource,
1347     [out] PVOID *ppvDest);
1348
1349   HRESULT RecordDestroy(
1350     [in] PVOID pvRecord);
1351 }
1352
1353 [
1354   local,
1355   object,
1356   uuid(00020405-0000-0000-C000-000000000046),
1357   pointer_default(unique)
1358 ]
1359 interface ICreateTypeInfo : IUnknown
1360 {
1361   typedef [unique] ICreateTypeInfo *LPCREATETYPEINFO;
1362
1363   HRESULT SetGuid(
1364     [in] REFGUID guid);
1365
1366   HRESULT SetTypeFlags(
1367     [in] UINT uTypeFlags);
1368
1369   HRESULT SetDocString(
1370     [in] LPOLESTR pStrDoc);
1371
1372   HRESULT SetHelpContext(
1373     [in] DWORD dwHelpContext);
1374
1375   HRESULT SetVersion(
1376     [in] WORD wMajorVerNum,
1377     [in] WORD wMinorVerNum);
1378
1379   HRESULT AddRefTypeInfo(
1380     [in] ITypeInfo *pTInfo,
1381     [in] HREFTYPE *phRefType);
1382
1383   HRESULT AddFuncDesc(
1384     [in] UINT index,
1385     [in] FUNCDESC *pFuncDesc);
1386
1387   HRESULT AddImplType(
1388     [in] UINT index,
1389     [in] HREFTYPE hRefType);
1390
1391   HRESULT SetImplTypeFlags(
1392     [in] UINT index,
1393     [in] INT implTypeFlags);
1394
1395   HRESULT SetAlignment(
1396     [in] WORD cbAlignment);
1397
1398   HRESULT SetSchema(
1399     [in] LPOLESTR pStrSchema);
1400
1401   HRESULT AddVarDesc(
1402     [in] UINT index,
1403     [in] VARDESC *pVarDesc);
1404
1405   HRESULT SetFuncAndParamNames(
1406     [in] UINT index,
1407     [in, size_is(cNames)] LPOLESTR *rgszNames,
1408     [in] UINT cNames);
1409
1410   HRESULT SetVarName(
1411     [in] UINT index,
1412     [in] LPOLESTR szName);
1413
1414   HRESULT SetTypeDescAlias(
1415     [in] TYPEDESC *pTDescAlias);
1416
1417   HRESULT DefineFuncAsDllEntry(
1418     [in] UINT index,
1419     [in] LPOLESTR szDllName,
1420     [in] LPOLESTR szProcName);
1421
1422   HRESULT SetFuncDocString(
1423     [in] UINT index,
1424     [in] LPOLESTR szDocString);
1425
1426   HRESULT SetVarDocString(
1427     [in] UINT index,
1428     [in] LPOLESTR szDocString);
1429
1430   HRESULT SetFuncHelpContext(
1431     [in] UINT index,
1432     [in] DWORD dwHelpContext);
1433
1434   HRESULT SetVarHelpContext(
1435     [in] UINT index,
1436     [in] DWORD dwHelpContext);
1437
1438   HRESULT SetMops(
1439     [in] UINT index,
1440     [in] BSTR bstrMops);
1441
1442   HRESULT SetTypeIdldesc(
1443     [in] IDLDESC * pIdlDesc);
1444
1445   HRESULT LayOut();
1446 }
1447
1448 [
1449   local,
1450   object,
1451   uuid(0002040E-0000-0000-C000-000000000046),
1452   pointer_default(unique)
1453 ]
1454 interface ICreateTypeInfo2 : ICreateTypeInfo
1455 {
1456   typedef [unique] ICreateTypeInfo2 *LPCREATETYPEINFO2;
1457
1458   HRESULT DeleteFuncDesc(
1459     [in] UINT index);
1460
1461   HRESULT DeleteFuncDescByMemId(
1462     [in] MEMBERID memid,
1463     [in] INVOKEKIND invKind);
1464
1465   HRESULT DeleteVarDesc(
1466     [in] UINT index);
1467
1468   HRESULT DeleteVarDescByMemId(
1469     [in] MEMBERID memid);
1470
1471   HRESULT DeleteImplType(
1472     [in] UINT index);
1473
1474   HRESULT SetCustData(
1475     [in] REFGUID guid,
1476     [in] VARIANT *pVarVal);
1477
1478   HRESULT SetFuncCustData( 
1479     [in] UINT index, 
1480     [in] REFGUID guid, 
1481     [in] VARIANT *pVarVal);
1482   
1483   HRESULT SetParamCustData( 
1484     [in] UINT indexFunc, 
1485     [in] UINT indexParam, 
1486     [in] REFGUID guid, 
1487     [in] VARIANT *pVarVal);
1488
1489   HRESULT SetVarCustData( 
1490     [in] UINT index, 
1491     [in] REFGUID guid, 
1492     [in] VARIANT *pVarVal);
1493
1494   HRESULT SetImplTypeCustData( 
1495     [in] UINT index, 
1496     [in] REFGUID guid, 
1497     [in] VARIANT *pVarVal);
1498
1499   HRESULT SetHelpStringContext(
1500     [in] ULONG dwHelpStringContext);
1501
1502   HRESULT SetFuncHelpStringContext(
1503     [in] UINT index,
1504     [in] ULONG dwHelpStringContext);
1505
1506   HRESULT SetVarHelpStringContext(
1507     [in] UINT index,
1508     [in] ULONG dwHelpStringContext);
1509
1510   HRESULT Invalidate();
1511
1512   HRESULT SetName(
1513     [in] LPOLESTR szName);
1514 }
1515
1516 [
1517   local,
1518   object,
1519   uuid(00020406-0000-0000-C000-000000000046),
1520   pointer_default(unique)
1521 ]
1522 interface ICreateTypeLib : IUnknown
1523 {
1524   typedef [unique] ICreateTypeLib *LPCREATETYPELIB;
1525
1526   HRESULT CreateTypeInfo(
1527     [in] LPOLESTR szName,
1528     [in] TYPEKIND tkind,
1529     [out] ICreateTypeInfo **ppCTInfo);
1530
1531   HRESULT SetName(
1532     [in] LPOLESTR szName);
1533
1534   HRESULT SetVersion(
1535     [in] WORD wMajorVerNum,
1536     [in] WORD wMinorVerNum);
1537
1538   HRESULT SetGuid(
1539     [in] REFGUID guid);
1540
1541   HRESULT SetDocString(
1542     [in] LPOLESTR szDoc);
1543
1544   HRESULT SetHelpFileName(
1545     [in] LPOLESTR szHelpFileName);
1546
1547   HRESULT SetHelpContext(
1548     [in] DWORD dwHelpContext);
1549
1550   HRESULT SetLcid(
1551     [in] LCID lcid);
1552
1553   HRESULT SetLibFlags(
1554     [in] UINT uLibFlags);
1555
1556   HRESULT SaveAllChanges();
1557 }
1558
1559 [
1560   local,
1561   object,
1562   uuid(0002040F-0000-0000-C000-000000000046),
1563   pointer_default(unique)
1564 ]
1565 interface ICreateTypeLib2 : ICreateTypeLib
1566 {
1567   typedef [unique] ICreateTypeLib2 *LPCREATETYPELIB2;
1568
1569   HRESULT DeleteTypeInfo(
1570     [in] LPOLESTR szName);
1571
1572   HRESULT SetCustData(
1573     [in] REFGUID guid,
1574     [in] VARIANT *pVarVal);
1575
1576   HRESULT SetHelpStringContext(
1577     [in] ULONG dwHelpStringContext);
1578
1579   HRESULT SetHelpStringDll(
1580     [in] LPOLESTR szFileName);
1581 }
1582
1583
1584 /*****************************************************************************
1585  * IErrorLog interface
1586  */
1587 [
1588   object,
1589   uuid(3127ca40-446e-11ce-8135-00aa004bb851),
1590   pointer_default(unique)
1591 ]
1592 interface IErrorLog : IUnknown
1593 {
1594   typedef IErrorLog *LPERRORLOG;
1595
1596   HRESULT AddError(
1597     [in] LPCOLESTR pszPropName,
1598     [in] EXCEPINFO *pExcepInfo);
1599 }
1600
1601
1602 /*****************************************************************************
1603  * IPropertyBag interface
1604  */
1605 [
1606   object,
1607   uuid(55272a00-42cb-11ce-8135-00aa004bb851),
1608   pointer_default(unique)
1609 ]
1610 interface IPropertyBag : IUnknown
1611 {
1612   typedef IPropertyBag *LPPROPERTYBAG;
1613
1614   [local]
1615   HRESULT Read(
1616     [in] LPCOLESTR pszPropName,
1617     [in, out] VARIANT *pVar,
1618     [in] IErrorLog *pErrorLog);
1619
1620   [call_as(Read)]
1621   HRESULT RemoteRead(
1622     [in] LPCOLESTR pszPropName,
1623     [out] VARIANT *pVar,
1624     [in] IErrorLog *pErrorLog,
1625     [in] DWORD varType,
1626     [in] IUnknown *pUnkObj);
1627
1628   HRESULT Write(
1629     [in] LPCOLESTR pszPropName,
1630     [in] VARIANT *pVar);
1631 }