Large-scale renaming of all Win32 functions and types to use the
[wine.git] / include / wine / obj_misc.h
blob8472c84e53aac227cdad94ec59f5903993adc20e
1 /*
2 * Defines miscellaneous COM interfaces and APIs defined in objidl.h.
3 * These did not really fit into the other categories, whould have
4 * required their own specific category or are too rarely used to be
5 * put in 'obj_base.h'.
7 * Depends on 'obj_base.h'.
8 */
10 #ifndef __WINE_WINE_OBJ_MISC_H
11 #define __WINE_WINE_OBJ_MISC_H
14 /*****************************************************************************
15 * Predeclare the interfaces
17 DEFINE_OLEGUID(IID_IEnumString, 0x00000101L, 0, 0);
18 typedef struct IEnumString IEnumString,*LPENUMSTRING;
20 DEFINE_OLEGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
21 typedef struct IEnumUnknown IEnumUnknown,*LPENUMUNKNOWN;
23 DEFINE_OLEGUID(IID_IMallocSpy, 0x0000001dL, 0, 0);
24 typedef struct IMallocSpy IMallocSpy,*LPMALLOCSPY;
26 DEFINE_OLEGUID(IID_IMultiQI, 0x00000020L, 0, 0);
27 typedef struct IMultiQI IMultiQI,*LPMULTIQI;
30 /*****************************************************************************
31 * IEnumString interface
33 #define ICOM_INTERFACE IEnumString
34 #define IEnumString_METHODS \
35 ICOM_METHOD3(HRESULT,Next, ULONG,celt, LPOLESTR*,rgelt, ULONG*,pceltFethed); \
36 ICOM_METHOD1(HRESULT,Skip, ULONG,celt); \
37 ICOM_METHOD (HRESULT,Reset); \
38 ICOM_METHOD1 (HRESULT, Clone, IEnumString**, ppenum);
39 #define IEnumString_IMETHODS \
40 IUnknown_IMETHODS \
41 IEnumString_METHODS
42 ICOM_DEFINE(IEnumString,IUnknown)
43 #undef ICOM_INTERFACE
45 #ifdef ICOM_CINTERFACE
46 /*** IUnknown methods ***/
47 #define IEnumString_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
48 #define IEnumString_AddRef(p) ICOM_CALL (AddRef,p)
49 #define IEnumString_Release(p) ICOM_CALL (Release,p)
50 /*** IEnumString methods ***/
51 #define IEnumString_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
52 #define IEnumString_Skip(p,a) ICOM_CALL1(Skip,p,a)
53 #define IEnumString_Reset(p) ICOM_CALL (Reset,p)
54 #define IEnumString_Clone(p,a) ICOM_CALL1(Clone,p,a)
55 #endif
59 /*****************************************************************************
60 * IEnumUnknown interface
62 #define ICOM_INTERFACE IEnumUnknown
63 #define IEnumUnknown_METHODS \
64 ICOM_METHOD3(HRESULT,Next, ULONG,celt, IUnknown**,rgelt, ULONG*,pceltFethed); \
65 ICOM_METHOD1(HRESULT,Skip, ULONG,celt); \
66 ICOM_METHOD (HRESULT,Reset); \
67 ICOM_METHOD1(HRESULT,Clone, IEnumUnknown**,ppenum);
68 #define IEnumUnknown_IMETHODS \
69 IUnknown_IMETHODS \
70 IEnumUnknown_METHODS
71 ICOM_DEFINE(IEnumUnknown,IUnknown)
72 #undef ICOM_INTERFACE
74 #ifdef ICOM_CINTERFACE
75 /*** IUnknown methods ***/
76 #define IEnumUnknown_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
77 #define IEnumUnknown_AddRef(p) ICOM_CALL (AddRef,p)
78 #define IEnumUnknown_Release(p) ICOM_CALL (Release,p)
79 /*** IEnumUnknown methods ***/
80 #define IEnumUnknown_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
81 #define IEnumUnknown_Skip(p,a) ICOM_CALL1(Skip,p,a)
82 #define IEnumUnknown_Reset(p) ICOM_CALL (Reset,p)
83 #define IEnumUnknown_Clone(p,a) ICOM_CALL1(Clone,p,a)
84 #endif
87 /*****************************************************************************
88 * IMallocSpy interface
90 #define ICOM_INTERFACE IMallocSpy
91 #define IMallocSpy_METHODS \
92 ICOM_METHOD1 (ULONG,PreAlloc, ULONG,cbRequest); \
93 ICOM_VMETHOD1( PostAlloc, void*,pActual); \
94 ICOM_METHOD2 (void*,PreFree, void*,pRequest, BOOL,fSpyed); \
95 ICOM_VMETHOD1( PostFree, BOOL,fSpyed); \
96 ICOM_METHOD4 (ULONG,PreRealloc, void*,pRequest, ULONG,cbRequest, void**,ppNewRequest, BOOL,fSpyed); \
97 ICOM_METHOD2 (void*,PostRealloc, void*,pActual, BOOL,fSpyed); \
98 ICOM_METHOD2 (void*,PreGetSize, void*,pRequest, BOOL,fSpyed); \
99 ICOM_METHOD2 (ULONG,PostGetSize, ULONG,cbActual, BOOL,fSpyed); \
100 ICOM_METHOD2 (void*,PreDidAlloc, void*,pRequest, BOOL,fSpyed); \
101 ICOM_METHOD3 (int, PostDidAlloc, void*,pRequest, BOOL,fSpyed, int,fActual); \
102 ICOM_METHOD (int, PreHeapMinimize); \
103 ICOM_METHOD (int, PostHeapMinimize);
104 #define IMallocSpy_IMETHODS \
105 IUnknown_IMETHODS \
106 IMallocSpy_METHODS
107 ICOM_DEFINE(IMallocSpy,IUnknown)
108 #undef ICOM_INTERFACE
110 #ifdef ICOM_CINTERFACE
111 /*** IUnknown methods ***/
112 #define IMallocSpy_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
113 #define IMallocSpy_AddRef(p) ICOM_CALL (AddRef,p)
114 #define IMallocSpy_Release(p) ICOM_CALL (Release,p)
115 /*** IMallocSpy methods ***/
116 #define IMallocSpy_PreAlloc(p,a) ICOM_CALL1(PreAlloc,p,a)
117 #define IMallocSpy_PostAlloc(p,a) ICOM_CALL1(PostAlloc,p,a)
118 #define IMallocSpy_PreFree(p,a,b) ICOM_CALL2(PreFree,p,a,b)
119 #define IMallocSpy_PostFree(p,a) ICOM_CALL1(PostFree,p,a)
120 #define IMallocSpy_PreRealloc(p,a,b,c,d) ICOM_CALL4(PreRealloc,p,a,b,c,d)
121 #define IMallocSpy_PostRealloc(p,a,b) ICOM_CALL2(PostRealloc,p,a,b)
122 #define IMallocSpy_PreGetSize(p,a,b) ICOM_CALL2(PreGetSize,p,a,b)
123 #define IMallocSpy_PostGetSize(p,a,b) ICOM_CALL2(PostGetSize,p,a,b)
124 #define IMallocSpy_PreDidAlloc(p,a,b) ICOM_CALL2(PreDidAlloc,p,a,b)
125 #define IMallocSpy_PostDidAlloc(p,a,b,c) ICOM_CALL3(PostDidAlloc,p,a,b,c)
126 #define IMallocSpy_PreHeapMinimize(p) ICOM_CALL (PreHeapMinimize,p)
127 #define IMallocSpy_PostHeapMinimize(p) ICOM_CALL (PostHeapMinimize,p)
128 #endif
130 /* FIXME: not implemented */
131 HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy);
133 /* FIXME: not implemented */
134 HRESULT WINAPI CoRevokeMallocSpy(void);
136 HRESULT WINAPI CoFileTimeNow(FILETIME* lpFileTime);
139 /*****************************************************************************
140 * IMultiQI interface
142 typedef struct tagMULTI_QI
144 const IID* pIID;
145 IUnknown* pItf;
146 HRESULT hr;
147 } MULTI_QI;
149 #define ICOM_INTERFACE IMultiQI
150 #define IMultiQI_METHODS \
151 ICOM_METHOD2(HRESULT,QueryMultipleInterfaces, ULONG,cMQIs, MULTI_QI*,pMQIs);
152 #define IMultiQI_IMETHODS \
153 IUnknown_IMETHODS \
154 IMultiQI_METHODS
155 ICOM_DEFINE(IMultiQI,IUnknown)
156 #undef ICOM_INTERFACE
158 #ifdef ICOM_CINTERFACE
159 /*** IUnknown methods ***/
160 #define IMultiQI_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
161 #define IMultiQI_AddRef(p) ICOM_CALL (AddRef,p)
162 #define IMultiQI_Release(p) ICOM_CALL (Release,p)
163 /*** IMultiQI methods ***/
164 #define IMultiQI_QueryMultipleInterfaces(p,a,b) ICOM_CALL2(QueryMultipleInterfaces,p,a,b)
165 #endif
168 /*****************************************************************************
169 * Additional API
172 DWORD WINAPI CoBuildVersion(void);
174 DWORD WINAPI CoGetCurrentProcess(void);
176 /* FIXME: unimplemented */
177 HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew);
179 /* FIXME: unimplemented */
180 HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew);
183 #endif /* __WINE_WINE_OBJ_MISC_H */