The GetLayer method retrieves an interface to the ILayer5 object based on the ItemID. Use IInformationTree::IsLayer to make sure the ItemID is of a layer object.
HRESULT GetLayer(
[in] long GroupId,
[out, retval] ILayer5** pILayer);
Parameters:
GoupID – The ID of the layer item requested.
pILayer – An interface pointer to the layer 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. |