Share via


IMsTscAx::put_UserName (Windows Embedded CE 6.0)

1/6/2010

This method sets the value of the UserName property, which specifies the user name logon credential.

Syntax

HRESULT put_UserName(
  BSTR userName
);

Parameters

  • userName
    [in] The string value UserName is to be set to.

Return Value

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

Header discodlg.h, mstsax.idl
Library Mstsax.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IMsTscAx
IMsTscAx::get_UserName