⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 helperfunctions.cpp

📁 VC++串口通信设。本书详细说明讲解了在VC++环境下编写串口通信得过程。值得一看
💻 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 + -