Platform SDK: Smart Card Enrollment Control

ISCrdEnr::setCertTemplateName

The setCertTemplateName method specifies the name of the certificate template.

objSCEnroll.setCertTemplateName( _
            dwFlags As Long, _
            bstrCertTemplateName As String )

Parameters

objSCEnroll
Object expression that resolves to a SCrdEnr object.
dwFlags
Value which determines if the certificate template's real name or display name is being set. If dwFlags has the value SCARD_ENROLL_CERT_TEMPLATE_DISPLAY_NAME, the certificate template's display name is set; otherwise, the real name of the certificate template is set.
bstrCertTemplateName
Name of the certificate template which will be used in the certificate request.

Return Values

This method has no return values.

Remarks

If you do not set the certificate template name by calling ISCrdEnr::setCertTemplateName, the name defaults to the first name in the list of available certificate templates.

Example Code in VBScript

' Set the cert template name.
' strCTName was determined through an enumeration of the 
' certificate templates (by means of enumCertTemplateName).
Senroll.setCertTemplateName 0, strCTName

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Library: Included as a resource in Scrdenrl.dll.

See Also

ISCrdEnr::getCertTemplateName