Use Callout table instead of direct GetProcAddress.
[wine/multimedia.git] / include / interfaces.h
blobef6f6437439e288a652cc3534dbe631eedb177a1
1 #ifndef _WINE_INTERFACES_H
2 #define _WINE_INTERFACES_H
4 #include "ole.h"
5 #include "ole2.h"
6 #include "compobj.h"
8 #define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
9 #define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
10 #define PURE
11 #define FAR
12 #define THIS_ THIS,
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 #include "objbase.h"
30 #define THIS LPCLASSFACTORY this
31 typedef struct IClassFactory *LPCLASSFACTORY,IClassFactory;
32 typedef struct {
33 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
34 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
35 STDMETHOD_(ULONG,Release) (THIS) PURE;
36 STDMETHOD(CreateInstance) (THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppvObject) PURE;
37 STDMETHOD(LockServer) (THIS_ BOOL32) PURE;
38 } *LPCLASSFACTORY_VTABLE,IClassFactory_VTable;
40 struct IClassFactory {
41 LPCLASSFACTORY_VTABLE lpvtbl;
42 DWORD ref;
44 #undef THIS
46 #define THIS LPMALLOC32 this
47 typedef struct IMalloc32 *LPMALLOC32,IMalloc32;
48 typedef struct {
49 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
50 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
51 STDMETHOD_(ULONG,Release) (THIS) PURE;
53 STDMETHOD_(LPVOID,Alloc) ( THIS_ DWORD cb);
54 STDMETHOD_(LPVOID,Realloc) ( THIS_ LPVOID pv,DWORD cb);
55 STDMETHOD_(VOID,Free) ( THIS_ LPVOID pv);
56 STDMETHOD_(DWORD,GetSize) ( THIS_ LPVOID pv);
57 STDMETHOD_(INT32,DidAlloc) ( THIS_ LPVOID pv);
58 STDMETHOD_(LPVOID,HeapMinimize) ( THIS );
59 } *LPMALLOC32_VTABLE,IMalloc32_VTable;
61 struct IMalloc32 {
62 LPMALLOC32_VTABLE lpvtbl;
63 DWORD ref;
65 #undef THIS
67 #define THIS LPMALLOC16 this
68 typedef struct IMalloc16 *LPMALLOC16,IMalloc16;
69 typedef struct {
70 STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID FAR* ppvObj) PURE;
71 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
72 STDMETHOD_(ULONG,Release) (THIS) PURE;
74 STDMETHOD_(LPVOID,Alloc) ( THIS_ DWORD cb);
75 STDMETHOD_(LPVOID,Realloc) ( THIS_ LPVOID pv,DWORD cb);
76 STDMETHOD_(VOID,Free) ( THIS_ LPVOID pv);
77 STDMETHOD_(DWORD,GetSize) ( THIS_ LPVOID pv);
78 STDMETHOD_(INT16,DidAlloc) ( THIS_ LPVOID pv);
79 STDMETHOD_(LPVOID,HeapMinimize) ( THIS );
80 } *LPMALLOC16_VTABLE,IMalloc16_VTable;
82 struct IMalloc16 {
83 LPMALLOC16_VTABLE lpvtbl;
84 DWORD ref;
85 /* Gmm, I think one is not enough, we should probably manage a list of
86 * heaps
88 HGLOBAL16 heap;
90 #undef THIS
92 /* private prototypes for the constructors */
93 #ifdef __WINE__
94 LPUNKNOWN IUnknown_Constructor(void);
95 LPMALLOC16 IMalloc16_Constructor(void);
96 LPMALLOC32 IMalloc32_Constructor(void);
97 #endif
99 HRESULT WINAPI CoGetMalloc32(DWORD, LPMALLOC32*);
101 #undef STDMETHOD
102 #undef STDMETHOD_
103 #undef PURE
104 #undef FAR
105 #undef THIS_
106 #endif /*_WINE_INTERFACES_H*/