ISCrdEnr::getEnrolledCertificateName method

The getEnrolledCertificateName method retrieves the name of the certificate resulting from an earlier successful call to ISCrdEnr::enroll.

This method can also be used to display the certificate in a dialog box. This method calls the CryptoAPI function CertGetNameString.

Syntax

HRESULT getEnrolledCertificateName(
  [in]  DWORD     dwFlags,
  [out] BSTR *pBstrCertName
);

SCrdEnr.getEnrolledCertificateName( _
  ByVal dwFlags, _
  ByRef pBstrCertName _
)

Parameters

dwFlags [in]

A value that determines whether the certificate is displayed in a dialog box. If this value is SCARD_ENROLL_NO_DISPLAY_CERT (defined as 0x01), the enrolled certificate is not displayed; any other values cause the enrolled certificate to be displayed in the Certificate dialog box.

pBstrCertName [out]

A pointer to a string that returns the retrieved certificate name.

Return value

C++

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

A string that represents the retrieved certificate name.

Remarks

Because this method operates on an existing certificate, you must have successfully called ISCrdEnr::enroll before you can call getEnrolledCertificateName.

The getEnrolledCertificateName method calls the CertGetNameString function to retrieve the certificate name according to the sequence described for the CERT_NAME_SIMPLE_DISPLAY_TYPE value of CertGetNameString's dwType parameter.

Requirements

Requirement Value
Minimum supported client
None supported
Minimum supported server
Windows Server 2003 [desktop apps only]
DLL
Scrdenrl.dll
IID
IID_ISCrdEnr is defined as 753988a1-1357-436d-9cf5-f089bdd67d64

See also

ISCrdEnr

ISCrdEnr::enroll