public method TradeDeskAut.LoginAsync

Brief

Establishes connection with the trade server. The method is implemented for asynchronous execution.

Declaration
Visual Basic
Sub LoginAsync (sLogin as String, sPassw as String, sUrl as String, sConnection as String, sSessionSubid as String, sPIN as String)
IDL
[id(396)] HRESULT LoginAsync( [in]BSTR sUser, [in]BSTR sPassword, [in]BSTR sUrl, [in]BSTR sConnection, [in]BSTR sSessionSubid, [in]BSTR sPIN)

Parameters
sLogin

The user name.

sPassw

The password.

sUrl

The URL of the host descriptor. This value is provided with the account.

sConnection

The name of the connection (e.g. Demo or Real). This value is provided with the account.

sSessionSubid

The identifier of the trading session.

For users who have multiple accounts of different types and get access to them using the same login/password: specify SubID of the trading session to which the user must be logged in. To get SubID, use the SubID property of the SessionDescriptorAut class.

For other users: specify an empty string ("").

sPIN

In case the PIN is required, specify the PIN provided with the account. Otherwise, specify an empty string ("").

To check whether the PIN is required to login, use the RequirePIN property of the SessionDescriptorAut class.

Details

The LoginAsync method is implemented for asynchronous execution.

To get the result of method execution, use the events of TradeDeskEventsSink.OnSessionStatusChanged or pending events of the kind KIND_SESSIONSTATUSCHANGE.

If an error occurs during login, the status Disconnected is returned. In this case you can get the text of the error using the TradeDeskAut.LastError property.

The LoginAsync method is defined in the TradeDeskAut class.

back