Moved to new trace interface.
[wine] / include / wine / obj_oleaut.h
1 /*
2  * Defines the COM interfaces and APIs related to OLE automation support.
3  */
4
5 #ifndef __WINE_WINE_OBJ_OLEAUT_H
6 #define __WINE_WINE_OBJ_OLEAUT_H
7
8 #include "wine/obj_base.h"
9
10 /*****************************************************************************
11  * Predeclare the interfaces
12  */
13 DEFINE_OLEGUID(IID_IDispatch,       0x00020400,0,0);
14 typedef struct IDispatch IDispatch,*LPDISPATCH;
15
16 DEFINE_OLEGUID(IID_ITypeInfo,       0x00020401,0,0);
17 typedef struct ITypeInfo ITypeInfo,*LPTYPEINFO;
18
19 DEFINE_OLEGUID(IID_ITypeLib,        0x00020402,0,0);
20 typedef struct ITypeLib ITypeLib,*LPTYPELIB;
21
22 DEFINE_OLEGUID(IID_ITypeComp,       0x00020403,0,0);
23 typedef struct ITypeComp ITypeComp,*LPTYPECOMP;
24
25 DEFINE_OLEGUID(IID_IEnumVARIANT,    0x00020404,0,0);
26 typedef struct IEnumVARIANT IEnumVARIANT,*LPENUMVARIANT;
27
28 DEFINE_OLEGUID(IID_ICreateTypeInfo, 0x00020405,0,0);
29 typedef struct ICreateTypeInfo ICreateTypeInfo,*LPCREATETYPEINFO;
30
31 DEFINE_OLEGUID(IID_ICreateTypeLib,  0x00020406,0,0);
32 typedef struct ICreateTypeLib ICreateTypeLib,*LPCREATETYPELIB;
33
34 DEFINE_OLEGUID(IID_ICreateTypeInfo2,0x0002040E,0,0);
35 typedef struct ICreateTypeInfo2 ICreateTypeInfo2,*LPCREATETYPEINFO2;
36
37 DEFINE_OLEGUID(IID_ICreateTypeLib2, 0x0002040F,0,0);
38 typedef struct ICreateTypeLib2 ICreateTypeLib2,*LPCREATETYPELIB2;
39
40 DEFINE_OLEGUID(IID_ITypeChangeEvents,0x00020410,0,0);
41 typedef struct ITypeChangeEvents ITypeChangeEvents,*LPTYPECHANGEEVENTS;
42
43 DEFINE_OLEGUID(IID_ITypeLib2,       0x00020411,0,0);
44 typedef struct ITypeLib2 ITypeLib2,*LPTYPELIB2;
45
46 DEFINE_OLEGUID(IID_ITypeInfo2,      0x00020412,0,0);
47 typedef struct ITypeInfo2 ITypeInfo2,*LPTYPEINFO2;
48
49 DEFINE_GUID(IID_IErrorInfo,         0x1CF2B120,0x547D,0x101B,0x8E,0x65,
50         0x08,0x00, 0x2B,0x2B,0xD1,0x19);
51 typedef struct IErrorInfo IErrorInfo,*LPERRORINFO;
52
53 DEFINE_GUID(IID_ICreateErrorInfo,   0x22F03340,0x547D,0x101B,0x8E,0x65,
54         0x08,0x00, 0x2B,0x2B,0xD1,0x19);
55 typedef struct ICreateErrorInfo ICreateErrorInfo,*LPCREATEERRORINFO;
56
57 DEFINE_GUID(IID_ISupportErrorInfo,  0xDF0B3D60,0x547D,0x101B,0x8E,0x65,
58         0x08,0x00, 0x2B,0x2B,0xD1,0x19);
59 typedef struct ISupportErrorInfo ISupportErrorInfo,*LPSUPPORTERRORINFO;
60
61 /*****************************************************************************
62  * Automation data types
63  */
64 #ifdef __cplusplus
65 #define DUMMY_UNION_NAME 
66 #else
67 #define DUMMY_UNION_NAME u
68 #endif
69
70 /*****************************************************************
71  *  SafeArray defines and structs 
72  */
73
74 #define FADF_AUTO       ( 0x1 )
75 #define FADF_STATIC     ( 0x2 )
76 #define FADF_EMBEDDED   ( 0x4 )
77 #define FADF_FIXEDSIZE  ( 0x10 )
78 #define FADF_BSTR       ( 0x100 )
79 #define FADF_UNKNOWN    ( 0x200 )
80 #define FADF_DISPATCH   ( 0x400 )
81 #define FADF_VARIANT    ( 0x800 )
82 #define FADF_RESERVED   ( 0xf0e8 )
83
84 typedef struct  tagSAFEARRAYBOUND 
85 {
86   ULONG cElements;                  /* Number of elements in dimension */
87   LONG  lLbound;                    /* Lower bound of dimension */
88 } SAFEARRAYBOUND;
89
90 typedef struct  tagSAFEARRAY
91
92   USHORT          cDims;            /* Count of array dimension */
93   USHORT          fFeatures;        /* Flags describing the array */
94   ULONG           cbElements;       /* Size of each element */
95   ULONG           cLocks;           /* Number of lock on array */
96   PVOID           pvData;           /* Pointer to data valid when cLocks > 0 */
97   SAFEARRAYBOUND  rgsabound[ 1 ];   /* One bound for each dimension */
98 } SAFEARRAY, *LPSAFEARRAY;
99
100 typedef enum tagCALLCONV {
101         CC_CDECL    = 1,
102         CC_MSCPASCAL  = CC_CDECL + 1,
103         CC_PASCAL   = CC_MSCPASCAL,
104         CC_MACPASCAL  = CC_PASCAL + 1,
105         CC_STDCALL    = CC_MACPASCAL + 1,
106         CC_RESERVED   = CC_STDCALL + 1,
107         CC_SYSCALL    = CC_RESERVED + 1,
108         CC_MPWCDECL   = CC_SYSCALL + 1,
109         CC_MPWPASCAL  = CC_MPWCDECL + 1,
110         CC_MAX    = CC_MPWPASCAL + 1
111 } CALLCONV;
112
113 typedef CY CURRENCY;
114
115 /*
116  * Declarations of the VARIANT structure and the VARIANT APIs.
117  */
118 /* S_OK                            : Success.
119  * DISP_E_BADVARTYPE   : The variant type vt in not a valid type of variant.
120  * DISP_E_OVERFLOW         : The data pointed to by pvarSrc does not fit in the destination type.
121  * DISP_E_TYPEMISMATCH : The variant type vt is not a valid type of variant.
122  * E_INVALIDARG            : One argument is invalid.
123  * * E_OUTOFMEMORY     : Memory could not be allocated for the conversion.
124  * DISP_E_ARRAYISLOCKED : The variant contains an array that is locked.
125  */
126
127 typedef struct tagVARIANT VARIANT, *LPVARIANT;
128 typedef struct tagVARIANT VARIANTARG, *LPVARIANTARG;
129
130 struct tagVARIANT {
131         VARTYPE vt;
132         WORD wReserved1;
133         WORD wReserved2;
134         WORD wReserved3;
135         union /*DUMMY_UNION_NAME*/
136         {
137         /* By value. */
138                 CHAR cVal;
139                 USHORT uiVal;
140                 ULONG ulVal;
141                 INT intVal;
142                 UINT uintVal;
143                 BYTE bVal;
144                 short iVal;
145                 long lVal;
146                 float fltVal;
147                 double dblVal;
148                 VARIANT_BOOL boolVal;
149                 SCODE scode;
150                 DATE date;
151                 BSTR bstrVal;
152                 CY cyVal;
153                 /* DECIMAL decVal; */
154                 IUnknown* punkVal;
155                 IDispatch* pdispVal;
156                 SAFEARRAY* parray;
157
158                 /* By reference */
159                 CHAR* pcVal;
160                 USHORT* puiVal;
161                 ULONG* pulVal;
162                 INT* pintVal;
163                 UINT* puintVal;
164                 BYTE* pbVal;
165                 short* piVal;
166                 long* plVal;
167                 float* pfltVal;
168                 double* pdblVal;
169                 VARIANT_BOOL* pboolVal;
170                 SCODE* pscode;
171                 DATE* pdate;
172                 BSTR* pbstrVal;
173                 VARIANT* pvarVal;
174                 PVOID byref;
175                 CY* pcyVal;
176           /* DECIMAL* pdecVal; */
177                 IUnknown** ppunkVal;
178                 IDispatch** ppdispVal;
179                 SAFEARRAY** pparray;
180         } DUMMY_UNION_NAME;
181 };
182
183              
184 typedef LONG DISPID;
185 typedef DWORD HREFTYPE;
186 typedef DISPID MEMBERID;
187
188 #define DISPATCH_METHOD         0x1
189 #define DISPATCH_PROPERTYGET    0x2
190 #define DISPATCH_PROPERTYPUT    0x4
191 #define DISPATCH_PROPERTYPUTREF 0x8
192
193 #define DISPID_UNKNOWN  ( -1 )
194 #define DISPID_VALUE  ( 0 )
195 #define DISPID_PROPERTYPUT  ( -3 )
196 #define DISPID_NEWENUM  ( -4 )
197 #define DISPID_EVALUATE ( -5 )
198 #define DISPID_CONSTRUCTOR  ( -6 )
199 #define DISPID_DESTRUCTOR ( -7 )
200 #define DISPID_COLLECT  ( -8 )
201
202 #define MEMBERID_NIL DISPID_UNKNOWN
203
204 #define IMPLTYPEFLAG_FDEFAULT         (0x1)
205 #define IMPLTYPEFLAG_FSOURCE          (0x2)
206 #define IMPLTYPEFLAG_FRESTRICTED      (0x4)
207 #define IMPLTYPEFLAG_FDEFAULTVTABLE   (0x8)
208
209 typedef struct  tagDISPPARAMS
210 {
211   VARIANTARG* rgvarg;
212   DISPID*     rgdispidNamedArgs;
213   UINT      cArgs;
214   UINT      cNamedArgs;
215 } DISPPARAMS;
216
217 typedef struct tagEXCEPINFO 
218 {
219     WORD  wCode;
220     WORD  wReserved;
221     BSTR  bstrSource;
222     BSTR  bstrDescription;
223     BSTR  bstrHelpFile;
224     DWORD dwHelpContext;
225     PVOID pvReserved;
226     HRESULT (__stdcall *pfnDeferredFillIn)(struct tagEXCEPINFO *);
227     SCODE scode;
228 } EXCEPINFO, * LPEXCEPINFO;
229
230 typedef struct tagIDLDESC
231 {
232         ULONG dwReserved;
233         USHORT wIDLFlags;
234 } IDLDESC;
235
236 typedef struct tagPARAMDESCEX
237 {
238         ULONG cBytes;
239         VARIANTARG varDefaultValue;
240 } PARAMDESCEX, *LPPARAMDESCEX;
241
242 typedef struct tagPARAMDESC
243 {
244         LPPARAMDESCEX pparamdescex;
245         USHORT wParamFlags;
246 } PARAMDESC;
247
248 #define PARAMFLAG_NONE          (0x00)
249 #define PARAMFLAG_FIN           (0x01)
250 #define PARAMFLAG_FOUT          (0x02)
251 #define PARAMFLAG_FLCID         (0x04)
252 #define PARAMFLAG_FRETVAL       (0x08)
253 #define PARAMFLAG_FOPT          (0x10)
254 #define PARAMFLAG_FHASDEFAULT   (0x20)
255
256
257 typedef struct tagTYPEDESC
258 {
259         union {
260                 struct tagTYPEDESC *lptdesc;
261                 struct tagARRAYDESC *lpadesc;
262                 HREFTYPE hreftype;
263         } DUMMY_UNION_NAME;
264         VARTYPE vt;
265 } TYPEDESC;
266  
267 typedef struct tagELEMDESC
268 {
269         TYPEDESC tdesc;
270         union {
271                 IDLDESC idldesc;
272                 PARAMDESC paramdesc;
273         } DUMMY_UNION_NAME;
274 } ELEMDESC, *LPELEMDESC;
275
276 typedef enum tagTYPEKIND
277 {
278         TKIND_ENUM = 0,
279         TKIND_RECORD = 1,
280         TKIND_MODULE = 2,
281         TKIND_INTERFACE = 3,
282         TKIND_DISPATCH = 4,
283         TKIND_COCLASS = 5,
284         TKIND_ALIAS = 6,
285         TKIND_UNION = 7,
286         TKIND_MAX = 8
287 } TYPEKIND;
288
289 typedef struct tagTYPEATTR
290 {
291         GUID guid;
292         LCID lcid;
293         DWORD dwReserved;
294         MEMBERID memidConstructor;
295         MEMBERID memidDestructor;
296         LPOLESTR lpstrSchema;
297         ULONG cbSizeInstance;
298         TYPEKIND typekind;
299         WORD cFuncs;
300         WORD cVars;
301         WORD cImplTypes;
302         WORD cbSizeVft;
303         WORD cbAlignment;
304         WORD wTypeFlags;
305         WORD wMajorVerNum;
306         WORD wMinorVerNum;
307         TYPEDESC tdescAlias;
308         IDLDESC idldescType;
309 } TYPEATTR, *LPTYPEATTR;
310
311 typedef struct tagARRAYDESC
312 {
313         TYPEDESC tdescElem;
314         USHORT cDims;
315         SAFEARRAYBOUND rgbounds[1];
316 } ARRAYDESC;
317
318 typedef enum tagFUNCKIND
319 {
320         FUNC_VIRTUAL = 0,
321         FUNC_PUREVIRTUAL = 1,
322         FUNC_NONVIRTUAL = 2,
323         FUNC_STATIC = 3,
324         FUNC_DISPATCH = 4
325 } FUNCKIND;
326
327 typedef enum tagINVOKEKIND
328 {
329         INVOKE_FUNC = 1,
330         INVOKE_PROPERTYGET = 2,
331         INVOKE_PROPERTYPUT = 3,
332         INVOKE_PROPERTYPUTREF = 4
333 } INVOKEKIND;
334
335 typedef struct tagFUNCDESC
336 {
337         MEMBERID memid;
338         SCODE *lprgscode;
339         ELEMDESC *lprgelemdescParam;
340         FUNCKIND funckind;
341         INVOKEKIND invkind;
342         CALLCONV callconv;
343         SHORT cParams;
344         SHORT cParamsOpt;
345         SHORT oVft;
346         SHORT cScodes;
347         ELEMDESC elemdescFunc;
348         WORD wFuncFlags;
349 } FUNCDESC, *LPFUNCDESC;
350
351 typedef enum tagVARKIND
352 {
353         VAR_PERINSTANCE = 0,
354         VAR_STATIC = 1,
355         VAR_CONST = 2,
356         VAR_DISPATCH = 3
357 } VARKIND;
358
359 typedef struct tagVARDESC
360 {
361         MEMBERID memid;
362         LPOLESTR lpstrSchema;
363         union {
364                 ULONG oInst;
365                 VARIANT *lpvarValue;
366         } DUMMY_UNION_NAME;
367         ELEMDESC elemdescVar;
368         WORD wVarFlags;
369         VARKIND varkind;
370 } VARDESC, *LPVARDESC;
371
372 typedef enum tagSYSKIND
373 {
374         SYS_WIN16 = 0,
375         SYS_WIN32 = 1,
376         SYS_MAC = 2
377 } SYSKIND;
378
379 typedef enum tagLIBFLAGS
380 {
381         LIBFLAG_FRESTRICTED = 0x1,
382         LIBFLAG_FCONTROL = 0x2,
383         LIBFLAG_FHIDDEN = 0x4,
384         LIBFLAG_FHASDISKIMAGE = 0x8
385 } LIBFLAGS;
386
387 typedef struct tagTLIBATTR
388 {
389         GUID guid;
390         LCID lcid;
391         SYSKIND syskind;
392         WORD wMajorVerNum;
393         WORD wMinorVerNum;
394         WORD wLibFlags;
395 } TLIBATTR, *LPTLIBATTR;
396
397 typedef enum tagDESCKIND
398 {
399         DESCKIND_NONE = 0,
400         DESCKIND_FUNCDESC = 1,
401         DESCKIND_VARDESC = 2,
402         DESCKIND_TYPECOMP = 3,
403         DESCKIND_IMPLICITAPPOBJ = 4,
404         DESCKIND_MAX = 6
405 } DESCKIND;
406
407 typedef union tagBINDPTR
408 {
409         FUNCDESC *lpfuncdesc;
410         VARDESC  *lpvardesc;
411         ITypeComp *lptcomp;
412 } BINDPTR, *LPBINDPTR;
413
414 typedef enum tagVARFLAGS
415 {
416         VARFLAG_FREADONLY = 0x1,
417         VARFLAG_FSOURCE = 0x2,
418         VARFLAG_FBINDABLE = 0x4,
419         VARFLAG_FREQUESTEDIT  = 0x8,
420         VARFLAG_FDISPLAYBIND  = 0x10,
421         VARFLAG_FDEFAULTBIND  = 0x20,
422         VARFLAG_FHIDDEN = 0x40,
423         VARFLAG_FRESTRICTED = 0x80,
424         VARFLAG_FDEFAULTCOLLELEM  = 0x100,
425         VARFLAG_FUIDEFAULT  = 0x200,
426         VARFLAG_FNONBROWSABLE = 0x400,
427         VARFLAG_FREPLACEABLE  = 0x800,
428         VARFLAG_FIMMEDIATEBIND  = 0x1000
429 } VARFLAGS;
430
431 /*****************************************************************
432  *  SafeArray defines and structs 
433  */
434
435 #define FADF_AUTO       ( 0x1 )
436 #define FADF_STATIC     ( 0x2 )
437 #define FADF_EMBEDDED   ( 0x4 )
438 #define FADF_FIXEDSIZE  ( 0x10 )
439 #define FADF_BSTR       ( 0x100 )
440 #define FADF_UNKNOWN    ( 0x200 )
441 #define FADF_DISPATCH   ( 0x400 )
442 #define FADF_VARIANT    ( 0x800 )
443 #define FADF_RESERVED   ( 0xf0e8 )
444
445 /*
446  * Data types for Variants.
447  */
448
449 enum VARENUM {
450         VT_EMPTY = 0,
451         VT_NULL = 1,
452         VT_I2 = 2,
453         VT_I4 = 3,
454         VT_R4 = 4,
455         VT_R8 = 5,
456         VT_CY = 6,
457         VT_DATE = 7,
458         VT_BSTR = 8,
459         VT_DISPATCH = 9,
460         VT_ERROR  = 10,
461         VT_BOOL = 11,
462         VT_VARIANT      = 12,
463         VT_UNKNOWN      = 13,
464         VT_DECIMAL      = 14,
465         VT_I1 = 16,
466         VT_UI1  = 17,
467         VT_UI2  = 18,
468         VT_UI4  = 19,
469         VT_I8 = 20,
470         VT_UI8  = 21,
471         VT_INT  = 22,
472         VT_UINT = 23,
473         VT_VOID = 24,
474         VT_HRESULT      = 25,
475         VT_PTR  = 26,
476         VT_SAFEARRAY  = 27,
477         VT_CARRAY = 28,
478         VT_USERDEFINED  = 29,
479         VT_LPSTR  = 30,
480         VT_LPWSTR = 31,
481         VT_FILETIME = 64,
482         VT_BLOB = 65,
483         VT_STREAM = 66,
484         VT_STORAGE      = 67,
485         VT_STREAMED_OBJECT      = 68,
486         VT_STORED_OBJECT  = 69,
487         VT_BLOB_OBJECT  = 70,
488         VT_CF = 71,
489         VT_CLSID  = 72,
490         VT_VECTOR = 0x1000,
491         VT_ARRAY  = 0x2000,
492         VT_BYREF  = 0x4000,
493         VT_RESERVED = 0x8000,
494         VT_ILLEGAL      = 0xffff,
495         VT_ILLEGALMASKED  = 0xfff,
496         VT_TYPEMASK = 0xfff
497 };
498
499 /* the largest valide type
500  */
501 #define VT_MAXVALIDTYPE VT_CLSID
502
503
504 /*
505  * Declarations of the VARIANT structure and the VARIANT APIs.
506  */
507
508 /* S_OK                            : Success.
509  * DISP_E_BADVARTYPE   : The variant type vt in not a valid type of variant.
510  * DISP_E_OVERFLOW         : The data pointed to by pvarSrc does not fit in the destination type.
511  * DISP_E_TYPEMISMATCH : The variant type vt is not a valid type of variant.
512  * E_INVALIDARG            : One argument is invalid.
513  * E_OUTOFMEMORY           : Memory could not be allocated for the conversion.
514  * DISP_E_ARRAYISLOCKED : The variant contains an array that is locked.
515  */
516
517
518 typedef struct  tagCUSTDATAITEM {
519     GUID guid;
520     VARIANTARG varValue;
521 } CUSTDATAITEM, *LPCUSTDATAITEM;
522
523 typedef struct  tagCUSTDATA {
524     INT cCustData;
525     LPCUSTDATAITEM prgCustData; /* count cCustdata */
526 } CUSTDATA, *LPCUSTDATA;
527
528
529
530 /*****************************************************************************
531  * IDispatch interface
532  */
533 #define ICOM_INTERFACE IDispatch
534 #define IDispatch_METHODS \
535   ICOM_METHOD1(HRESULT, GetTypeInfoCount, UINT*, pctinfo) \
536   ICOM_METHOD3(HRESULT, GetTypeInfo, UINT, iTInfo, LCID, lcid, ITypeInfo**, ppTInfo) \
537   ICOM_METHOD5(HRESULT, GetIDsOfNames, REFIID, riid, LPOLESTR*, rgszNames, UINT, cNames, LCID, lcid, DISPID*, rgDispId) \
538   ICOM_METHOD8(HRESULT, Invoke, DISPID, dispIdMember, REFIID, riid, LCID, lcid, WORD, wFlags, DISPPARAMS*, pDispParams, VARIANT*, pVarResult, EXCEPINFO*, pExepInfo, UINT*, puArgErr)
539 #define IDispatch_IMETHODS \
540         IUnknown_IMETHODS \
541         IDispatch_METHODS
542 ICOM_DEFINE(IDispatch,IUnknown)
543 #undef ICOM_INTERFACE
544
545 #ifdef ICOM_CINTERFACE
546 /*** IUnknown methods ***/
547 #define IDispatch_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
548 #define IDispatch_AddRef(p)             ICOM_CALL (AddRef,p)
549 #define IDispatch_Release(p)            ICOM_CALL (Release,p)
550 /*** IDispatch methods ***/
551 #define IDispatch_GetTypeInfoCount(p,a)      ICOM_CALL1 (GetTypeInfoCount,p,a)
552 #define IDispatch_GetTypeInfo(p,a,b,c)       ICOM_CALL3 (GetTypeInfo,p,b,c)
553 #define IDispatch_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
554 #define IDispatch_Invoke(p,a,b,c,d,e,f,g,h)  ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
555 #endif
556
557
558 /*****************************************************************************
559  * ITypeInfo interface
560  */
561 #define ICOM_INTERFACE ITypeInfo
562 #define ITypeInfo_METHODS \
563         ICOM_METHOD1(HRESULT,GetTypeAttr, TYPEATTR**,ppTypeAttr) \
564         ICOM_METHOD1(HRESULT,GetTypeComp, ITypeComp**,ppTComp) \
565         ICOM_METHOD2(HRESULT,GetFuncDesc, UINT,index, FUNCDESC**,ppFuncDesc) \
566         ICOM_METHOD2(HRESULT,GetVarDesc, UINT,index, VARDESC**,ppVarDesc) \
567         ICOM_METHOD4(HRESULT,GetNames, MEMBERID,memid, BSTR*,rgBstrNames, UINT,cMaxNames, UINT*,pcNames) \
568         ICOM_METHOD2(HRESULT,GetRefTypeOfImplType, UINT,index, HREFTYPE*, pRefType) \
569         ICOM_METHOD2(HRESULT,GetImplTypeFlags, UINT,index, INT*,pImplTypeFlags)\
570         ICOM_METHOD3(HRESULT,GetIDsOfNames, LPOLESTR*,rgszNames, UINT,cNames, MEMBERID*,pMemId) \
571         ICOM_METHOD7(HRESULT,Invoke, PVOID,pvInstance, MEMBERID,memid, WORD,wFlags, DISPPARAMS*,pDispParams, VARIANT*,pVarResult, EXCEPINFO*,pExcepInfo, UINT*,puArgErr) \
572         ICOM_METHOD5(HRESULT,GetDocumentation, MEMBERID,memid, BSTR*,pBstrName, BSTR*,pBstrDocString, DWORD*,pdwHelpContext, BSTR*,pBstrHelpFile) \
573         ICOM_METHOD5(HRESULT,GetDllEntry, MEMBERID,memid, INVOKEKIND,invKind, BSTR*,pBstrDllName, BSTR*,pBstrName, WORD*,pwOrdinal) \
574         ICOM_METHOD2(HRESULT,GetRefTypeInfo, HREFTYPE,hRefType, ITypeInfo**,ppTInfo) \
575         ICOM_METHOD3(HRESULT,AddressOfMember, MEMBERID,memid, INVOKEKIND,invKind, PVOID*,ppv) \
576         ICOM_METHOD3(HRESULT,CreateInstance, IUnknown*,pUnkOuter, REFIID,riid, PVOID*,ppvObj) \
577         ICOM_METHOD2(HRESULT,GetMops, MEMBERID,memid, BSTR*,pBstrMops) \
578         ICOM_METHOD2(HRESULT,GetContainingTypeLib, ITypeLib**,ppTLib, UINT*,pIndex) \
579         ICOM_METHOD1(HRESULT,ReleaseTypeAttr, TYPEATTR*,pTypeAttr) \
580         ICOM_METHOD1(HRESULT,ReleaseFuncDesc, FUNCDESC*,pFuncDesc) \
581         ICOM_METHOD1(HRESULT,ReleaseVarDesc, VARDESC*,pVarDesc)\
582 \
583 \
584         /* itypeinfo2 methods */\
585         ICOM_METHOD1(HRESULT, GetTypeKind, TYPEKIND*, pTypeKind) \
586         ICOM_METHOD1(HRESULT, GetTypeFlags, UINT*, pTypeFlags) \
587         ICOM_METHOD3(HRESULT, GetFuncIndexOfMemId, MEMBERID, memid, INVOKEKIND,\
588                 invKind, UINT*, pFuncIndex) \
589         ICOM_METHOD2(HRESULT, GetVarIndexOfMemId, MEMBERID, memid, UINT*, \
590                 pVarIndex) \
591         ICOM_METHOD2(HRESULT, GetCustData, REFGUID, guid, VARIANT*, pVarVal) \
592         ICOM_METHOD3(HRESULT, GetFuncCustData, UINT, index, REFGUID, guid,\
593                 VARIANT*, pVarVal) \
594         ICOM_METHOD4(HRESULT, GetParamCustData, UINT, indexFunc, UINT,\
595                 indexParam, REFGUID, guid, VARIANT*, pVarVal) \
596         ICOM_METHOD3(HRESULT, GetVarCustData, UINT, index, REFGUID, guid,\
597                 VARIANT*, pVarVal) \
598         ICOM_METHOD3(HRESULT, GetImplTypeCustData, UINT, index, REFGUID, guid,\
599                 VARIANT*, pVarVal) \
600         ICOM_METHOD5(HRESULT, GetDocumentation2, MEMBERID, memid, LCID, lcid,\
601                 BSTR*, pbstrHelpString, INT*, pdwHelpStringContext,\
602                 BSTR*, pbstrHelpStringDll) \
603         ICOM_METHOD1(HRESULT, GetAllCustData, CUSTDATA*, pCustData) \
604         ICOM_METHOD2(HRESULT, GetAllFuncCustData, UINT, index, CUSTDATA*,\
605                 pCustData)\
606         ICOM_METHOD3(HRESULT, GetAllParamCustData, UINT, indexFunc, UINT,\
607                 indexParam, CUSTDATA*, pCustData) \
608         ICOM_METHOD2(HRESULT, GetAllVarCustData, UINT, index, CUSTDATA*,\
609                 pCustData) \
610         ICOM_METHOD2(HRESULT, GetAllImplTypeCustData, UINT, index, CUSTDATA*,\
611                 pCustData)
612         
613 #define ITypeInfo_IMETHODS \
614         IUnknown_IMETHODS \
615         ITypeInfo_METHODS
616 ICOM_DEFINE(ITypeInfo,IUnknown)
617 #undef ICOM_INTERFACE
618
619 #ifdef ICOM_CINTERFACE
620 /*** IUnknown methods ***/
621 #define ITypeInfo_QueryInterface(p,a,b)         ICOM_CALL2(QueryInterface,p,a,b)
622 #define ITypeInfo_AddRef(p)                     ICOM_CALL (AddRef,p)
623 #define ITypeInfo_Release(p)                    ICOM_CALL (Release,p)
624 /*** ITypeInfo methods ***/
625 #define ITypeInfo_GetTypeAttr(p,a)              ICOM_CALL1(GetTypeAttr,p,a)
626 #define ITypeInfo_GetTypeComp(p,a)              ICOM_CALL1(GetTypeComp,p,a)
627 #define ITypeInfo_GetFuncDesc(p,a,b)            ICOM_CALL2(GetFuncDesc,p,a,b)
628 #define ITypeInfo_GetVarDesc(p,a,b)             ICOM_CALL2(GetVarDesc,p,a,b)
629 #define ITypeInfo_GetNames(p,a,b,c,d)           ICOM_CALL4(GetNames,p,a,b,c,d)
630 #define ITypeInfo_GetRefTypeOfImplType(p,a,b)   ICOM_CALL2(GetRefTypeOfImplType,p,a,b)
631 #define ITypeInfo_GetImplTypeFlags(p,a,b)       ICOM_CALL2(GetImplTypeFlags,p,a,b)
632 #define ITypeInfo_GetIDsOfNames(p,a,b,c)        ICOM_CALL3(GetImplTypeFlags,p,a,b,c)
633 #define ITypeInfo_Invoke(p,a,b,c,d,e,f,g)       ICOM_CALL7(Invoke,p,a,b,c,d,e,f,g)
634 #define ITypeInfo_GetDocumentation(p,a,b,c,d,e) ICOM_CALL5(GetDocumentation,p,a,b,c,d,e)
635 #define ITypeInfo_GetDllEntry(p,a,b,c,d,e)      ICOM_CALL5(GetDllEntry,p,a,b,c,d,e)
636 #define ITypeInfo_GetRefTypeInfo(p,a,b)         ICOM_CALL2(GetRefTypeInfo,p,a,b)
637 #define ITypeInfo_AddressOfMember(p,a,b,c)      ICOM_CALL3(AddressOfMember,p,a,b,c)
638 #define ITypeInfo_CreateInstance(p,a,b,c)       ICOM_CALL3(CreateInstance,p,a,b,c)
639 #define ITypeInfo_GetMops(p,a,b)                ICOM_CALL2(GetMops,p,a,b)
640 #define ITypeInfo_GetContainingTypeLib(p,a,b)   ICOM_CALL2(GetContainingTypeLib,p,a,b)
641 #define ITypeInfo_ReleaseTypeAttr(p,a)          ICOM_CALL1(ReleaseTypeAttr,p,a)
642 #define ITypeInfo_ReleaseFuncDesc(p,a)          ICOM_CALL1(ReleaseFuncDesc,p,a)
643 #define ITypeInfo_ReleaseVarDesc(p,a)           ICOM_CALL1(ReleaseVarDesc,p,a)
644 #endif
645                                   
646
647 /*****************************************************************************
648  * ITypeLib interface
649  */
650 #define ICOM_INTERFACE ITypeLib
651 #define ITypeLib_METHODS \
652         ICOM_METHOD (UINT,GetTypeInfoCount) \
653         ICOM_METHOD2(HRESULT,GetTypeInfo, UINT,index, ITypeInfo**,ppTInfo) \
654         ICOM_METHOD2(HRESULT,GetTypeInfoType, UINT,index, TYPEKIND*,pTKind) \
655         ICOM_METHOD2(HRESULT,GetTypeInfoOfGuid, REFGUID,guid, ITypeInfo**,ppTinfo) \
656         ICOM_METHOD1(HRESULT,GetLibAttr, TLIBATTR**,ppTLibAttr) \
657         ICOM_METHOD1(HRESULT,GetTypeComp, ITypeComp**,ppTComp) \
658         ICOM_METHOD5(HRESULT,GetDocumentation, INT,index, BSTR*,pBstrName, BSTR*,pBstrDocString, DWORD*,pdwHelpContext, BSTR*,pBstrHelpFile) \
659         ICOM_METHOD3(HRESULT,IsName, LPOLESTR,szNameBuf, ULONG,lHashVal, BOOL*,bfName) \
660         ICOM_METHOD5(HRESULT,FindName, LPOLESTR,szNameBuf, ULONG,lHashVal, ITypeInfo**,ppTInfo, MEMBERID*,rgMemId, USHORT*,pcFound) \
661         ICOM_METHOD1(VOID,ReleaseTLibAttr, TLIBATTR*,pTLibAttr)\
662 \
663         ICOM_METHOD2(HRESULT,GetCustData, REFGUID,guid, VARIANT*, pVarVal)\
664         ICOM_METHOD2(HRESULT, GetLibStatistics, UINT *,pcUniqueNames, \
665                         UINT*, pcchUniqueNames) \
666         ICOM_METHOD5(HRESULT, GetDocumentation2, INT, index, LCID, lcid,\
667                 BSTR*, pbstrHelpString, INT*, pdwHelpStringContext,\
668                 BSTR*, pbstrHelpStringDll)\
669         ICOM_METHOD1(HRESULT, GetAllCustData, CUSTDATA *, pCustData)
670         
671 #define ITypeLib_IMETHODS \
672         IUnknown_IMETHODS \
673         ITypeLib_METHODS
674 ICOM_DEFINE(ITypeLib,IUnknown)
675 #undef ICOM_INTERFACE
676
677 #ifdef ICOM_CINTERFACE
678 /*** IUnknown methods ***/
679 #define ITypeLib_QueryInterface(p,a,b)         ICOM_CALL2(QueryInterface,p,a,b)
680 #define ITypeLib_AddRef(p)                     ICOM_CALL (AddRef,p)
681 #define ITypeLib_Release(p)                    ICOM_CALL (Release,p)
682 /*** ITypeLib methods ***/
683 #define ITypeLib_GetTypeInfoCount(p)           ICOM_CALL (GetTypeInfoCount,p)
684 #define ITypeLib_GetTypeInfo(p,a,b)            ICOM_CALL2(GetTypeInfo,p,a,b)
685 #define ITypeLib_GetTypeInfoType(p,a,b)        ICOM_CALL2(GetTypeInfoType,p,a,b)
686 #define ITypeLib_GetTypeInfoOfGuid(p,a,b)      ICOM_CALL2(GetTypeInfoOfGuid,p,a,b)
687 #define ITypeLib_GetLibAttr(p,a)               ICOM_CALL1(GetLibAttr,p,a)
688 #define ITypeLib_GetTypeComp(p,a)              ICOM_CALL1(GetTypeComp,p,a)
689 #define ITypeLib_GetDocumentation(p,a,b,c,d,e) ICOM_CALL5(GetDocumentation,p,a,b,c,d,e)
690 #define ITypeLib_IsName(p,a,b,c)               ICOM_CALL3(IsName,p,a,b,c)
691 #define ITypeLib_FindName(p,a,b,c,d,e)         ICOM_CALL5(FindName,p,a,b,c,d,e)
692 #define ITypeLib_ReleaseTLibAttr(p,a)          ICOM_CALL1(ReleaseTLibAttr,p,a)
693 #endif
694
695
696 /*****************************************************************************
697  * ITypeComp interface
698  */
699 #define ICOM_INTERFACE ITypeComp
700 #define ITypeComp_METHODS \
701         ICOM_METHOD6(HRESULT,Bind, LPOLESTR,szName, ULONG,lHashVal, WORD,wFlags, ITypeInfo**,ppTInfo, DESCKIND*,pDescKind, BINDPTR*,pBindPtr) \
702         ICOM_METHOD4(HRESULT,BindType, LPOLESTR,szName, ULONG,lHashVal, ITypeInfo**,ppTInfo, ITypeComp**,ppTComp) 
703 #define ITypeComp_IMETHODS \
704         IUnknown_IMETHODS \
705         ITypeComp_METHODS
706 ICOM_DEFINE(ITypeComp,IUnknown)
707 #undef ICOM_INTERFACE
708
709 #ifdef ICOM_CINTERFACE
710 /*** IUnknown methods ***/
711 #define ITypeComp_QueryInterface(p,a,b)         ICOM_CALL2(QueryInterface,p,a,b)
712 #define ITypeComp_AddRef(p)                     ICOM_CALL (AddRef,p)
713 #define ITypeComp_Release(p)                    ICOM_CALL (Release,p)
714 /*** ITypeComp methods ***/
715 #define ITypeComp_Bind(p,a,b,c,d,e,f)           ICOM_CALL6(Bind,p,a,b,c,d,e,f)
716 #define ITypeComp_BindType(p,a,b,c,d)           ICOM_CALL4(BindType,p,a,b,c,d)
717 #endif
718                                  
719 /*****************************************************************************
720  * IEnumVARIANT interface
721  */
722 #define ICOM_INTERFACE IEnumVARIANT
723 #define IEnumVARIANT_METHODS \
724         ICOM_METHOD3(HRESULT,Next, ULONG,celt, VARIANT*,rgVar, ULONG*,pCeltFetched) \
725         ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
726         ICOM_METHOD (HRESULT,Reset) \
727         ICOM_METHOD1(HRESULT,Clone, IEnumVARIANT**,ppEnum) 
728 #define IEnumVARIANT_IMETHODS \
729         IUnknown_IMETHODS \
730         IEnumVARIANT_METHODS
731 ICOM_DEFINE(IEnumVARIANT,IUnknown)
732 #undef ICOM_INTERFACE
733
734 #ifdef ICOM_CINTERFACE
735 /*** IUnknown methods ***/
736 #define IEnumVARIANT_QueryInterface(p,a,b)   ICOM_CALL2(QueryInterface,p,a,b)
737 #define IEnumVARIANT_AddRef(p)               ICOM_CALL (AddRef,p)
738 #define IEnumVARIANT_Release(p)              ICOM_CALL (Release,p)
739 /*** IEnumVARIANT methods ***/
740 #define IEnumVARIANT_Next(p,a,b,c)           ICOM_CALL3(Next,p,a,b,c)
741 #define IEnumVARIANT_Skip(p,a)               ICOM_CALL1(Skip,p,a)
742 #define IEnumVARIANT_Reset(p)                ICOM_CALL (Reset,p)
743 #define IEnumVARIANT_Clone(p,a)              ICOM_CALL1(Clone,p,a)
744 #endif
745                                  
746 #endif /* __WINE_WINE_OBJ_OLEAUT_H */
747