Platform SDK: Smart Card Enrollment Control |
The getEnrolledCertificateName method retrieves the name of the certificate resulting from an earlier successful call to ISCrdEnr::enroll. This method can also be used to display the certificate in a dialog box. This method calls the CryptoAPI function CertGetNameString.
objSCEnroll.getEnrolledCertificateName( _ dwFlags As Long ) As String
String representing the retrieved certificate name.
Because this method operates on an existing certificate, you must have successfully called IScrdEnr::enroll before you can call getEnrolledCertificateName.
The getEnrolledCertificateName method calls the CertGetNameString function to retrieve the certificate name according to the sequence described for the CERT_NAME_SIMPLE_DISPLAY_TYPE value of CertGetNameString's dwType parameter.
' Define the constant. Const SCARD_ENROLL_NO_DISPLAY_CERT = 1 Dim strEnrolledCert ' Retrieve the name of the enrolled certificate and ' display the certificate viewer dialog box. strEnrolledCert = Senroll.getEnrolledCertificateName(0) ' Retrieve the name of the enrolled certificate ' without displaying the certificate viewer dialog box. strEnrolledCert = Senroll.getEnrolledCertificateName(SCARD_ENROLL_NO_DISPLAY_CERT)
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Library: Included as a resource in Scrdenrl.dll.