ConnectByCookieAsync

Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session.

This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The returned 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 callbacks).

If you want to execute synchronously, use ConnectByCookie instead.?

 

JavaScript

 

ConnectByCookieAsync(

       URL,

       sCookie,

       bRememberMe)

 

C#

 

ITerraExplorerAsync80 ConnectByCookieAsync (

       string URL,

       string sCookie,

       [bool bRememberMe = False])      

 

C++

 

HRESULT ConnectByCookieAsync (

       BSTR URL,

       BSTR sCookie,

       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.

sCookie

The SGS cookie generated by SGS when the user originally logged in. This cookie is used to identify a returning user.

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.