Platform SDK: Smart Card Enrollment Control |
The setUserName method specifies the name of the user on whose behalf the certificate enrollment is intended.
objSCEnroll.setUserName (dwFlags As Long, _ bstrUserName As String)
Set this value to SCARD_ENROLL_UPN_NAME, if the name specified in bstrUserName is the user's Universal Principal Name, such as "someone@microsoft.com". The user's UPN name must correspond to an existing security access manager (SAM) name.
Set this value to SCARD_ENROLL_SAM_COMPATIBLE_NAME, if the name specified in bstrUserName is the user's SAM name in the format of "DOMAIN\USER".
Call this method to specify the user name to be issued the smart card. An alternative to setUserName is ISCrdEnr::selectUserName.
Once a user name has been specified, its value can be retrieved by calling getUserName.
' Define the constants. Const SCARD_ENROLL_UPN_NAME = 1 Const SCARD_ENROLL_SAM_COMPATIBLE_NAME = 2 ' Specify the user name. Senroll.setUserName SCARD_ENROLL_SAM_COMPATIBLE_NAME, _ "DOMAIN1\User1"
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Library: Included as a resource in Scrdenrl.dll.
ISCrdEnr::getUserName, ISCrdEnr::resetUser, ISCrdEnr::selectUserName