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
7 * Copyright (C) the Wine project
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef __WINE_WINE_OBJ_MISC_H
25 #define __WINE_WINE_OBJ_MISC_H
27 #include "wine/obj_base.h"
31 #endif /* defined(__cplusplus) */
33 /*****************************************************************************
34 * Predeclare the interfaces
36 DEFINE_OLEGUID(IID_IEnumString, 0x00000101L, 0, 0);
37 typedef struct IEnumString IEnumString,*LPENUMSTRING;
39 DEFINE_OLEGUID(IID_IEnumUnknown, 0x00000100L, 0, 0);
40 typedef struct IEnumUnknown IEnumUnknown,*LPENUMUNKNOWN;
42 DEFINE_OLEGUID(IID_IMallocSpy, 0x0000001dL, 0, 0);
43 typedef struct IMallocSpy IMallocSpy,*LPMALLOCSPY;
45 DEFINE_OLEGUID(IID_IMultiQI, 0x00000020L, 0, 0);
46 typedef struct IMultiQI IMultiQI,*LPMULTIQI;
49 /*****************************************************************************
50 * IEnumString interface
52 #define ICOM_INTERFACE IEnumString
53 #define IEnumString_METHODS \
54 ICOM_METHOD3(HRESULT,Next, ULONG,celt, LPOLESTR*,rgelt, ULONG*,pceltFethed) \
55 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
56 ICOM_METHOD (HRESULT,Reset) \
57 ICOM_METHOD1(HRESULT, Clone, IEnumString**, ppenum)
58 #define IEnumString_IMETHODS \
61 ICOM_DEFINE(IEnumString,IUnknown)
64 /*** IUnknown methods ***/
65 #define IEnumString_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
66 #define IEnumString_AddRef(p) ICOM_CALL (AddRef,p)
67 #define IEnumString_Release(p) ICOM_CALL (Release,p)
68 /*** IEnumString methods ***/
69 #define IEnumString_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
70 #define IEnumString_Skip(p,a) ICOM_CALL1(Skip,p,a)
71 #define IEnumString_Reset(p) ICOM_CALL (Reset,p)
72 #define IEnumString_Clone(p,a) ICOM_CALL1(Clone,p,a)
76 /*****************************************************************************
77 * IEnumUnknown interface
79 #define ICOM_INTERFACE IEnumUnknown
80 #define IEnumUnknown_METHODS \
81 ICOM_METHOD3(HRESULT,Next, ULONG,celt, IUnknown**,rgelt, ULONG*,pceltFethed) \
82 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
83 ICOM_METHOD (HRESULT,Reset) \
84 ICOM_METHOD1(HRESULT,Clone, IEnumUnknown**,ppenum)
85 #define IEnumUnknown_IMETHODS \
88 ICOM_DEFINE(IEnumUnknown,IUnknown)
91 /*** IUnknown methods ***/
92 #define IEnumUnknown_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
93 #define IEnumUnknown_AddRef(p) ICOM_CALL (AddRef,p)
94 #define IEnumUnknown_Release(p) ICOM_CALL (Release,p)
95 /*** IEnumUnknown methods ***/
96 #define IEnumUnknown_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
97 #define IEnumUnknown_Skip(p,a) ICOM_CALL1(Skip,p,a)
98 #define IEnumUnknown_Reset(p) ICOM_CALL (Reset,p)
99 #define IEnumUnknown_Clone(p,a) ICOM_CALL1(Clone,p,a)
102 /*****************************************************************************
103 * IMallocSpy interface
105 #define ICOM_INTERFACE IMallocSpy
106 #define IMallocSpy_METHODS \
107 ICOM_METHOD1 (ULONG,PreAlloc, ULONG,cbRequest) \
108 ICOM_METHOD1 (PVOID,PostAlloc, void*,pActual) \
109 ICOM_METHOD2 (PVOID,PreFree, void*,pRequest, BOOL,fSpyed) \
110 ICOM_VMETHOD1( PostFree, BOOL,fSpyed) \
111 ICOM_METHOD4 (ULONG,PreRealloc, void*,pRequest, ULONG,cbRequest, void**,ppNewRequest, BOOL,fSpyed) \
112 ICOM_METHOD2 (PVOID,PostRealloc, void*,pActual, BOOL,fSpyed) \
113 ICOM_METHOD2 (PVOID,PreGetSize, void*,pRequest, BOOL,fSpyed) \
114 ICOM_METHOD2 (ULONG,PostGetSize, ULONG,cbActual, BOOL,fSpyed) \
115 ICOM_METHOD2 (PVOID,PreDidAlloc, void*,pRequest, BOOL,fSpyed) \
116 ICOM_METHOD3 (int, PostDidAlloc, void*,pRequest, BOOL,fSpyed, int,fActual) \
117 ICOM_METHOD (int, PreHeapMinimize) \
118 ICOM_METHOD (int, PostHeapMinimize)
119 #define IMallocSpy_IMETHODS \
122 ICOM_DEFINE(IMallocSpy,IUnknown)
123 #undef ICOM_INTERFACE
125 /*** IUnknown methods ***/
126 #define IMallocSpy_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
127 #define IMallocSpy_AddRef(p) ICOM_CALL (AddRef,p)
128 #define IMallocSpy_Release(p) ICOM_CALL (Release,p)
129 /*** IMallocSpy methods ***/
130 #define IMallocSpy_PreAlloc(p,a) ICOM_CALL1(PreAlloc,p,a)
131 #define IMallocSpy_PostAlloc(p,a) ICOM_CALL1(PostAlloc,p,a)
132 #define IMallocSpy_PreFree(p,a,b) ICOM_CALL2(PreFree,p,a,b)
133 #define IMallocSpy_PostFree(p,a) ICOM_CALL1(PostFree,p,a)
134 #define IMallocSpy_PreRealloc(p,a,b,c,d) ICOM_CALL4(PreRealloc,p,a,b,c,d)
135 #define IMallocSpy_PostRealloc(p,a,b) ICOM_CALL2(PostRealloc,p,a,b)
136 #define IMallocSpy_PreGetSize(p,a,b) ICOM_CALL2(PreGetSize,p,a,b)
137 #define IMallocSpy_PostGetSize(p,a,b) ICOM_CALL2(PostGetSize,p,a,b)
138 #define IMallocSpy_PreDidAlloc(p,a,b) ICOM_CALL2(PreDidAlloc,p,a,b)
139 #define IMallocSpy_PostDidAlloc(p,a,b,c) ICOM_CALL3(PostDidAlloc,p,a,b,c)
140 #define IMallocSpy_PreHeapMinimize(p) ICOM_CALL (PreHeapMinimize,p)
141 #define IMallocSpy_PostHeapMinimize(p) ICOM_CALL (PostHeapMinimize,p)
143 /* FIXME: not implemented */
144 HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy);
146 /* FIXME: not implemented */
147 HRESULT WINAPI CoRevokeMallocSpy(void);
149 HRESULT WINAPI CoFileTimeNow(FILETIME* lpFileTime);
152 /*****************************************************************************
155 typedef struct tagMULTI_QI
162 #define ICOM_INTERFACE IMultiQI
163 #define IMultiQI_METHODS \
164 ICOM_METHOD2(HRESULT,QueryMultipleInterfaces, ULONG,cMQIs, MULTI_QI*,pMQIs)
165 #define IMultiQI_IMETHODS \
168 ICOM_DEFINE(IMultiQI,IUnknown)
169 #undef ICOM_INTERFACE
171 /*** IUnknown methods ***/
172 #define IMultiQI_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
173 #define IMultiQI_AddRef(p) ICOM_CALL (AddRef,p)
174 #define IMultiQI_Release(p) ICOM_CALL (Release,p)
175 /*** IMultiQI methods ***/
176 #define IMultiQI_QueryMultipleInterfaces(p,a,b) ICOM_CALL2(QueryMultipleInterfaces,p,a,b)
179 /*****************************************************************************
183 DWORD WINAPI CoBuildVersion(void);
185 DWORD WINAPI CoGetCurrentProcess(void);
187 /* FIXME: unimplemented */
188 HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew);
190 /* FIXME: unimplemented */
191 HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew);
193 HRESULT WINAPI CoCreateInstanceEx(REFCLSID rclsid,
196 COSERVERINFO* pServerInfo,
201 #endif /* defined(__cplusplus) */
203 #endif /* __WINE_WINE_OBJ_MISC_H */