📄 helperfunctions.cpp
字号:
HRESULT CoQueryProxyBlanket( IUnknown * pProxy,
DWORD * pAuthnSvc,
DWORD * pAuthzSvc,
OLECHAR ** pServerPrincName,
DWORD * pAuthnLevel,
DWORD * pImpLevel,
RPC_AUTH_IDENTITY_HANDLE * ppAuthInfo,
DWORD * pCapabilities )
{
pProxy->QueryInterface(IID_IClientSecurity, (void**)&pcs);
pcs->QueryBlanket(pProxy, pAuthnSvc, pAuthzSvc,
pServerPrincName, pAuthnLevel, pImpLevel, ppAuthInfo,
pCapabilities);
pcs->Release();
}
HRESULT CoSetProxyBlanket( IUnknown * pProxy,
DWORD dwAuthnSvc,
DWORD dwAuthzSvc,
WCHAR * pServerPrincName,
DWORD dwAuthnLevel,
DWORD dwImpLevel,
RPC_AUTH_IDENTITY_HANDLE pAuthInfo,
DWORD dwCapabilities )
{
pProxy->QueryInterface(IID_IClientSecurity, (void**)&pcs);
pcs->SetBlanket(pProxy, dwAuthnSvc, dwAuthzSvc,
pServerPrincName, dwAuthnLevel, dwImpLevel, pAuthInfo,
dwCapabilities);
pcs->Release();
}
HRESULT CoCopyProxy( IUnknown * pProxy,
IUnknown ** ppCopy )
{
pProxy->QueryInterface(IID_IClientSecurity, (void**)&pcs);
pcs->CopyProxy(punkProxy, ppunkCopy);
pcs->Release();
}
HRESULT CoQueryClientBlanket( IUnknown * pProxy,
DWORD * pAuthnSvc,
DWORD * pAuthzSvc,
OLECHAR ** pServerPrincName,
DWORD * pAuthnLevel,
DWORD * pImpLevel,
RPC_AUTHZ_HANDLE * pPrivs,
DWORD ** pCapabilities )
{
CoGetCallContext(IID_IServerSecurity, (void**)&pss);
pss->QueryBlanket(pAuthnSvc, pAuthzSvc, pServerPrincName,
pAuthnLevel, pImpLevel, pPrivs, pCapabilities);
pss->Release();
}
CoImpersonateClient()
{
CoGetCallContext(IID_IServerSecurity, (void **)&pss);
pss->ImpersonateClient();
pss->Release();
}
CoRevertToSelf()
{
CoGetCallContext(IID_IServerSecurity, (void **)&pss);
pss->RevertToSelf();
pss->Release();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -