combase: Move CoRevertToSelf().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-08-07 09:11:43 +03:00 committed by Alexandre Julliard
parent 9c181981d2
commit 8d6d5a56b8
4 changed files with 22 additions and 35 deletions

View file

@ -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;
}

View file

@ -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()

View file

@ -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 */

View file

@ -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