10 #include "winversion.h"
12 #include "wine/obj_base.h"
13 #include "wine/obj_moniker.h"
16 #include "debugtools.h"
18 DEFAULT_DEBUG_CHANNEL(ole
);
20 static WCHAR _delimiter
[2] = {'!',0}; /* default delimiter apparently */
21 static WCHAR
*pdelimiter
= &_delimiter
[0];
23 /***********************************************************************
24 * RegisterActiveObject
26 HRESULT WINAPI
RegisterActiveObject(
27 LPUNKNOWN punk
,REFCLSID rcid
,DWORD dwFlags
,LPDWORD pdwRegister
31 LPRUNNINGOBJECTTABLE runobtable
;
34 StringFromGUID2(rcid
,guidbuf
,39);
35 ret
= CreateItemMoniker(pdelimiter
,guidbuf
,&moniker
);
38 ret
= GetRunningObjectTable(0,&runobtable
);
40 IMoniker_Release(moniker
);
43 ret
= IRunningObjectTable_Register(runobtable
,dwFlags
,punk
,moniker
,pdwRegister
);
44 IRunningObjectTable_Release(runobtable
);
45 IMoniker_Release(moniker
);
49 /***********************************************************************
52 HRESULT WINAPI
RevokeActiveObject(DWORD xregister
,LPVOID reserved
)
54 LPRUNNINGOBJECTTABLE runobtable
;
57 ret
= GetRunningObjectTable(0,&runobtable
);
58 if (FAILED(ret
)) return ret
;
59 ret
= IRunningObjectTable_Revoke(runobtable
,xregister
);
60 if (SUCCEEDED(ret
)) ret
= S_OK
;
61 IRunningObjectTable_Release(runobtable
);
65 /***********************************************************************
68 HRESULT WINAPI
GetActiveObject(REFCLSID rcid
,LPVOID preserved
,LPUNKNOWN
*ppunk
)
72 LPRUNNINGOBJECTTABLE runobtable
;
75 StringFromGUID2(rcid
,guidbuf
,39);
76 ret
= CreateItemMoniker(pdelimiter
,guidbuf
,&moniker
);
79 ret
= GetRunningObjectTable(0,&runobtable
);
81 IMoniker_Release(moniker
);
84 ret
= IRunningObjectTable_GetObject(runobtable
,moniker
,ppunk
);
85 IRunningObjectTable_Release(runobtable
);
86 IMoniker_Release(moniker
);
90 /***********************************************************************
91 * OaBuildVersion [OLEAUT32.170]
93 * known OLEAUT32.DLL versions:
94 * OLE 2.1 NT 1993-95 10 3023
96 * OLE 2.20 W95/NT 1993-96 20 4112
97 * OLE 2.20 W95/NT 1993-96 20 4118
98 * OLE 2.20 W95/NT 1993-96 20 4122
99 * OLE 2.30 W95/NT 1993-98 30 4265
100 * OLE 2.40 NT?? 1993-98 40 4267
101 * OLE 2.40 W98 SE orig. file 1993-98 40 4275
103 UINT WINAPI
OaBuildVersion()
105 FIXME("Please report to a.mohr@mailto.de if you get version error messages !\n");
106 switch(VERSION_GetVersion())
109 return MAKELONG(4049, 20); /* from Win32s 1.1e */
111 return MAKELONG(4265, 30);
113 return MAKELONG(4275, 40); /* value of W98 SE; orig. W98 AFAIK has 4265, 30 just as W95 */
115 return MAKELONG(4265, 30); /* value borrowed from Win95 */
117 return MAKELONG(4122, 20); /* ouch ! Quite old, I guess */
119 ERR("Version value not known yet. Please investigate it !\n");
124 HRESULT WINAPI
OLEAUT32_DllRegisterServer() {
128 HRESULT WINAPI
OLEAUT32_DllUnregisterServer() {