TpmVirtualSmartCardManager class

The TpmVirtualSmartCardManager class manages TPM virtual smart cards on the local computer. This COM server is not available for remote callers.

Remarks

Managing TPM virtual smart cards requires elevated privileges. To properly create a TPM virtual smart card manager instance, the client should use the COM elevation moniker to activate the TPM virtual smart card manager. The TPM virtual smart card manager can be activated from both processes launched by administrators and processes launched by standard users.

For more information, see The COM Elevation Moniker. Generally, when activating through the COM elevation moniker, a UAC prompt for permission to proceed will appear. In the over-the-shoulder (OTS) elevation scenario, the calling process runs under a standard user account. The UAC prompt for an administrator credential appears, and after successfully authenticating the administrator credential, the COM server is launched with elevated privileges under the administrator credential.

Examples

The following example code shows how to create a COM instance of a TPM virtual smart card manager.

HRESULT hr = S_OK;
HWND hwnd; // Initialized with the parent window handle of UAC prompt.
ITpmVirtualSmartCardManager *pObj = NULL;

hr = CoCreateInstanceAsAdmin(
    hwnd,
    CLSID_TpmVirtualSmartCardManager,
    IID_ITpmVirtualSmartCardManager,
    (void**) &pObj);

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tpmvscmgr.h

IDL

Tpmvscmgr.idl

Library

Vscmgr.lib