Platform SDK: Smart Card Enrollment Control

ISCrdEnr::setCAName

The setCAName method specifies the name of the certification authority (CA).

objSCEnroll.setCAName( _
    dwFlags As Long, _
    bstrCertTemplateName As String, _
    bstrCAName As String)

Parameters

objSCEnroll
Object expression that resolves to a SCrdEnr object.
dwFlags
Value that specifies whether the name refers to the CA name or the CA's machine name. If this value is SCARD_ENROLL_CA_MACHINE_NAME (defined as 0x01), the name refers to the CA's machine name. Otherwise, the name refers to the CA name.
bstrCertTemplateName
Name of the certificate template.
bstrCAName
CA name to be used with the certificate template specified by bstrCertTemplateName.

Return Values

This method has no return values.

Remarks

Use this method to specify a CA for a certificate template.

Example Code in VBScript

' Define the constant.
Const SCARD_ENROLL_CA_MACHINE_NAME = 1

' Specify the machine and CA name.
' In this sample, the certificate template is
' specified by strCertTemplateName.
' 1) Specify the machine name.
Senroll.setCAName SCARD_ENROLL_CA_MACHINE_NAME, _
                  strCertTemplateName, _
                  "MyServer"

' 2) Specify the CA name.
Senroll.setCAName 0, _
                  strCertTemplateName, _
                  "MyCA" 

Requirements

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

See Also

ISCrdEnr::enumCAName, ISCrdEnr::getCAName