Platform SDK: Smart Card Enrollment Control

ISCrdEnr::getCACount

The getCACount method returns the number of Windows 2000 Enterprise certification authorities (CAs) willing to issue a certificate based on the specified certificate template.

objSCEnroll.getCACount( _
    bstrCertTemplateName As String) As Long

Parameters

objSCEnroll
Object expression that resolves to a SCrdEnr object.
bstrCertTemplateName
String representing the name of the certificate template.

Return Values

Long value representing the number of available CAs that will issue a certificate for the certificate template specified in bstrCertTemplateName.

Example Code in VBScript

Dim nCount

' strCTName is the name of a certificate template.
nCount = Senroll.getCACount(strCTName)
If ( 0 = nCount ) Then
    MsgBox("No CA available for the specified certificate template.")
Else
    MsgBox("Number of CAs is " & nCount )
End If

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