10 #include "winversion.h"
14 #include "debugtools.h"
20 DEFAULT_DEBUG_CHANNEL(ole);
22 static WCHAR _delimiter[2] = {'!',0}; /* default delimiter apparently */
23 static WCHAR *pdelimiter = &_delimiter[0];
25 /***********************************************************************
26 * RegisterActiveObject
28 HRESULT WINAPI RegisterActiveObject(
29 LPUNKNOWN punk,REFCLSID rcid,DWORD dwFlags,LPDWORD pdwRegister
33 LPRUNNINGOBJECTTABLE runobtable;
36 StringFromGUID2(rcid,guidbuf,39);
37 ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
40 ret = GetRunningObjectTable(0,&runobtable);
42 IMoniker_Release(moniker);
45 ret = IRunningObjectTable_Register(runobtable,dwFlags,punk,moniker,pdwRegister);
46 IRunningObjectTable_Release(runobtable);
47 IMoniker_Release(moniker);
51 /***********************************************************************
54 HRESULT WINAPI RevokeActiveObject(DWORD xregister,LPVOID reserved)
56 LPRUNNINGOBJECTTABLE runobtable;
59 ret = GetRunningObjectTable(0,&runobtable);
60 if (FAILED(ret)) return ret;
61 ret = IRunningObjectTable_Revoke(runobtable,xregister);
62 if (SUCCEEDED(ret)) ret = S_OK;
63 IRunningObjectTable_Release(runobtable);
67 /***********************************************************************
70 HRESULT WINAPI GetActiveObject(REFCLSID rcid,LPVOID preserved,LPUNKNOWN *ppunk)
74 LPRUNNINGOBJECTTABLE runobtable;
77 StringFromGUID2(rcid,guidbuf,39);
78 ret = CreateItemMoniker(pdelimiter,guidbuf,&moniker);
81 ret = GetRunningObjectTable(0,&runobtable);
83 IMoniker_Release(moniker);
86 ret = IRunningObjectTable_GetObject(runobtable,moniker,ppunk);
87 IRunningObjectTable_Release(runobtable);
88 IMoniker_Release(moniker);
92 /***********************************************************************
93 * OaBuildVersion [OLEAUT32.170]
95 * known OLEAUT32.DLL versions:
96 * OLE 2.1 NT 1993-95 10 3023
98 * OLE 2.20 W95/NT 1993-96 20 4112
99 * OLE 2.20 W95/NT 1993-96 20 4118
100 * OLE 2.20 W95/NT 1993-96 20 4122
101 * OLE 2.30 W95/NT 1993-98 30 4265
102 * OLE 2.40 NT?? 1993-98 40 4267
103 * OLE 2.40 W98 SE orig. file 1993-98 40 4275
105 UINT WINAPI OaBuildVersion()
107 FIXME("Please report to a.mohr@mailto.de if you get version error messages !\n");
108 switch(VERSION_GetVersion())
111 return MAKELONG(4049, 20); /* from Win32s 1.1e */
113 return MAKELONG(4265, 30);
115 return MAKELONG(4275, 40); /* value of W98 SE; orig. W98 AFAIK has 4265, 30 just as W95 */
117 return MAKELONG(4265, 30); /* value borrowed from Win95 */
119 return MAKELONG(4122, 20); /* ouch ! Quite old, I guess */
121 ERR("Version value not known yet. Please investigate it !\n");
126 /***********************************************************************
129 HRESULT WINAPI OLEAUT32_DllRegisterServer() {
134 /***********************************************************************
135 * DllUnregisterServer
137 HRESULT WINAPI OLEAUT32_DllUnregisterServer() {