Returns an interface to the object based on the object id.
When using TerraExplorer Viewer the method returns the interface only for ITerraExplorerMessage5 objects. TE_E_NOLICENSE is returned for ObjectIDs of other types of objects (See ITerraExplorerObject5::ObjectType). In this case, the available properties for the returned ITerraExplorerMessage5 are read-only.
Supported (partial) by TerraExplorer Viewer.
HRESULT GetObject(
[in] BSTR ObjectID,
[out, retval] ITerraExplorerObject5** pITerraExplorerObject5)
Parameters:
ObjectID – The ID of the objected requested.
pITerraExplorerObject5 – An interface pointer to the object. The pointer must not be Null.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
|
S_OK |
Success. |
|
E_FAIL |
Catastrophic failure. |
|
TE_E_OBJMANAGER_OBJNOTFOUND |
The requested object was not found. |
|
TE_E_NOLICENSE |
The license of TerraExplorer Viewer does not include permissions to work with this interface. |
|
TE_E_NOLICENCE |
Your license does not allow the use of this feature. |
|
Remarks:
In some situations, it is helpful to know the object ID , for
example, when you need to get an interface to the object in order
to perform some operation.
See: “Finding and modifying
objects”.