NWDSItrSkip

Skips entries, either forward or backward.

Local Servers:blocking
Remote Servers:blocking
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NDS (NET*.*)
Service:NDS Iterator

Syntax

  #include <nwnet.h> 
  or 
  #include <nwitr.h> 
   
  NWDSCCODE  NWDSItrSkip ( 
     nuint_ptr     Iterator, 
     nint32        numToSkip, 
     nuint32       timeout, 
     pnint32       pNumSkipped); 
  
  

Parameters

Iterator

(IN) Specifies the iterator object.

numToSkip

(IN) Specifies the number of entries to skip. May be positive (forward in the list) or negative (backward in the list).

timeout

(IN) Specifies the time (in milliseconds) allowed before returning an error.

pNumSkipped

(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.

Return Values

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 NDS Return Values (-001 to -799).

Remarks

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.

NCP Calls

See Also

NWDSItrGetCurrent, NWDSItrGetNext, NWDSItrGetPrev