combase: Move CoImpersonateClient().
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:
parent
6d9056698f
commit
12a9547e4f
|
@ -547,3 +547,23 @@ HRESULT WINAPI CoQueryClientBlanket(DWORD *authn_service, DWORD *authz_service,
|
|||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoImpersonateClient (combase.@)
|
||||
*/
|
||||
HRESULT WINAPI CoImpersonateClient(void)
|
||||
{
|
||||
IServerSecurity *server_security;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = CoGetCallContext(&IID_IServerSecurity, (void **)&server_security);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IServerSecurity_ImpersonateClient(server_security);
|
||||
IServerSecurity_Release(server_security);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
@ stub CoGetStdMarshalEx
|
||||
@ stub CoGetSystemSecurityPermissions
|
||||
@ stdcall CoGetTreatAsClass(ptr ptr) ole32.CoGetTreatAsClass
|
||||
@ stdcall CoImpersonateClient() ole32.CoImpersonateClient
|
||||
@ stdcall CoImpersonateClient()
|
||||
@ stdcall CoIncrementMTAUsage(ptr) ole32.CoIncrementMTAUsage
|
||||
@ stdcall CoInitializeEx(ptr long) ole32.CoInitializeEx
|
||||
@ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr) ole32.CoInitializeSecurity
|
||||
|
|
|
@ -4250,44 +4250,6 @@ HRESULT WINAPI CoSwitchCallContext(IUnknown *pObject, IUnknown **ppOldObject)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoImpersonateClient [OLE32.@]
|
||||
*
|
||||
* Impersonates the client of the currently executing server call in the
|
||||
* current thread.
|
||||
*
|
||||
* PARAMS
|
||||
* None.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: S_OK.
|
||||
* Failure: HRESULT code.
|
||||
*
|
||||
* NOTES
|
||||
* If this function fails then the current thread will not be impersonating
|
||||
* the client and all actions will take place on behalf of the server.
|
||||
* Therefore, it is important to check the return value from this function.
|
||||
*
|
||||
* SEE ALSO
|
||||
* CoRevertToSelf, CoQueryClientBlanket, CoGetCallContext.
|
||||
*/
|
||||
HRESULT WINAPI CoImpersonateClient(void)
|
||||
{
|
||||
IServerSecurity *pSrvSec;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
hr = CoGetCallContext(&IID_IServerSecurity, (void **)&pSrvSec);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IServerSecurity_ImpersonateClient(pSrvSec);
|
||||
IServerSecurity_Release(pSrvSec);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* CoRevertToSelf [OLE32.@]
|
||||
*
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
@ stdcall CoGetState(ptr)
|
||||
@ stub CoGetTIDFromIPID
|
||||
@ stdcall CoGetTreatAsClass(ptr ptr)
|
||||
@ stdcall CoImpersonateClient()
|
||||
@ stdcall CoImpersonateClient() combase.CoImpersonateClient
|
||||
@ stdcall CoIncrementMTAUsage(ptr)
|
||||
@ stdcall CoInitialize(ptr)
|
||||
@ stdcall CoInitializeEx(ptr long)
|
||||
|
|
Loading…
Reference in New Issue