1 #ifndef __WINE_OBJBASE_H
2 #define __WINE_OBJBASE_H
5 #include "wine/obj_base.h"
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"
14 /* the following depend on obj_storage.h */
15 #include "wine/obj_moniker.h"
16 #include "wine/obj_propertystorage.h"
18 /* the following depend on obj_moniker.h */
19 #include "wine/obj_dataobject.h"
21 /* FIXME: the following should be moved to one of the wine/obj_XXX.h headers */
23 /*****************************************************************************
26 /* FIXME: more CoXXX functions are missing */
27 DWORD WINAPI CoBuildVersion(void);
29 typedef enum tagCOINIT
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 */
37 HRESULT WINAPI CoInitialize16(LPVOID lpReserved);
38 HRESULT WINAPI CoInitialize32(LPVOID lpReserved);
39 #define CoInitialize WINELIB_NAME(CoInitialize)
41 HRESULT WINAPI CoInitializeEx32(LPVOID lpReserved, DWORD dwCoInit);
42 #define CoInitializeEx WINELIB_NAME(CoInitializeEx)
44 void WINAPI CoUninitialize16(void);
45 void WINAPI CoUninitialize32(void);
46 #define CoUninitialize WINELIB_NAME(CoUninitialize)
48 HRESULT WINAPI CoCreateGuid(GUID *pguid);
50 /* class registration flags; passed to CoRegisterClassObject */
51 typedef enum tagREGCLS
54 REGCLS_MULTIPLEUSE = 1,
55 REGCLS_MULTI_SEPARATE = 2,
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)
63 HRESULT WINAPI CoRevokeClassObject32(DWORD dwRegister);
64 #define CoRevokeClassObject WINELIB_NAME(CoRevokeClassObject)
66 HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext,LPVOID pvReserved, const REFIID iid, LPVOID *ppv);
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);
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)
83 /* internal Wine stuff */
86 /*****************************************************************************
87 * IClassFactory interface
90 typedef struct _IClassFactory {
92 ICOM_VTABLE(IClassFactory)* lpvtbl;
96 HRESULT WINE_StringFromCLSID(const CLSID *id, LPSTR);
99 /*****************************************************************************
102 /* private prototypes for the constructors */
103 LPMALLOC16 IMalloc16_Constructor(void);
104 LPMALLOC32 IMalloc32_Constructor(void);
107 /*****************************************************************************
111 typedef struct _IUnknown {
112 /* IUnknown fields */
113 ICOM_VTABLE(IUnknown)* lpvtbl;
117 LPUNKNOWN IUnknown_Constructor(void);
119 #endif /* __WINE_OBJBASE_H */