IMsTscNonScriptable::put_ClearTextPassword (Windows CE 5.0)

Send Feedback

This method sets the connection password for the Remote Desktop ActiveX control in clear-text format. You can also call this method to set a clear-text password before converting it to either a portable encoded password or to a binary (nonportable) encoded password.

HRESULT put_ClearTextPassword(BSTR newClearTextPass);

Parameters

  • newClearTextPass
    [in] Connection password, specified in clear-text format.

Return Values

The following table shows the return values for this method.

Value Description
S_OK Password was correctly set.
E_FAIL The control is already connected or in the connecting state.
nonzero error code An error occurred.

Remarks

The password is passed to the server in the encrypted RDP communications channel. Once you set a clear-text password, you cannot retrieve it in clear-text format.

If you first call this method to set a password in clear-text format, you can then convert the password to encoded format.

To convert a clear-text password to encoded format

  1. Set the password in clear-text format by calling put_ClearTextPassword.
  2. To retrieve the password in binary (non-portable) encoded format, call get_BinaryPassword and get_BinarySalt. Both the encoded password part and the salt part are required to set a password in binary encoded format.
  3. To retrieve the password in portable encoded format, call get_PortablePassword and get_PortableSalt. Both parts are required to set a password in portable encoded format.

After following these steps, you can set the password in encoded format by calling put_BinaryPassword and put_BinarySalt, or put_PortablePassword and put_PortableSalt. Both calls are required.

To enable automatic logon, you must also set the UserName and Domain properties. If the password fails to authenticate the user, the Windows logon dialog box is displayed at the server to prompt the user for the password.

This property can be set only if the control is not in the connected state. The method returns E_FAIL if called when the control is connected. You can check if the control is connected by calling IMsTscAx::get_Connected.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Discodlg.h. Mstsax.idl.
Link Library: Mstsax.lib.

See Also

IMsTscNonScriptable

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.