Platform SDK: Smart Card Enrollment Control |
The getUserName method retrieves the name of the user on whose behalf the certificate enrollment is intended. Before calling this method, you must specify the user name in a call to ISCrdEnr::selectUserName or ISCrdEnr::setUserName.
objSCEnroll.getUserName (dwFlags As Long) As String
If this value is SCARD_ENROLL_UPN_NAME, getUserName returns the user's Universal Principal Name, such as "someone@microsoft.com".
If this value is SCARD_ENROLL_SAM_COMPATIBLE_NAME, the method returns the user's security access manager (SAM) name in the format "DOMAIN\USER".
If this value is 0, the method returns the user's UPN name if it exists. If the user doesn't have a UPN name, the method returns the user's SAM name.
You can specify the name of the user to whom the smart card is issued by calling either ISCrdEnr::setUserName or ISCrdEnr::selectUserName. Once a user name has been specified, its value can be retrieved by calling getUserName.
' Retrieve the user name. Dim strUser strUser = Senroll.getUserName(0)
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Library: Included as a resource in Scrdenrl.dll.
ISCrdEnr::resetUser, ISCrdEnr::selectUserName, ISCrdEnr::setUserName