Nikolay Sivov : combase: Move CoRevertToSelf().
Alexandre Julliard
julliard at winehq.org
Fri Aug 7 16:31:21 CDT 2020
Module: wine
Branch: master
Commit: 8d6d5a56b8642f6f6171050baba91c1476baa72f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8d6d5a56b8642f6f6171050baba91c1476baa72f
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Aug 7 09:11:43 2020 +0300
combase: Move CoRevertToSelf().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 e63cce00dd..7f1d6a6320 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 3122588d7e..83a3d32aa6 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 507cc451e2..06dd4aefc7 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 049dd0ad61..e23c57b404 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
More information about the wine-cvs
mailing list