Purpose
Get list object. This call gets a handle
to an object in an opened list. The handle returned must be released with
the cwbOBJ_DeleteObjHandle when the caller is done with
it to release resources. The handle returned is only valid while the list
is opened.
Syntax
unsigned int CWB_ENTRY cwbOBJ_GetObjHandle(
cwbOBJ_ListHandle listHandle,
unsigned long ulPosition,
cwbOBJ_ObjHandle *objectHandle,
cwbSV_ErrHandle errorHandle);
Parameters
- cwbOBJ_ListHandle listHandle - input
- Handle of the list to get the object handle from. This list must be opened.
- unsigned long ulPosition - input
- The position within the list of the object to get a handle for. It is
0 based. Valid values are 0 to the number of objects in the list - 1. You
can use cwbOBJ_GetListSize() to get the size of the list.
- cwbOBJ_ObjHandle *objectHandle - output
- On return, this will contain the handle of the object.
- 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_NO_ERROR
- Successful completion.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory.
- CWB_INVALID_HANDLE
- Handle is not an allocated list handle.
- CWBOBJ_RC_HOST_ERROR
- Host error occurred. Text may be in errorHandle.
- CWBOBJ_RC_LIST_NOT_OPEN
- The list isn't open.
- CWBOBJ_RC_INVALID_INDEX
- The ulPosition is out of range.