Partager via


IMsTscNonScriptable::put_BinaryPassword (Windows Embedded CE 6.0)

1/6/2010

This method sets the password part of a connection password for the Remote Desktop ActiveX control, in binary (nonportable) encoded format.

Syntax

HRESULT put_BinaryPassword(
  BSTR newPassword
);

Parameters

  • newPassword
    [in] String with password part, specified in binary-encoded format.

Return Value

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

You can also call this method to specify the password part of a connection password after you first call put_ClearTextPassword and then get_BinaryPassword to convert the password.

A binary-encoded (nonportable) password consists of an encoded binary password and an encoded binary salt value. Binary-encoded passwords do not appear in human-readable format and can be used only by the same user, and on the same machine where the password was encrypted. Binary-encoded passwords should not be considered strongly encrypted.

To set a password in binary-encoded format, you must call both put_BinaryPassword and put_BinarySalt.

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 the IMsTscAx::get_Connected method.

To enable automatic logon, you must also set the UserName, Domain, and BinarySalt 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.

Requirements

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

See Also

Reference

IMsTscNonScriptable
IMsTscNonScriptable::get_BinaryPassword