CreateInstance

This method is used to create an SGWorld80 instance from either the latest or a specific version. This is used primarily when working with scripting languages to incorporate TerraExplorer COM capabilities into a webpage. See "Working with Scripting Languages" for more information.

 

JavaScript

 

CreateInstance(

       clsid)

 

C#

 

dynamic CreateInstance(

       string clsid)

 

C++

 

HRESULT CreateInstance(

       BSTR clsid,

       IUnknown** ppUnk)

Parameters

clsid

CLSID of the desired object (e.g. “{3A4F91A0-65A8-11D5-85C1-0001023952C1}”).

Return Value

ppUnk

A pointer to the newly created object after the call returns successfully.

Exceptions

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