include: Fix the C_ASSERT macro to not generate an unused variable warning when compi...
[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   };
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   };
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   };
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   } SYSKIND;
994
995   typedef [v1_enum] enum tagLIBFLAGS {
996     LIBFLAG_FRESTRICTED   = 0x01,
997     LIBFLAG_FCONTROL      = 0x02,
998     LIBFLAG_FHIDDEN       = 0x04,
999     LIBFLAG_FHASDISKIMAGE = 0x08
1000   } LIBFLAGS;
1001
1002   typedef struct tagTLIBATTR {
1003     GUID guid;
1004     LCID lcid;
1005     SYSKIND syskind;
1006     WORD wMajorVerNum;
1007     WORD wMinorVerNum;
1008     WORD wLibFlags;
1009   } TLIBATTR, *LPTLIBATTR;
1010
1011   [local]
1012   UINT GetTypeInfoCount();
1013
1014   [call_as(GetTypeInfoCount)]
1015   HRESULT RemoteGetTypeInfoCount(
1016     [out] UINT *pcTInfo);
1017
1018   HRESULT GetTypeInfo(
1019     [in] UINT index,
1020     [out] ITypeInfo **ppTInfo);
1021
1022   HRESULT GetTypeInfoType(
1023     [in] UINT index,
1024     [out] TYPEKIND *pTKind);
1025
1026   HRESULT GetTypeInfoOfGuid(
1027     [in] REFGUID guid,
1028     [out] ITypeInfo **ppTinfo);
1029
1030   [local]
1031   HRESULT GetLibAttr(
1032     [out] TLIBATTR **ppTLibAttr);
1033
1034   [call_as(GetLibAttr)]
1035   HRESULT RemoteGetLibAttr(
1036     [out] LPTLIBATTR *ppTLibAttr,
1037     [out] CLEANLOCALSTORAGE *pDummy);
1038
1039   HRESULT GetTypeComp(
1040     [out] ITypeComp **ppTComp);
1041
1042   [local]
1043   HRESULT GetDocumentation(
1044     [in] INT index,
1045     [out] BSTR *pBstrName,
1046     [out] BSTR *pBstrDocString,
1047     [out] DWORD *pdwHelpContext,
1048     [out] BSTR *pBstrHelpFile);
1049
1050   [call_as(GetDocumentation)]
1051   HRESULT RemoteGetDocumentation(
1052     [in] INT index,
1053     [in] DWORD refPtrFlags,
1054     [out] BSTR *pBstrName,
1055     [out] BSTR *pBstrDocString,
1056     [out] DWORD *pdwHelpContext,
1057     [out] BSTR *pBstrHelpFile);
1058
1059   [local]
1060   HRESULT IsName(
1061     [in, out] LPOLESTR szNameBuf,
1062     [in] ULONG lHashVal,
1063     [out] BOOL *pfName);
1064
1065   [call_as(IsName)]
1066   HRESULT RemoteIsName(
1067     [in] LPOLESTR szNameBuf,
1068     [in] ULONG lHashVal,
1069     [out] BOOL *pfName,
1070     [out] BSTR *pBstrLibName);
1071
1072   [local]
1073   HRESULT FindName(
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);
1079
1080   [call_as(FindName)]
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);
1088
1089   [local]
1090   void ReleaseTLibAttr(
1091     [in] TLIBATTR *pTLibAttr);
1092
1093   [call_as(ReleaseTLibAttr)]
1094   HRESULT LocalReleaseTLibAttr();
1095 }
1096
1097 [
1098   object,
1099   uuid(00020411-0000-0000-C000-000000000046),
1100   pointer_default(unique)
1101 ]
1102 interface ITypeLib2 : ITypeLib
1103 {
1104   typedef [unique] ITypeLib2 *LPTYPELIB2;
1105
1106   HRESULT GetCustData(
1107     [in] REFGUID guid,
1108     [out] VARIANT *pVarVal);
1109
1110   [local]
1111   HRESULT GetLibStatistics(
1112     [out] ULONG *pcUniqueNames,
1113     [out] ULONG *pcchUniqueNames);
1114
1115   [call_as(GetLibStatistics)]
1116   HRESULT RemoteGetLibStatistics(
1117     [out] ULONG *pcUniqueNames,
1118     [out] ULONG *pcchUniqueNames);
1119
1120   [local]
1121   HRESULT GetDocumentation2(
1122     [in] INT index,
1123     [in] LCID lcid,
1124     [out] BSTR *pbstrHelpString,
1125     [out] DWORD *pdwHelpStringContext,
1126     [out] BSTR *pbstrHelpStringDll);
1127
1128   [call_as(GetDocumentation2)]
1129   HRESULT RemoteGetDocumentation2(
1130     [in] INT index,
1131     [in] LCID lcid,
1132     [in] DWORD refPtrFlags,
1133     [out] BSTR *pbstrHelpString,
1134     [out] DWORD *pdwHelpStringContext,
1135     [out] BSTR *pbstrHelpStringDll);
1136
1137   HRESULT GetAllCustData(
1138     [out] CUSTDATA *pCustData);
1139 }
1140
1141 [
1142   local,
1143   object,
1144   uuid(00020410-0000-0000-C000-000000000046),
1145   pointer_default(unique)
1146 ]
1147 interface ITypeChangeEvents : IUnknown
1148 {
1149   typedef [unique] ITypeChangeEvents *LPTYPECHANGEEVENTS;
1150
1151   typedef enum tagCHANGEKIND {
1152     CHANGEKIND_ADDMEMBER,
1153     CHANGEKIND_DELETEMEMBER,
1154     CHANGEKIND_SETNAMES,
1155     CHANGEKIND_SETDOCUMENTATION,
1156     CHANGEKIND_GENERAL,
1157     CHANGEKIND_INVALIDATE,
1158     CHANGEKIND_CHANGEFAILED,
1159     CHANGEKIND_MAX
1160   } CHANGEKIND;
1161
1162   HRESULT RequestTypeChange(
1163     [in] CHANGEKIND changeKind,
1164     [in] ITypeInfo *pTInfoBefore,
1165     [in] LPOLESTR pStrName,
1166     [out] INT *pfCancel);
1167   
1168   HRESULT AfterTypeChange(
1169     [in] CHANGEKIND changeKind,
1170     [in] ITypeInfo *pTInfoAfter,
1171     [in] LPOLESTR pStrName);
1172 }
1173
1174 [
1175   object,
1176   uuid(1CF2B120-547D-101B-8E65-08002B2BD119),
1177   pointer_default(unique)
1178 ]
1179 interface IErrorInfo : IUnknown
1180 {
1181   typedef [unique] IErrorInfo *LPERRORINFO;
1182
1183   HRESULT GetGUID(
1184     [out] GUID *pGUID);
1185
1186   HRESULT GetSource(
1187     [out] BSTR *pBstrSource);
1188
1189   HRESULT GetDescription(
1190     [out] BSTR *pBstrDescription);
1191
1192   HRESULT GetHelpFile(
1193     [out] BSTR *pBstrHelpFile);
1194
1195   HRESULT GetHelpContext(
1196     [out] DWORD *pdwHelpContext);
1197 }
1198
1199 [
1200   object,
1201   uuid(22F03340-547D-101B-8E65-08002B2BD119),
1202   pointer_default(unique)
1203 ]
1204 interface ICreateErrorInfo : IUnknown
1205 {
1206   typedef [unique] ICreateErrorInfo *LPCREATEERRORINFO;
1207
1208   HRESULT SetGUID(
1209     [in] REFGUID rguid);
1210
1211   HRESULT SetSource(
1212     [in] LPOLESTR szSource);
1213
1214   HRESULT SetDescription(
1215     [in] LPOLESTR szDescription);
1216
1217   HRESULT SetHelpFile(
1218     [in] LPOLESTR szHelpFile);
1219
1220   HRESULT SetHelpContext(
1221     [in] DWORD dwHelpContext);
1222 }
1223
1224 [
1225   object,
1226   uuid(DF0B3D60-548F-101B-8E65-08002B2BD119),
1227   pointer_default(unique)
1228 ]
1229 interface ISupportErrorInfo : IUnknown
1230 {
1231   typedef [unique] ISupportErrorInfo *LPSUPPORTERRORINFO;
1232
1233   HRESULT InterfaceSupportsErrorInfo(
1234     [in] REFIID riid);
1235 }
1236
1237 [
1238   object,
1239   uuid(0000002E-0000-0000-C000-000000000046)
1240 ]
1241 interface ITypeFactory : IUnknown
1242 {
1243   HRESULT CreateFromTypeInfo(
1244     [in] ITypeInfo *pTypeInfo,
1245     [in] REFIID riid,
1246     [out, iid_is(riid)] IUnknown **ppv);
1247 }
1248
1249 [
1250   local,
1251   object,
1252   uuid(0000002D-0000-0000-C000-000000000046)
1253 ]
1254 interface ITypeMarshal : IUnknown
1255 {
1256   HRESULT Size(
1257     [in] PVOID pvType,
1258     [in] DWORD dwDestContext,
1259     [in] PVOID pvDestContext,
1260     [out] ULONG *pSize);
1261
1262   HRESULT Marshal(
1263     [in] PVOID pvType,
1264     [in] DWORD dwDestContext,
1265     [in] PVOID pvDestContext,
1266     [in] ULONG cbBufferLength,
1267     [out] BYTE *pBuffer,
1268     [out] ULONG *pcbWritten);
1269
1270   HRESULT Unmarshal(
1271     [out] PVOID pvType,
1272     [in] DWORD dwFlags,
1273     [in] ULONG cbBufferLength,
1274     [in] BYTE *pBuffer,
1275     [out] ULONG *pcbRead);
1276
1277   HRESULT Free(
1278     [in] PVOID pvType);
1279 }
1280
1281 [
1282   local,
1283   object,
1284   uuid(0000002F-0000-0000-C000-000000000046)
1285 ]
1286 interface IRecordInfo : IUnknown
1287 {
1288   typedef [unique] IRecordInfo *LPRECORDINFO;
1289
1290   HRESULT RecordInit(
1291     [out] PVOID pvNew);
1292
1293   HRESULT RecordClear(
1294     [in] PVOID pvExisting);
1295
1296   HRESULT RecordCopy(
1297     [in] PVOID pvExisting,
1298     [out] PVOID pvNew);
1299
1300   HRESULT GetGuid(
1301     [out] GUID *pguid);
1302
1303   HRESULT GetName(
1304     [out] BSTR *pbstrName);
1305
1306   HRESULT GetSize(
1307     [out] ULONG *pcbSize);
1308
1309   HRESULT GetTypeInfo(
1310     [out] ITypeInfo **ppTypeInfo);
1311
1312   HRESULT GetField(
1313     [in] PVOID pvData,
1314     [in] LPCOLESTR szFieldName,
1315     [out] VARIANT *pvarField);
1316
1317   HRESULT GetFieldNoCopy(
1318     [in] PVOID pvData,
1319     [in] LPCOLESTR szFieldName,
1320     [out] VARIANT *pvarField,
1321     [out] PVOID *ppvDataCArray);
1322
1323   HRESULT PutField(
1324     [in] ULONG wFlags,
1325     [in, out] PVOID pvData,
1326     [in] LPCOLESTR szFieldName,
1327     [in] VARIANT *pvarField);
1328
1329   HRESULT PutFieldNoCopy(
1330     [in] ULONG wFlags,
1331     [in, out] PVOID pvData,
1332     [in] LPCOLESTR szFieldName,
1333     [in] VARIANT *pvarField);
1334
1335   HRESULT GetFieldNames(
1336     [in, out] ULONG *pcNames,
1337     [out, size_is(*pcNames), length_is(*pcNames)] BSTR *rgBstrNames);
1338
1339   BOOL IsMatchingType(
1340     [in] IRecordInfo *pRecordInfo);
1341
1342   PVOID RecordCreate();
1343
1344   HRESULT RecordCreateCopy(
1345     [in] PVOID pvSource,
1346     [out] PVOID *ppvDest);
1347
1348   HRESULT RecordDestroy(
1349     [in] PVOID pvRecord);
1350 }
1351
1352 [
1353   local,
1354   object,
1355   uuid(00020405-0000-0000-C000-000000000046),
1356   pointer_default(unique)
1357 ]
1358 interface ICreateTypeInfo : IUnknown
1359 {
1360   typedef [unique] ICreateTypeInfo *LPCREATETYPEINFO;
1361
1362   HRESULT SetGuid(
1363     [in] REFGUID guid);
1364
1365   HRESULT SetTypeFlags(
1366     [in] UINT uTypeFlags);
1367
1368   HRESULT SetDocString(
1369     [in] LPOLESTR pStrDoc);
1370
1371   HRESULT SetHelpContext(
1372     [in] DWORD dwHelpContext);
1373
1374   HRESULT SetVersion(
1375     [in] WORD wMajorVerNum,
1376     [in] WORD wMinorVerNum);
1377
1378   HRESULT AddRefTypeInfo(
1379     [in] ITypeInfo *pTInfo,
1380     [in] HREFTYPE *phRefType);
1381
1382   HRESULT AddFuncDesc(
1383     [in] UINT index,
1384     [in] FUNCDESC *pFuncDesc);
1385
1386   HRESULT AddImplType(
1387     [in] UINT index,
1388     [in] HREFTYPE hRefType);
1389
1390   HRESULT SetImplTypeFlags(
1391     [in] UINT index,
1392     [in] INT implTypeFlags);
1393
1394   HRESULT SetAlignment(
1395     [in] WORD cbAlignment);
1396
1397   HRESULT SetSchema(
1398     [in] LPOLESTR pStrSchema);
1399
1400   HRESULT AddVarDesc(
1401     [in] UINT index,
1402     [in] VARDESC *pVarDesc);
1403
1404   HRESULT SetFuncAndParamNames(
1405     [in] UINT index,
1406     [in, size_is(cNames)] LPOLESTR *rgszNames,
1407     [in] UINT cNames);
1408
1409   HRESULT SetVarName(
1410     [in] UINT index,
1411     [in] LPOLESTR szName);
1412
1413   HRESULT SetTypeDescAlias(
1414     [in] TYPEDESC *pTDescAlias);
1415
1416   HRESULT DefineFuncAsDllEntry(
1417     [in] UINT index,
1418     [in] LPOLESTR szDllName,
1419     [in] LPOLESTR szProcName);
1420
1421   HRESULT SetFuncDocString(
1422     [in] UINT index,
1423     [in] LPOLESTR szDocString);
1424
1425   HRESULT SetVarDocString(
1426     [in] UINT index,
1427     [in] LPOLESTR szDocString);
1428
1429   HRESULT SetFuncHelpContext(
1430     [in] UINT index,
1431     [in] DWORD dwHelpContext);
1432
1433   HRESULT SetVarHelpContext(
1434     [in] UINT index,
1435     [in] DWORD dwHelpContext);
1436
1437   HRESULT SetMops(
1438     [in] UINT index,
1439     [in] BSTR bstrMops);
1440
1441   HRESULT SetTypeIdldesc(
1442     [in] IDLDESC * pIdlDesc);
1443
1444   HRESULT LayOut();
1445 }
1446
1447 [
1448   local,
1449   object,
1450   uuid(0002040E-0000-0000-C000-000000000046),
1451   pointer_default(unique)
1452 ]
1453 interface ICreateTypeInfo2 : ICreateTypeInfo
1454 {
1455   typedef [unique] ICreateTypeInfo2 *LPCREATETYPEINFO2;
1456
1457   HRESULT DeleteFuncDesc(
1458     [in] UINT index);
1459
1460   HRESULT DeleteFuncDescByMemId(
1461     [in] MEMBERID memid,
1462     [in] INVOKEKIND invKind);
1463
1464   HRESULT DeleteVarDesc(
1465     [in] UINT index);
1466
1467   HRESULT DeleteVarDescByMemId(
1468     [in] MEMBERID memid);
1469
1470   HRESULT DeleteImplType(
1471     [in] UINT index);
1472
1473   HRESULT SetCustData(
1474     [in] REFGUID guid,
1475     [in] VARIANT *pVarVal);
1476
1477   HRESULT SetFuncCustData( 
1478     [in] UINT index, 
1479     [in] REFGUID guid, 
1480     [in] VARIANT *pVarVal);
1481   
1482   HRESULT SetParamCustData( 
1483     [in] UINT indexFunc, 
1484     [in] UINT indexParam, 
1485     [in] REFGUID guid, 
1486     [in] VARIANT *pVarVal);
1487
1488   HRESULT SetVarCustData( 
1489     [in] UINT index, 
1490     [in] REFGUID guid, 
1491     [in] VARIANT *pVarVal);
1492
1493   HRESULT SetImplTypeCustData( 
1494     [in] UINT index, 
1495     [in] REFGUID guid, 
1496     [in] VARIANT *pVarVal);
1497
1498   HRESULT SetHelpStringContext(
1499     [in] ULONG dwHelpStringContext);
1500
1501   HRESULT SetFuncHelpStringContext(
1502     [in] UINT index,
1503     [in] ULONG dwHelpStringContext);
1504
1505   HRESULT SetVarHelpStringContext(
1506     [in] UINT index,
1507     [in] ULONG dwHelpStringContext);
1508
1509   HRESULT Invalidate();
1510
1511   HRESULT SetName(
1512     [in] LPOLESTR szName);
1513 }
1514
1515 [
1516   local,
1517   object,
1518   uuid(00020406-0000-0000-C000-000000000046),
1519   pointer_default(unique)
1520 ]
1521 interface ICreateTypeLib : IUnknown
1522 {
1523   typedef [unique] ICreateTypeLib *LPCREATETYPELIB;
1524
1525   HRESULT CreateTypeInfo(
1526     [in] LPOLESTR szName,
1527     [in] TYPEKIND tkind,
1528     [out] ICreateTypeInfo **ppCTInfo);
1529
1530   HRESULT SetName(
1531     [in] LPOLESTR szName);
1532
1533   HRESULT SetVersion(
1534     [in] WORD wMajorVerNum,
1535     [in] WORD wMinorVerNum);
1536
1537   HRESULT SetGuid(
1538     [in] REFGUID guid);
1539
1540   HRESULT SetDocString(
1541     [in] LPOLESTR szDoc);
1542
1543   HRESULT SetHelpFileName(
1544     [in] LPOLESTR szHelpFileName);
1545
1546   HRESULT SetHelpContext(
1547     [in] DWORD dwHelpContext);
1548
1549   HRESULT SetLcid(
1550     [in] LCID lcid);
1551
1552   HRESULT SetLibFlags(
1553     [in] UINT uLibFlags);
1554
1555   HRESULT SaveAllChanges();
1556 }
1557
1558 [
1559   local,
1560   object,
1561   uuid(0002040F-0000-0000-C000-000000000046),
1562   pointer_default(unique)
1563 ]
1564 interface ICreateTypeLib2 : ICreateTypeLib
1565 {
1566   typedef [unique] ICreateTypeLib2 *LPCREATETYPELIB2;
1567
1568   HRESULT DeleteTypeInfo(
1569     [in] LPOLESTR szName);
1570
1571   HRESULT SetCustData(
1572     [in] REFGUID guid,
1573     [in] VARIANT *pVarVal);
1574
1575   HRESULT SetHelpStringContext(
1576     [in] ULONG dwHelpStringContext);
1577
1578   HRESULT SetHelpStringDll(
1579     [in] LPOLESTR szFileName);
1580 }
1581
1582
1583 /*****************************************************************************
1584  * IErrorLog interface
1585  */
1586 [
1587   object,
1588   uuid(3127ca40-446e-11ce-8135-00aa004bb851),
1589   pointer_default(unique)
1590 ]
1591 interface IErrorLog : IUnknown
1592 {
1593   typedef IErrorLog *LPERRORLOG;
1594
1595   HRESULT AddError(
1596     [in] LPCOLESTR pszPropName,
1597     [in] EXCEPINFO *pExcepInfo);
1598 }
1599
1600
1601 /*****************************************************************************
1602  * IPropertyBag interface
1603  */
1604 [
1605   object,
1606   uuid(55272a00-42cb-11ce-8135-00aa004bb851),
1607   pointer_default(unique)
1608 ]
1609 interface IPropertyBag : IUnknown
1610 {
1611   typedef IPropertyBag *LPPROPERTYBAG;
1612
1613   [local]
1614   HRESULT Read(
1615     [in] LPCOLESTR pszPropName,
1616     [in, out] VARIANT *pVar,
1617     [in] IErrorLog *pErrorLog);
1618
1619   [call_as(Read)]
1620   HRESULT RemoteRead(
1621     [in] LPCOLESTR pszPropName,
1622     [out] VARIANT *pVar,
1623     [in] IErrorLog *pErrorLog,
1624     [in] DWORD varType,
1625     [in] IUnknown *pUnkObj);
1626
1627   HRESULT Write(
1628     [in] LPCOLESTR pszPropName,
1629     [in] VARIANT *pVar);
1630 }