Returns the iterator’s current logical position.
#include <nwnet.h>
or
#include <nwitr.h>
NWDSCCODE NWDSItrGetPosition (
nuint_ptr Iterator,
pnuint32 pPosition,
nuint32 timeout);
(IN) Specifies the iterator object.
(OUT) Returns the current iterator position as a logical position in the 0-1000 range or DS_ITR_EOF (1001). The value is an approximation.
(IN) Specifies the time (in milliseconds) allowed before returning an error.
|
0x0000 0000 |
SUCCESSFUL |
|
ERR_ITR_INVALID_HANDLE |
Indicates the Iterator parameter was not a valid iterator object. |
|
ERR_EOF_HIT |
Indicates that current position is beyond the last entry in the list.This is a valid position. |
|
ERR_NOT_IMPLEMENTED |
Indicates that this iterator object does not support positioning. For more information, see the NWDSItrGetInfo function. |
|
nonzero value |
Nonzero values indicate errors. See |
Unless the iterator object is on one of the special positions, the position returned is an estimate, not an exact location. For more information, see Section 1.4, Positions of an Iterator Object.
The following values indicate special positions for the pPosition parameter:
If the position is at EOF, DS_ITR_EOF (1001) is returned for the position and 0 is returned as the status code.
Not all iterator objects are positionable. Such iterator objects return an error code (ERR_NOT_IMPLEMENTED). To determine if the iterator object supports positioning, see the NWDSItrGetInfo function.
For sample code, see Section 4.6, Getting and Setting the Iterator's Position: Example.