Added new API. Part of it was in 'include/objbase.h' before and part

of it is new. Now it also contains 'WINE_StringFromCLSID'. It's not
perfect but it's better than having it in 'include/objbase.h'.
oldstable
Francois Gouget 1999-02-17 17:32:55 +00:00 committed by Alexandre Julliard
parent 289211cc3b
commit b385815d59
1 changed files with 75 additions and 0 deletions

View File

@ -815,5 +815,80 @@ HRESULT WINAPI CoGetMalloc16(DWORD dwMemContext,LPMALLOC16* lpMalloc);
HRESULT WINAPI CoGetMalloc32(DWORD dwMemContext,LPMALLOC32* lpMalloc);
#define CoGetMalloc WINELIB_NAME(CoGetMalloc)
LPVOID WINAPI CoTaskMemAlloc(ULONG size);
void WINAPI CoTaskMemFree(LPVOID ptr);
/* FIXME: unimplemented */
LPVOID WINAPI CoTaskMemRealloc(LPVOID ptr, ULONG size);
/*****************************************************************************
* Additional API
*/
HRESULT WINAPI CoCreateGuid(GUID* pguid);
void WINAPI CoFreeAllLibraries(void);
void WINAPI CoFreeLibrary(HINSTANCE32 hLibrary);
void WINAPI CoFreeUnusedLibraries(void);
HRESULT WINAPI CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv);
HRESULT WINAPI CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, LPVOID pvReserved, REFIID iid, LPVOID *ppv);
HRESULT WINAPI CoInitialize16(LPVOID lpReserved);
HRESULT WINAPI CoInitialize32(LPVOID lpReserved);
#define CoInitialize WINELIB_NAME(CoInitialize)
typedef enum tagCOINIT
{
COINIT_APARTMENTTHREADED = 0x2, /* Apartment model */
COINIT_MULTITHREADED = 0x0, /* OLE calls objects on any thread */
COINIT_DISABLE_OLE1DDE = 0x4, /* Don't use DDE for Ole1 support */
COINIT_SPEED_OVER_MEMORY = 0x8 /* Trade memory for speed */
} COINIT;
HRESULT WINAPI CoInitializeEx32(LPVOID lpReserved, DWORD dwCoInit);
#define CoInitializeEx WINELIB_NAME(CoInitializeEx)
/* FIXME: not implemented */
BOOL32 WINAPI CoIsOle1Class(REFCLSID rclsid);
HINSTANCE32 WINAPI CoLoadLibrary(LPOLESTR16 lpszLibName, BOOL32 bAutoFree);
HRESULT WINAPI CoLockObjectExternal16(LPUNKNOWN pUnk, BOOL16 fLock, BOOL16 fLastUnlockReleases);
HRESULT WINAPI CoLockObjectExternal32(LPUNKNOWN pUnk, BOOL32 fLock, BOOL32 fLastUnlockReleases);
#define CoLockObjectExternal WINELIB_NAME(CoLockObjectExternal)
/* class registration flags; passed to CoRegisterClassObject */
typedef enum tagREGCLS
{
REGCLS_SINGLEUSE = 0,
REGCLS_MULTIPLEUSE = 1,
REGCLS_MULTI_SEPARATE = 2,
REGCLS_SUSPENDED = 4
} REGCLS;
HRESULT WINAPI CoRegisterClassObject16(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister);
HRESULT WINAPI CoRegisterClassObject32(REFCLSID rclsid,LPUNKNOWN pUnk,DWORD dwClsContext,DWORD flags,LPDWORD lpdwRegister);
#define CoRegisterClassObject WINELIB_NAME(CoRegisterClassObject)
HRESULT WINAPI CoRevokeClassObject32(DWORD dwRegister);
#define CoRevokeClassObject WINELIB_NAME(CoRevokeClassObject)
void WINAPI CoUninitialize16(void);
void WINAPI CoUninitialize32(void);
#define CoUninitialize WINELIB_NAME(CoUninitialize)
/*****************************************************************************
* Internal WINE API
*/
#ifdef __WINE__
HRESULT WINE_StringFromCLSID(const CLSID *id, LPSTR);
#endif
#endif /* __WINE_WINE_OBJ_BASE_H */