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