Share via


ISCrdEnr::enroll method

The enroll method is used to request a certificate on behalf of the user and store the resulting certificate on the user's smart card.

Syntax

HRESULT enroll(
   LONG dwFlags
);

Parameters

  • dwFlags
    Reserved for future use. Set this value to zero.

Remarks

During the processing of this method, the resulting certificate will be available for storage on the smart card. Before the certificate is written to the smart card, the user will be prompted for the smart card PIN and, if necessary, for confirmation to overwrite the smart card's existing credentials. If the user does not enter the correct PIN number, or if the user declines to overwrite the smart card's existing credentials, this method will fail.

When re-issuing a smart card that previously contained a certificate, it may be necessary to run vendor-specific personalization software (prior to enrolling with the Smart Card Enrollment control) to ensure that a different public/private key pair is generated for the smart card. Consult your smart card vendor's documentation for instructions.

Valid names for the following items are mandatory for this method to be successful.

Method or property to use Valid name required
ISCrdEnr::setCAName Certification authority (CA)
ISCrdEnr::setCertTemplateName Certificate template
ISCrdEnr::CSPName Cryptographic Service Provider
ISCrdEnr::selectSigningCertificate

ISCrdEnr::setSigningCertificate

Signing certificate
ISCrdEnr::selectUserName

ISCrdEnr::setUserName

User

 

The caller can retrieve the resulting certificate by means of ISCrdEnr::getEnrolledCertificateName.

Requirements

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::getEnrolledCertificateName