-Fixed MESSAGE functions that were thunking down to 16 bits implementation.
[wine] / include / objbase.h
1 #ifndef __WINE_OBJBASE_H
2 #define __WINE_OBJBASE_H
3
4
5 #include "wine/obj_base.h"
6
7 /* the following depend only on obj_base.h */
8 #include "wine/obj_misc.h"
9 #include "wine/obj_channel.h"
10 #include "wine/obj_clientserver.h"
11 #include "wine/obj_marshal.h"
12 #include "wine/obj_storage.h"
13
14 /* the following depend on obj_storage.h */
15 #include "wine/obj_moniker.h"
16 #include "wine/obj_propertystorage.h"
17
18 /* the following depend on obj_moniker.h */
19 #include "wine/obj_dataobject.h"
20
21 /* FIXME: the following should be moved to one of the wine/obj_XXX.h headers */
22
23 /*****************************************************************************
24  * CoXXX API
25  */
26 /* FIXME: more CoXXX functions are missing */
27 DWORD WINAPI CoBuildVersion(void);
28
29 typedef enum tagCOINIT
30 {
31     COINIT_APARTMENTTHREADED  = 0x2, /* Apartment model */
32     COINIT_MULTITHREADED      = 0x0, /* OLE calls objects on any thread */
33     COINIT_DISABLE_OLE1DDE    = 0x4, /* Don't use DDE for Ole1 support */
34     COINIT_SPEED_OVER_MEMORY  = 0x8  /* Trade memory for speed */
35 } COINIT;
36
37 HRESULT WINAPI CoInitialize16(LPVOID lpReserved);
38 HRESULT WINAPI CoInitialize32(LPVOID lpReserved);
39 #define CoInitialize WINELIB_NAME(CoInitialize)
40
41 HRESULT WINAPI CoInitializeEx32(LPVOID lpReserved, DWORD dwCoInit);
42 #define CoInitializeEx WINELIB_NAME(CoInitializeEx)
43
44 void WINAPI CoUninitialize16(void);
45 void WINAPI CoUninitialize32(void);
46 #define CoUninitialize WINELIB_NAME(CoUninitialize)
47
48 HRESULT WINAPI CoCreateGuid(GUID *pguid);
49
50 /* class registration flags; passed to CoRegisterClassObject */
51 typedef enum tagREGCLS
52 {
53     REGCLS_SINGLEUSE = 0,
54     REGCLS_MULTIPLEUSE = 1,
55     REGCLS_MULTI_SEPARATE = 2,
56     REGCLS_SUSPENDED = 4
57 } REGCLS;
58
59 HRESULT WINAPI CoRegisterClassObject16(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister);
60 HRESULT WINAPI CoRegisterClassObject32(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsContext,DWORD flags,LPDWORD lpdwRegister);
61 #define CoRegisterClassObject WINELIB_NAME(CoRegisterClassObject)
62
63 HRESULT WINAPI CoRevokeClassObject32(DWORD dwRegister);
64 #define CoRevokeClassObject WINELIB_NAME(CoRevokeClassObject)
65
66 HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext,LPVOID pvReserved, const REFIID iid, LPVOID *ppv);
67
68
69 HRESULT WINAPI CoCreateInstance(REFCLSID rclsid,LPUNKNOWN pUnkOuter,DWORD dwClsContext,REFIID iid,LPVOID *ppv);
70 void WINAPI CoFreeLibrary(HINSTANCE32 hLibrary);
71 void WINAPI CoFreeAllLibraries(void);
72 void WINAPI CoFreeUnusedLibraries(void);
73 HRESULT WINAPI CoFileTimeNow(FILETIME *lpFileTime);
74 LPVOID WINAPI CoTaskMemAlloc(ULONG size);
75 void WINAPI CoTaskMemFree(LPVOID ptr);
76 HINSTANCE32 WINAPI CoLoadLibrary(LPOLESTR16 lpszLibName, BOOL32 bAutoFree);
77
78 HRESULT WINAPI CoLockObjectExternal16(LPUNKNOWN pUnk,BOOL16 fLock,BOOL16 fLastUnlockReleases);
79 HRESULT WINAPI CoLockObjectExternal32(LPUNKNOWN pUnk,BOOL32 fLock,BOOL32 fLastUnlockReleases);
80 #define CoLockObjectExternal WINELIB_NAME(CoLockObjectExternal)
81
82
83 /* internal Wine stuff */
84
85
86 /*****************************************************************************
87  * IClassFactory interface
88  */
89
90 typedef struct _IClassFactory {
91     /* IUnknown fields */
92     ICOM_VTABLE(IClassFactory)* lpvtbl;
93     DWORD                       ref;
94 } _IClassFactory;
95
96 HRESULT WINE_StringFromCLSID(const CLSID *id, LPSTR);
97
98
99 /*****************************************************************************
100  * IMalloc interface
101  */
102 /* private prototypes for the constructors */
103 LPMALLOC16      IMalloc16_Constructor(void);
104 LPMALLOC32      IMalloc32_Constructor(void);
105
106
107 /*****************************************************************************
108  * IUnknown interface
109  */
110
111 typedef struct _IUnknown {
112     /* IUnknown fields */
113     ICOM_VTABLE(IUnknown)* lpvtbl;
114     DWORD                  ref;
115 } _IUnknown;
116
117 LPUNKNOWN       IUnknown_Constructor(void);
118
119 #endif /* __WINE_OBJBASE_H */