Platform SDK: Smart Card Enrollment Control |
The enumCAName method enumerates the names of the certification authorities (CAs) for a given certificate template name.
objSCEnroll.enumCAName( _ dwIndex As Long, _ dwFlags As Long, _ bstrCertTemplateName As String ) As String
String representing the name of the CA.
' Define the constants. Const SCARD_ENROLL_CA_MACHINE_NAME = 1 Dim strCTName, strMachine, strFullCAName Dim nCount, nIndex ' Specify the certificate template name. strCTName = "User" ' Retrieve the number of available CAs. nCount = Senroll.getCACount( strCTName ) If ( 0 = nCount ) Then MsgBox("No CAs available for the specified certificate template.") Else ' Display each CA name in a message box. For nIndex = 0 to nCount - 1 strFullCAName = Senroll.enumCAName( nIndex, _ SCARD_ENROLL_CA_MACHINE_NAME, _ strCTName) strFullCAName = strFullCAName & "\" strFullCAName = strFullCAName & _ Senroll.enumCAName( nIndex, _ 0, _ strCTName) MsgBox( strFullCAName ) Next End If
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Library: Included as a resource in Scrdenrl.dll.
ISCrdEnr::getCACount, ISCrdEnr::getCAName, ISCrdEnr::setCAName