Platform SDK: Smart Card Enrollment Control

ISCrdEnr::enumCSPName

The enumCSPName method enumerates the name of the available cryptographic service providers (CSPs).

objSCEnroll.enumCSPName( _
    dwIndex As Long, _
    dwFlags As Long ) As String

Parameters

objSCEnroll
Object expression that resolves to a SCrdEnr object.
dwIndex
Zero-based index for the enumeration sequence.
dwFlags
Reserved for future use. Set this value to 0.

Return Values

String representing the name of the enumerated CSP.

Example Code in VBScript

Dim nCount, nIndex, Element

' Determine the count of CSPs.
nCount = Senroll.CSPCount
If ( 0 = nCount ) Then
    MsgBox("No CSPs available.")
Else
    ' Display the CSPs in the list box.
    For nIndex = 0 to nCount - 1
       ' Add each CSP name to the CSP list
        Set Element=document.createElement("OPTION")
        Element.text=Senroll.enumCSPName( nIndex, 0 )
        Element.value=Element.text
        ' document.SCEnrForm.CSP.Options is a SELECT control.
        document.SCEnrForm.CSP.Options.Add Element
    Next
End If

Requirements

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

See Also

ISCrdEnr::CSPCount, ISCrdEnr::CSPName