1 #ifndef _WINE_INTERFACES_H
2 #define _WINE_INTERFACES_H
8 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
9 #define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
15 DEFINE_OLEGUID(IID_IUnknown,0,0,0);
16 DEFINE_OLEGUID(IID_IClassFactory,1,0,0);
17 DEFINE_OLEGUID(IID_IMalloc,2,0,0);
18 DEFINE_OLEGUID(IID_IMarshal,3,0,0);
19 DEFINE_OLEGUID(IID_IStorage,0xb,0,0);
20 DEFINE_OLEGUID(IID_IStream,0xc,0,0);
21 DEFINE_OLEGUID(IID_IBindCtx,0xe,0,0);
22 DEFINE_OLEGUID(IID_IMoniker,0xf,0,0);
23 DEFINE_OLEGUID(IID_IRunningObject,0x10,0,0);
24 DEFINE_OLEGUID(IID_IRootStorage,0x12,0,0);
25 DEFINE_OLEGUID(IID_IMessageFilter,0x16,0,0);
26 DEFINE_OLEGUID(IID_IStdMarshalInfo,0x18,0,0);
28 #define THIS LPUNKNOWN this
29 typedef struct IUnknown *LPUNKNOWN,IUnknown;
31 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
32 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
33 STDMETHOD_(ULONG,Release) (THIS) PURE;
34 } *LPUNKNOWN_VTABLE,IUnknown_VTable;
37 LPUNKNOWN_VTABLE lpvtbl;
42 #define THIS LPCLASSFACTORY this
43 typedef struct IClassFactory *LPCLASSFACTORY,IClassFactory;
45 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
46 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
47 STDMETHOD_(ULONG,Release) (THIS) PURE;
48 STDMETHOD(CreateInstance) (THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppvObject) PURE;
49 STDMETHOD(LockServer) (THIS) PURE;
50 } *LPCLASSFACTORY_VTABLE,IClassFactory_VTable;
52 struct IClassFactory {
53 LPCLASSFACTORY_VTABLE lpvtbl;
58 #define THIS LPMALLOC32 this
59 typedef struct IMalloc32 *LPMALLOC32,IMalloc32;
61 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
62 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
63 STDMETHOD_(ULONG,Release) (THIS) PURE;
65 STDMETHOD_(LPVOID,Alloc) ( THIS_ DWORD cb);
66 STDMETHOD_(LPVOID,Realloc) ( THIS_ LPVOID pv,DWORD cb);
67 STDMETHOD_(VOID,Free) ( THIS_ LPVOID pv);
68 STDMETHOD_(DWORD,GetSize) ( THIS_ LPVOID pv);
69 STDMETHOD_(INT32,DidAlloc) ( THIS_ LPVOID pv);
70 STDMETHOD_(LPVOID,HeapMinimize) ( THIS );
71 } *LPMALLOC32_VTABLE,IMalloc32_VTable;
74 LPMALLOC32_VTABLE lpvtbl;
79 #define THIS LPMALLOC16 this
80 typedef struct IMalloc16 *LPMALLOC16,IMalloc16;
82 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
83 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
84 STDMETHOD_(ULONG,Release) (THIS) PURE;
86 STDMETHOD_(LPVOID,Alloc) ( THIS_ DWORD cb);
87 STDMETHOD_(LPVOID,Realloc) ( THIS_ LPVOID pv,DWORD cb);
88 STDMETHOD_(VOID,Free) ( THIS_ LPVOID pv);
89 STDMETHOD_(DWORD,GetSize) ( THIS_ LPVOID pv);
90 STDMETHOD_(INT16,DidAlloc) ( THIS_ LPVOID pv);
91 STDMETHOD_(LPVOID,HeapMinimize) ( THIS );
92 } *LPMALLOC16_VTABLE,IMalloc16_VTable;
95 LPMALLOC16_VTABLE lpvtbl;
97 /* Gmm, I think one is not enough, we should probably manage a list of
104 /* private prototypes for the constructors */
106 LPUNKNOWN IUnknown_Constructor(void);
107 LPMALLOC16 IMalloc16_Constructor(void);
108 LPMALLOC32 IMalloc32_Constructor(void);
111 HRESULT WINAPI CoGetMalloc32(DWORD, LPMALLOC32*);
118 #endif /*_WINE_INTERFACES_H*/