NWDSItrSetPosition

Sets the iterator’s current position according to a logical value.

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  NWDSItrSetPosition ( 
     nuint_ptr   Iterator, 
     nuint32     position, 
     nuint32     timeout); 
  
  

Parameters

Iterator

(IN) Specifies the iterator object.

position

(IN) Specifies the position to set the iterator object.

timeout

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

Return Values

0x0000 0000

SUCCESSFUL

ERR_QUERY_TIMEOUT

Indicates the function reached its timeout value before it could successfully position the iterator object.

ERR_ITR_INVALID_HANDLE

Indicates the Iterator parameter was not a valid iterator object.

ERR_ITR_INVALID_POSITION

Indicates that the logical position specified was not in the 0 to 1000 range.

ERR_NOT_IMPLEMENTED

Indicates that the iterator object does not support positioning. For more information, see the NWDSItrGetInfo function.

nonzero value

Nonzero values indicate errors. See NDS Return Values (-001 to -799).

Remarks

The position parameter takes an integer value from 0 to 1000. DS_ITR_FIRST(0) and DS_ITR_LAST(1000) will set the position to the first or last entry. DS_ITR_EOF (1001) will set the position to EOF (End-Of-File), just after the last entry. All iterator objects allow these special positions to be set.

Except for the special positions, the position set is an approximation. A subsequent call to get the current position will probably return a different value.

Not all iterator objects are positionable. If the iterator is not positionable, the function returns an error code (ERR_NOT_IMPLEMENTED). To determine if the iterator supports positioning, see the NWDSItrGetInfo function.

For sample code, see Section 4.6, Getting and Setting the Iterator's Position: Example.

NCP Calls

See Also

NWDSItrGetPosition, NWDSItrSetPositionFromIterator, NWDSItrTypeDown, NWDSItrGetInfo