Initialize MENUITEMINFO structure before calling GetMenuItemInfo.
[wine.git] / include / wine / obj_misc.h
blob8e04e0ad943927f0ae97f7270a7101365c69acd0
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'.
6 */
8 #ifndef __WINE_WINE_OBJ_MISC_H
9 #define __WINE_WINE_OBJ_MISC_H
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* defined(__cplusplus) */
15 /*****************************************************************************
16 * Predeclare the interfaces
18 DEFINE_OLEGUID(IID_IEnumString, 0x00000101L, 0, 0);
19 typedef struct IEnumString IEnumString,*LPENUMSTRING;
21 DEFINE_OLEGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
22 typedef struct IEnumUnknown IEnumUnknown,*LPENUMUNKNOWN;
24 DEFINE_OLEGUID(IID_IMallocSpy, 0x0000001dL, 0, 0);
25 typedef struct IMallocSpy IMallocSpy,*LPMALLOCSPY;
27 DEFINE_OLEGUID(IID_IMultiQI, 0x00000020L, 0, 0);
28 typedef struct IMultiQI IMultiQI,*LPMULTIQI;
31 /*****************************************************************************
32 * IEnumString interface
34 #define ICOM_INTERFACE IEnumString
35 #define IEnumString_METHODS \
36 ICOM_METHOD3(HRESULT,Next, ULONG,celt, LPOLESTR*,rgelt, ULONG*,pceltFethed) \
37 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
38 ICOM_METHOD (HRESULT,Reset) \
39 ICOM_METHOD1(HRESULT, Clone, IEnumString**, ppenum)
40 #define IEnumString_IMETHODS \
41 IUnknown_IMETHODS \
42 IEnumString_METHODS
43 ICOM_DEFINE(IEnumString,IUnknown)
44 #undef ICOM_INTERFACE
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)
58 /*****************************************************************************
59 * IEnumUnknown interface
61 #define ICOM_INTERFACE IEnumUnknown
62 #define IEnumUnknown_METHODS \
63 ICOM_METHOD3(HRESULT,Next, ULONG,celt, IUnknown**,rgelt, ULONG*,pceltFethed) \
64 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
65 ICOM_METHOD (HRESULT,Reset) \
66 ICOM_METHOD1(HRESULT,Clone, IEnumUnknown**,ppenum)
67 #define IEnumUnknown_IMETHODS \
68 IUnknown_IMETHODS \
69 IEnumUnknown_METHODS
70 ICOM_DEFINE(IEnumUnknown,IUnknown)
71 #undef ICOM_INTERFACE
73 /*** IUnknown methods ***/
74 #define IEnumUnknown_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
75 #define IEnumUnknown_AddRef(p) ICOM_CALL (AddRef,p)
76 #define IEnumUnknown_Release(p) ICOM_CALL (Release,p)
77 /*** IEnumUnknown methods ***/
78 #define IEnumUnknown_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
79 #define IEnumUnknown_Skip(p,a) ICOM_CALL1(Skip,p,a)
80 #define IEnumUnknown_Reset(p) ICOM_CALL (Reset,p)
81 #define IEnumUnknown_Clone(p,a) ICOM_CALL1(Clone,p,a)
84 /*****************************************************************************
85 * IMallocSpy interface
87 #define ICOM_INTERFACE IMallocSpy
88 #define IMallocSpy_METHODS \
89 ICOM_METHOD1 (ULONG,PreAlloc, ULONG,cbRequest) \
90 ICOM_VMETHOD1( PostAlloc, void*,pActual) \
91 ICOM_METHOD2 (PVOID,PreFree, void*,pRequest, BOOL,fSpyed) \
92 ICOM_VMETHOD1( PostFree, BOOL,fSpyed) \
93 ICOM_METHOD4 (ULONG,PreRealloc, void*,pRequest, ULONG,cbRequest, void**,ppNewRequest, BOOL,fSpyed) \
94 ICOM_METHOD2 (PVOID,PostRealloc, void*,pActual, BOOL,fSpyed) \
95 ICOM_METHOD2 (PVOID,PreGetSize, void*,pRequest, BOOL,fSpyed) \
96 ICOM_METHOD2 (ULONG,PostGetSize, ULONG,cbActual, BOOL,fSpyed) \
97 ICOM_METHOD2 (PVOID,PreDidAlloc, void*,pRequest, BOOL,fSpyed) \
98 ICOM_METHOD3 (int, PostDidAlloc, void*,pRequest, BOOL,fSpyed, int,fActual) \
99 ICOM_METHOD (int, PreHeapMinimize) \
100 ICOM_METHOD (int, PostHeapMinimize)
101 #define IMallocSpy_IMETHODS \
102 IUnknown_IMETHODS \
103 IMallocSpy_METHODS
104 ICOM_DEFINE(IMallocSpy,IUnknown)
105 #undef ICOM_INTERFACE
107 /*** IUnknown methods ***/
108 #define IMallocSpy_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
109 #define IMallocSpy_AddRef(p) ICOM_CALL (AddRef,p)
110 #define IMallocSpy_Release(p) ICOM_CALL (Release,p)
111 /*** IMallocSpy methods ***/
112 #define IMallocSpy_PreAlloc(p,a) ICOM_CALL1(PreAlloc,p,a)
113 #define IMallocSpy_PostAlloc(p,a) ICOM_CALL1(PostAlloc,p,a)
114 #define IMallocSpy_PreFree(p,a,b) ICOM_CALL2(PreFree,p,a,b)
115 #define IMallocSpy_PostFree(p,a) ICOM_CALL1(PostFree,p,a)
116 #define IMallocSpy_PreRealloc(p,a,b,c,d) ICOM_CALL4(PreRealloc,p,a,b,c,d)
117 #define IMallocSpy_PostRealloc(p,a,b) ICOM_CALL2(PostRealloc,p,a,b)
118 #define IMallocSpy_PreGetSize(p,a,b) ICOM_CALL2(PreGetSize,p,a,b)
119 #define IMallocSpy_PostGetSize(p,a,b) ICOM_CALL2(PostGetSize,p,a,b)
120 #define IMallocSpy_PreDidAlloc(p,a,b) ICOM_CALL2(PreDidAlloc,p,a,b)
121 #define IMallocSpy_PostDidAlloc(p,a,b,c) ICOM_CALL3(PostDidAlloc,p,a,b,c)
122 #define IMallocSpy_PreHeapMinimize(p) ICOM_CALL (PreHeapMinimize,p)
123 #define IMallocSpy_PostHeapMinimize(p) ICOM_CALL (PostHeapMinimize,p)
125 /* FIXME: not implemented */
126 HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy);
128 /* FIXME: not implemented */
129 HRESULT WINAPI CoRevokeMallocSpy(void);
131 HRESULT WINAPI CoFileTimeNow(FILETIME* lpFileTime);
134 /*****************************************************************************
135 * IMultiQI interface
137 typedef struct tagMULTI_QI
139 const IID* pIID;
140 IUnknown* pItf;
141 HRESULT hr;
142 } MULTI_QI;
144 #define ICOM_INTERFACE IMultiQI
145 #define IMultiQI_METHODS \
146 ICOM_METHOD2(HRESULT,QueryMultipleInterfaces, ULONG,cMQIs, MULTI_QI*,pMQIs)
147 #define IMultiQI_IMETHODS \
148 IUnknown_IMETHODS \
149 IMultiQI_METHODS
150 ICOM_DEFINE(IMultiQI,IUnknown)
151 #undef ICOM_INTERFACE
153 /*** IUnknown methods ***/
154 #define IMultiQI_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
155 #define IMultiQI_AddRef(p) ICOM_CALL (AddRef,p)
156 #define IMultiQI_Release(p) ICOM_CALL (Release,p)
157 /*** IMultiQI methods ***/
158 #define IMultiQI_QueryMultipleInterfaces(p,a,b) ICOM_CALL2(QueryMultipleInterfaces,p,a,b)
161 /*****************************************************************************
162 * Additional API
165 DWORD WINAPI CoBuildVersion(void);
167 DWORD WINAPI CoGetCurrentProcess(void);
169 /* FIXME: unimplemented */
170 HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew);
172 /* FIXME: unimplemented */
173 HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew);
175 HRESULT WINAPI CoCreateInstanceEx(REFCLSID rclsid,
176 LPUNKNOWN pUnkOuter,
177 DWORD dwClsContext,
178 COSERVERINFO* pServerInfo,
179 ULONG cmq,
180 MULTI_QI* pResults);
181 #ifdef __cplusplus
182 } /* extern "C" */
183 #endif /* defined(__cplusplus) */
185 #endif /* __WINE_WINE_OBJ_MISC_H */