cwbOBJ_GetObjHandleFromID
Use the cwbOBJ_GetObjHandleFromID API with this product.
Purpose
Regenerate an object handle from it's binary ID and type. cwbOBJ_DeleteObjHandle() must be called to free resources when you are done using the object handle.
Syntax
unsigned int CWB_ENTRY cwbOBJ_GetObjHandleFromID(
void *idBuffer,
unsigned long bufLen,
cwbOBJ_ObjType objectType,
cwbOBJ_ObjHandle *objectHandle,
cwbSV_ErrHandle errorHandle);
Parameters
- void *idBuffer - input
- The buffer that holds the id of this object.
- unsigned long bufLen - input
- The length of the data pointed to by pIDBuffer.
- cwbOBJ_ObjType type - input
- Type of object this ID is for. This must match the type of object the ID was taken from.
- cwbOBJ_ObjHandle *objectHandle - output
- If this call returns successfully, this will be the handle to the object. This handle should be released with the cwbOBJ_DeleteObjHandle() API when done using it.
- cwbSV_ErrHandle errorHandle - output
- Optional, may be 0. Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle() API. The messages may be retrieved through the cwbSV_GetErrText() API. If the parameter is set to zero, no messages will be retrievable.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory.
- CWB_INVALID_HANDLE
- Handle is not an allocated object handle.
- CWB_INVALID_PARAMETER
- Invalid parameter specified.
- CWBOBJ_RC_INVALID_TYPE
- objectType is not correct.
- CWBOBJ_RC_HOST_ERROR
- Host error occurred. Text may be in errorHandle.
Usage
None