source: trunk/include/win/wine/obj_misc.h

Last change on this file was 9399, checked in by sandervl, 23 years ago

updates

File size: 6.9 KB
Line 
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 */
7
8#ifndef __WINE_WINE_OBJ_MISC_H
9#define __WINE_WINE_OBJ_MISC_H
10
11#include "wine/obj_base.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif /* defined(__cplusplus) */
16
17/*****************************************************************************
18 * Predeclare the interfaces
19 */
20DEFINE_OLEGUID(IID_IEnumString, 0x00000101L, 0, 0);
21typedef struct IEnumString IEnumString,*LPENUMSTRING;
22
23DEFINE_OLEGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
24typedef struct IEnumUnknown IEnumUnknown,*LPENUMUNKNOWN;
25
26DEFINE_OLEGUID(IID_IMallocSpy, 0x0000001dL, 0, 0);
27typedef struct IMallocSpy IMallocSpy,*LPMALLOCSPY;
28
29DEFINE_OLEGUID(IID_IMultiQI, 0x00000020L, 0, 0);
30typedef struct IMultiQI IMultiQI,*LPMULTIQI;
31
32
33/*****************************************************************************
34 * IEnumString interface
35 */
36#define ICOM_INTERFACE IEnumString
37#define IEnumString_METHODS \
38 ICOM_METHOD3(HRESULT,Next, ULONG,celt, LPOLESTR*,rgelt, ULONG*,pceltFethed) \
39 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
40 ICOM_METHOD (HRESULT,Reset) \
41 ICOM_METHOD1(HRESULT, Clone, IEnumString**, ppenum)
42#define IEnumString_IMETHODS \
43 IUnknown_IMETHODS \
44 IEnumString_METHODS
45ICOM_DEFINE(IEnumString,IUnknown)
46#undef ICOM_INTERFACE
47
48#ifdef ICOM_CINTERFACE
49/*** IUnknown methods ***/
50#define IEnumString_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
51#define IEnumString_AddRef(p) ICOM_CALL (AddRef,p)
52#define IEnumString_Release(p) ICOM_CALL (Release,p)
53/*** IEnumString methods ***/
54#define IEnumString_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
55#define IEnumString_Skip(p,a) ICOM_CALL1(Skip,p,a)
56#define IEnumString_Reset(p) ICOM_CALL (Reset,p)
57#define IEnumString_Clone(p,a) ICOM_CALL1(Clone,p,a)
58#endif
59
60
61
62/*****************************************************************************
63 * IEnumUnknown interface
64 */
65#define ICOM_INTERFACE IEnumUnknown
66#define IEnumUnknown_METHODS \
67 ICOM_METHOD3(HRESULT,Next, ULONG,celt, IUnknown**,rgelt, ULONG*,pceltFethed) \
68 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
69 ICOM_METHOD (HRESULT,Reset) \
70 ICOM_METHOD1(HRESULT,Clone, IEnumUnknown**,ppenum)
71#define IEnumUnknown_IMETHODS \
72 IUnknown_IMETHODS \
73 IEnumUnknown_METHODS
74ICOM_DEFINE(IEnumUnknown,IUnknown)
75#undef ICOM_INTERFACE
76
77#ifdef ICOM_CINTERFACE
78/*** IUnknown methods ***/
79#define IEnumUnknown_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
80#define IEnumUnknown_AddRef(p) ICOM_CALL (AddRef,p)
81#define IEnumUnknown_Release(p) ICOM_CALL (Release,p)
82/*** IEnumUnknown methods ***/
83#define IEnumUnknown_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
84#define IEnumUnknown_Skip(p,a) ICOM_CALL1(Skip,p,a)
85#define IEnumUnknown_Reset(p) ICOM_CALL (Reset,p)
86#define IEnumUnknown_Clone(p,a) ICOM_CALL1(Clone,p,a)
87#endif
88
89
90/*****************************************************************************
91 * IMallocSpy interface
92 */
93#define ICOM_INTERFACE IMallocSpy
94#define IMallocSpy_METHODS \
95 ICOM_METHOD1 (ULONG,PreAlloc, ULONG,cbRequest) \
96 ICOM_METHOD1 (PVOID,PostAlloc, void*,pActual) \
97 ICOM_METHOD2 (PVOID,PreFree, void*,pRequest, BOOL,fSpyed) \
98 ICOM_VMETHOD1( PostFree, BOOL,fSpyed) \
99 ICOM_METHOD4 (ULONG,PreRealloc, void*,pRequest, ULONG,cbRequest, void**,ppNewRequest, BOOL,fSpyed) \
100 ICOM_METHOD2 (PVOID,PostRealloc, void*,pActual, BOOL,fSpyed) \
101 ICOM_METHOD2 (PVOID,PreGetSize, void*,pRequest, BOOL,fSpyed) \
102 ICOM_METHOD2 (ULONG,PostGetSize, ULONG,cbActual, BOOL,fSpyed) \
103 ICOM_METHOD2 (PVOID,PreDidAlloc, void*,pRequest, BOOL,fSpyed) \
104 ICOM_METHOD3 (int, PostDidAlloc, void*,pRequest, BOOL,fSpyed, int,fActual) \
105 ICOM_METHOD (int, PreHeapMinimize) \
106 ICOM_METHOD (int, PostHeapMinimize)
107#define IMallocSpy_IMETHODS \
108 IUnknown_IMETHODS \
109 IMallocSpy_METHODS
110ICOM_DEFINE(IMallocSpy,IUnknown)
111#undef ICOM_INTERFACE
112
113#ifdef ICOM_CINTERFACE
114/*** IUnknown methods ***/
115#define IMallocSpy_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
116#define IMallocSpy_AddRef(p) ICOM_CALL (AddRef,p)
117#define IMallocSpy_Release(p) ICOM_CALL (Release,p)
118/*** IMallocSpy methods ***/
119#define IMallocSpy_PreAlloc(p,a) ICOM_CALL1(PreAlloc,p,a)
120#define IMallocSpy_PostAlloc(p,a) ICOM_CALL1(PostAlloc,p,a)
121#define IMallocSpy_PreFree(p,a,b) ICOM_CALL2(PreFree,p,a,b)
122#define IMallocSpy_PostFree(p,a) ICOM_CALL1(PostFree,p,a)
123#define IMallocSpy_PreRealloc(p,a,b,c,d) ICOM_CALL4(PreRealloc,p,a,b,c,d)
124#define IMallocSpy_PostRealloc(p,a,b) ICOM_CALL2(PostRealloc,p,a,b)
125#define IMallocSpy_PreGetSize(p,a,b) ICOM_CALL2(PreGetSize,p,a,b)
126#define IMallocSpy_PostGetSize(p,a,b) ICOM_CALL2(PostGetSize,p,a,b)
127#define IMallocSpy_PreDidAlloc(p,a,b) ICOM_CALL2(PreDidAlloc,p,a,b)
128#define IMallocSpy_PostDidAlloc(p,a,b,c) ICOM_CALL3(PostDidAlloc,p,a,b,c)
129#define IMallocSpy_PreHeapMinimize(p) ICOM_CALL (PreHeapMinimize,p)
130#define IMallocSpy_PostHeapMinimize(p) ICOM_CALL (PostHeapMinimize,p)
131#endif
132
133/* FIXME: not implemented */
134HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy);
135
136/* FIXME: not implemented */
137HRESULT WINAPI CoRevokeMallocSpy(void);
138
139HRESULT WINAPI CoFileTimeNow(FILETIME* lpFileTime);
140
141
142/*****************************************************************************
143 * IMultiQI interface
144 */
145typedef struct tagMULTI_QI
146{
147 const IID* pIID;
148 IUnknown* pItf;
149 HRESULT hr;
150} MULTI_QI;
151
152#define ICOM_INTERFACE IMultiQI
153#define IMultiQI_METHODS \
154 ICOM_METHOD2(HRESULT,QueryMultipleInterfaces, ULONG,cMQIs, MULTI_QI*,pMQIs)
155#define IMultiQI_IMETHODS \
156 IUnknown_IMETHODS \
157 IMultiQI_METHODS
158ICOM_DEFINE(IMultiQI,IUnknown)
159#undef ICOM_INTERFACE
160
161#ifdef ICOM_CINTERFACE
162/*** IUnknown methods ***/
163#define IMultiQI_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
164#define IMultiQI_AddRef(p) ICOM_CALL (AddRef,p)
165#define IMultiQI_Release(p) ICOM_CALL (Release,p)
166/*** IMultiQI methods ***/
167#define IMultiQI_QueryMultipleInterfaces(p,a,b) ICOM_CALL2(QueryMultipleInterfaces,p,a,b)
168#endif
169
170
171/*****************************************************************************
172 * Additional API
173 */
174
175DWORD WINAPI CoBuildVersion(void);
176
177DWORD WINAPI CoGetCurrentProcess(void);
178
179/* FIXME: unimplemented */
180HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew);
181
182/* FIXME: unimplemented */
183HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew);
184
185HRESULT WINAPI CoCreateInstanceEx(REFCLSID rclsid,
186 LPUNKNOWN pUnkOuter,
187 DWORD dwClsContext,
188 COSERVERINFO* pServerInfo,
189 ULONG cmq,
190 MULTI_QI* pResults);
191#ifdef __cplusplus
192} /* extern "C" */
193#endif /* defined(__cplusplus) */
194
195#endif /* __WINE_WINE_OBJ_MISC_H */
Note: See TracBrowser for help on using the repository browser.