long FUNCTION c_qposition(q, pos, ptr)
long q; long pos; void **ptr;
The number of the queue. This number is returned by c_qcreate().
The position of the object to retrieve.
A pointer to the specified object in the queue. ptr will be NULL if the specified position does not exist in the queue.
The c_qposition() routine is used to retrieve an object at a specified position in a queue. ptr is set to point to the actual object; the application should not free this memory. If the specified position is not found, ptr will be set to NULL.
The current position in the queue is set to the specified position.
c_qposition() returns
0 --> Successful completion. The object was found. -1 --> Operation failed. No such queue exists, or the queue contains fewer than pos objects.