Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This method sets the value of the UserName property, which specifies the user name logon credential.
HRESULT put_UserName(BSTR userName);
Parameters
- userName
[in] The string value UserName is to be set to.
Return Values
If the method succeeds, the return value is S_OK.
If it fails, the method returns a nonzero error code.
Remarks
Setting UserName is optional. If it is not set, the user can choose a username when the Windows Logon dialog box appears during the connection.
The UserName property can be set only if the control is not in the connected state. The method returns E_FAIL if it is called after the control is connected. You can check if the control is connected by calling the IMsTscAx::get_Connected method.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Discodlg.h. Mstsax.idl.
Link Library: Mstsax.lib.
See Also
IMsTscAx | IMsTscAx::get_UserName
Send Feedback on this topic to the authors