Release 960516
[wine.git] / misc / compobj.c
blob106aaedc89005ebfa6a3fcfb567f507e9498a965
1 /*
2 * COMPOBJ library
4 * Copyright 1995 Martin von Loewis
5 */
7 /* At the moment, these are only empty stubs.
8 */
10 #include "windows.h"
11 #include "compobj.h"
12 #include "ole.h"
13 #include "ole2.h"
14 #include "stddebug.h"
15 #include "debug.h"
17 DWORD currentMalloc=0;
19 /***********************************************************************
20 * CoBuildVersion [COMPOBJ.1]
22 DWORD CoBuildVersion()
24 dprintf_ole(stddeb,"CoBuildVersion()\n");
25 return (rmm<<16)+rup;
28 /***********************************************************************
29 * CoInitialize [COMPOBJ.2]
30 * lpReserved is an IMalloc pointer in 16bit OLE. We just stored it as-is.
32 HRESULT CoInitialize(DWORD lpReserved)
34 dprintf_ole(stdnimp,"CoInitialize\n");
35 /* remember the LPMALLOC, maybe somebody wants to read it later on */
36 currentMalloc = lpReserved;
37 return S_OK;
40 /***********************************************************************
41 * CoUnitialize [COMPOBJ.3]
43 void CoUnitialize()
45 dprintf_ole(stdnimp,"CoUnitialize()\n");
48 /***********************************************************************
49 * CoGetMalloc [COMPOBJ.4]
51 HRESULT CoGetMalloc(DWORD dwMemContext, DWORD * lpMalloc)
53 if(currentMalloc)
55 *lpMalloc = currentMalloc;
56 return S_OK;
58 *lpMalloc = 0;
59 /* 16-bit E_NOTIMPL */
60 return 0x80000001L;
63 /***********************************************************************
64 * CoDisconnectObject
66 OLESTATUS CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
68 dprintf_ole(stdnimp,"CoDisconnectObject:%p %lx\n",lpUnk,reserved);
69 return OLE_OK;