Release 960114
[wine/gsoc-2012-control.git] / misc / compobj.c
blob026b681238fe9db2b3e54c27756821fee165ffa5
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 WINAPI 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 WINAPI 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 WINAPI 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 WINAPI CoDisconnectObject(
67 LPUNKNOWN lpUnk,
68 DWORD reserved)
70 dprintf_ole(stdnimp,"CoDisconnectObject:%p %lx\n",lpUnk,reserved);
71 return OLE_OK;