IX509PrivateKey::ReaderName property

The ReaderName property specifies or retrieves the name of a smart card reader.

This property is read/write.

Syntax


HRESULT put_ReaderName(
  [in]   BSTR Value
);

HRESULT get_ReaderName(
  [out]  BSTR *pValue
);

Property value

A BSTR that contains the reader name.

Error codes

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.

Name/valueMeaning
CERTSRV_E_PROPERTY_EMPTY

The property value could not be found.

HRESULT_FROM_WIN32(ERROR_FILE_READ_ONLY)

The key is open, and the property value cannot be set.

Remarks

If you set this property before opening a key, the reader name is concatenated to the name of the key container. The format is \\.\Reader_Name\Container_Name. Prepending the reader name to the key container name enables the name to be disambiguated in subsequent calls to a cryptographic provider. The private key is typically stored in the smart card key container when a smart card is used.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

CertEnroll.h

DLL

CertEnroll.dll

See also

IX509PrivateKey

 

 

Community Additions

ADD
Show:
© 2015 Microsoft