Previous | Next |
IComponentAuthenticate *pAuth = NULL;
CSecureChannelClient SAC;
hr = CoCreateInstance(CLSID_MediaDevMgr, NULL, CLSCTX_INPROC_SERVER,
IID_IComponentAuthenticate, (void**)&pAuth);
if (SUCCEEDED(hr))
{
pCert = LockResource(hCert);
hr = SAC.SetCertificate((BYTE*)abCert, sizeof(abCert),
(BYTE*)abPVK, sizeof(abPVK));
SAC.SetInterface(pAuth);
hr = SAC.Authenticate(SAC_PROTOCOL_V1);
if (FAILED(hr))
goto exit;
hr = pAuth->QueryInterface(IID_IWMDeviceManager,
(void**)&pDevMgr);
if (FAILED(hr))
goto exit;
}
See Also
Previous | Next |