Gets the object type of the current container.
#include "LtCon.h"
L_LTCON_API L_INT L_ContainerGetObjectType(pContainer, pnObjectType )
Pointer to a container handle.
Pointer to the variable to be updated with the current object type.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
L_INT ContainerGetObjectTypeExample(pCONTAINERHANDLE pContainer){L_INT nRet;nRet = L_ContainerIsValid ( pContainer );if ( nRet == SUCCESS ) /* check the validity of container handle */{CONTAINEROBJECTTYPE ObjectType ;/* get the current container object */nRet = L_ContainerGetObjectType ( pContainer, &ObjectType ) ;if(nRet != SUCCESS)return nRet;/* stick to line object */if ( CONTAINER_OBJECT_TYPE_LINE != ObjectType){/* set the container object */nRet = L_ContainerSetObjectType ( pContainer, CONTAINER_OBJECT_TYPE_LINE ) ;}}return nRet;}