ConnectAsync

Connects TerraExplorer to a SkylineGlobe Server. This method cannot be used for a guest login.

This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

 

JavaScript

 

ConnectAsync(

       URL,

       UserName,

       Password,

       bRememberMe)

 

C#

 

ITerraExplorerAsync80 ConnectAsync (

       string URL,

       string UserName,

       string Password

       [bool bRememberMe = False])      

 

C++

 

HRESULT ConnectAsync (

       BSTR URL,

       BSTR UserName,

       BSTR Password,

       VARIANT_BOOL bRememberMe,

       ITerraExplorerAsync80** pITerraExplorerObject) )

Parameters

URL

The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.

UserName

The user name by which to connect to the SkylineGlobe Server.

Password

The password by which to connect to the SkylineGlobe Server.

bRememberMe

A Boolean that determines whether the login details should be remembered for automatic completion in future logins.

Return Value

pITerraExplorerObject

An ITerraExplorerAsync80 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.