IX509CertificateRequestPkcs10::IsSmartCard method (certenroll.h)

The IsSmartCard method retrieves a Boolean value that indicates whether any of the cryptographic providers associated with the request object is a smart card provider.

Syntax

HRESULT IsSmartCard(
  [out] VARIANT_BOOL *pValue
);

Parameters

[out] pValue

Pointer to a VARIANT_BOOL variable that indicates whether any of the enumerated and selected providers is a smart card provider.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code/value Description
CERTSRV_E_PROPERTY_EMPTY
The private key cannot be found, or the ICspInformation object associated with the private key cannot be found.
OLE_E_BLANK
The object is not initialized.

Remarks

The IsSmartCard method first checks the provider associated with the private key. If that provider is not for a smart card, the method iterates through the CspStatuses collection until it finds a selected provider that is. If no selected smart card providers are found, the method returns False. You must initialize the IX509CertificateRequestPkcs10 object before calling this method. For more information, see any of the following methods:

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See also

IX509CertificateRequestPkcs10