Release 960712
[wine/multimedia.git] / misc / compobj.c
blobc7c76a2568c4795d67b3f06320f519409d8c2a11
1 /*
2 * COMPOBJ library
4 * Copyright 1995 Martin von Loewis
5 */
7 /* At the moment, these are only empty stubs.
8 */
10 #include "ole.h"
11 #include "ole2.h"
12 #include "stddebug.h"
13 #include "debug.h"
15 DWORD currentMalloc=0;
17 /***********************************************************************
18 * CoBuildVersion [COMPOBJ.1]
20 DWORD CoBuildVersion()
22 dprintf_ole(stddeb,"CoBuildVersion()\n");
23 return (rmm<<16)+rup;
26 /***********************************************************************
27 * CoInitialize [COMPOBJ.2]
28 * lpReserved is an IMalloc pointer in 16bit OLE. We just stored it as-is.
30 HRESULT CoInitialize(DWORD lpReserved)
32 dprintf_ole(stdnimp,"CoInitialize\n");
33 /* remember the LPMALLOC, maybe somebody wants to read it later on */
34 currentMalloc = lpReserved;
35 return S_OK;
38 /***********************************************************************
39 * CoUnitialize [COMPOBJ.3]
41 void CoUnitialize()
43 dprintf_ole(stdnimp,"CoUnitialize()\n");
46 /***********************************************************************
47 * CoGetMalloc [COMPOBJ.4]
49 HRESULT CoGetMalloc(DWORD dwMemContext, DWORD * lpMalloc)
51 if(currentMalloc)
53 *lpMalloc = currentMalloc;
54 return S_OK;
56 *lpMalloc = 0;
57 /* 16-bit E_NOTIMPL */
58 return 0x80000001L;
61 /***********************************************************************
62 * CoDisconnectObject
64 OLESTATUS CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
66 dprintf_ole(stdnimp,"CoDisconnectObject:%p %lx\n",lpUnk,reserved);
67 return OLE_OK;