Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 20 ++++++++++++++++++++ dlls/combase/combase.spec | 2 +- dlls/ole32/compobj.c | 33 --------------------------------- dlls/ole32/ole32.spec | 2 +- 4 files changed, 22 insertions(+), 35 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index e63cce00dda..7f1d6a63201 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -567,3 +567,23 @@ HRESULT WINAPI CoImpersonateClient(void)
return hr; } + +/*********************************************************************** + * CoRevertToSelf (combase.@) + */ +HRESULT WINAPI CoRevertToSelf(void) +{ + IServerSecurity *server_security; + HRESULT hr; + + TRACE("\n"); + + hr = CoGetCallContext(&IID_IServerSecurity, (void **)&server_security); + if (SUCCEEDED(hr)) + { + hr = IServerSecurity_RevertToSelf(server_security); + IServerSecurity_Release(server_security); + } + + return hr; +} diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec index 3122588d7e3..83a3d32aa65 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -149,7 +149,7 @@ @ stdcall CoReleaseServerProcess() ole32.CoReleaseServerProcess @ stdcall CoResumeClassObjects() ole32.CoResumeClassObjects @ stub CoRetireServer -@ stdcall CoRevertToSelf() ole32.CoRevertToSelf +@ stdcall CoRevertToSelf() @ stdcall CoRevokeClassObject(long) ole32.CoRevokeClassObject @ stdcall CoRevokeInitializeSpy(int64) ole32.CoRevokeInitializeSpy @ stdcall CoRevokeMallocSpy() diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 507cc451e20..06dd4aefc72 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -4250,39 +4250,6 @@ HRESULT WINAPI CoSwitchCallContext(IUnknown *pObject, IUnknown **ppOldObject) return S_OK; }
-/*********************************************************************** - * CoRevertToSelf [OLE32.@] - * - * Ends the impersonation of the client of the currently executing server - * call in the current thread. - * - * PARAMS - * None. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - * - * SEE ALSO - * CoImpersonateClient, CoQueryClientBlanket, CoGetCallContext. - */ -HRESULT WINAPI CoRevertToSelf(void) -{ - IServerSecurity *pSrvSec; - HRESULT hr; - - TRACE("\n"); - - hr = CoGetCallContext(&IID_IServerSecurity, (void **)&pSrvSec); - if (SUCCEEDED(hr)) - { - hr = IServerSecurity_RevertToSelf(pSrvSec); - IServerSecurity_Release(pSrvSec); - } - - return hr; -} - static BOOL COM_PeekMessage(struct apartment *apt, MSG *msg) { /* first try to retrieve messages for incoming COM calls to the apartment window */ diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 049dd0ad616..e23c57b4041 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -75,7 +75,7 @@ @ stdcall CoReleaseMarshalData(ptr) @ stdcall CoReleaseServerProcess() @ stdcall CoResumeClassObjects() -@ stdcall CoRevertToSelf() +@ stdcall CoRevertToSelf() combase.CoRevertToSelf @ stdcall CoRevokeClassObject(long) @ stdcall CoRevokeInitializeSpy(int64) @ stdcall CoRevokeMallocSpy() combase.CoRevokeMallocSpy