Compartilhar via


IMsTscNonScriptable::put_BinaryPassword (Windows CE 5.0)

Send Feedback

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

HRESULT put_BinaryPassword(BSTRnewPassword);

Parameters

  • newPassword
    [in] String with password part, specified in binary-encoded 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

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

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

See Also

IMsTscNonScriptable | get_BinaryPassword

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.