CreateInstance

This method is used to create an object, generally an SGWorld65 instance, from a specific 3D Window. When using the ITE3DWindowEx interface to create multiple TE3DWindowEx objects in the same application, a specific SGWorld instance can be created using the CreateInstance method for each of the 3D windows. Each SGWorld instance can then load a different Fly file so that each window displays distinct content.

Example in C#:

SGWorld65 globe = (SGWorld65)axTE3DWindowEx1.CreateInstance("TerraExplorerX.SGWorld65");

 

JavaScript

 

CreateInstance(

       ProgID)

 

C#

 

dynamic CreateInstance(

       string ProgID)

 

C++

 

HRESULT CreateInstance(

       BSTR ProgID,

       IUnknown** ppUnk)

Parameters

ProgID

This parameter can be either of the following values:

·          ProgID of the desired object we want to create (e.g. “TerraExplorerX.SGWorld65”)

·          CLSID of the desired object (e.g. “{3a4f9197-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.