Skips entries, either forward or backward.
#include <nwnet.h>
or
#include <nwitr.h>
NWDSCCODE NWDSItrSkip (
nuint_ptr Iterator,
nint32 numToSkip,
nuint32 timeout,
pnint32 pNumSkipped);
(IN) Specifies the iterator object.
(IN) Specifies the number of entries to skip. May be positive (forward in the list) or negative (backward in the list).
(IN) Specifies the time (in milliseconds) allowed before returning an error.
(OUT) Points to the number of entries actually skipped. May be NULL. The number will be positive for a forward skip or negative for a backward skip.
|
0x0000 0000 |
SUCCESSFUL |
|
ERR_BOF_HIT |
Indicates that the iterator was already positioned at the top of the list. No entries were skipped. |
|
ERR_EOF_HIT |
Indicates that the iterator was already positioned at the EOF. No entries were skipped. |
|
ERR_ITR_INVALID_HANDLE |
Indicates the Iterator parameter was not a valid iterator object. |
|
nonzero value |
Nonzero values indicate errors. See |
You can request to skip to a position that is beyond the beginning or the end of the list.
If you are skipping back to the beginning of the list, the function positions the iterator at the first entry in the list and places the actual number of entries in the pNumSkipped parameter. If the iterator is already positioned on the first entry, the function returns ERR_BOF_HIT, and the iterator remains on the first entry.
If you are skipping forward to the end of the list and the request takes you beyond the end, the function places the iterator one entry beyond the end of the list and places the actual number of entries in the pNumSkipped parameter. If the iterator is already positioned at EOF, the function returns ERR_EOF_HIT, and the iterator remains in the EOF position.
A skip with numToSkip set to zero always returns success with no change in position.
For sample code, see Section 4.9, Skipping Objects in the List: Example.