NWDSItrGetNext

Returns the number of specified next entries, including the current entry.

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  NWDSItrGetNext ( 
     nuint_ptr    Iterator, 
     nuint32      numEntries, 
     nuint32      timeout, 
     pnint32      pIterationHandle, 
     pBuf_T       pData); 
  
  

Parameters

Iterator

(IN) Specifies the iterator object.

numEntries

(IN) Specifies the number of entries to read. Zero indicates that all entries should be read.

timeout

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

pIterationHandle

(IN/OUT) Must be initialized to -1 and will be returned as -1 when all entries have been read.

pData

(OUT) Points to the returned entries.

Return Values

0x0000 0000

SUCCESSFUL

ERR_EOF_HIT

Indicates the iterator was already positioned at the EOF and there is no data to read.

ERR_QUERY_TIMEOUT

Indicates the function timed out before retrieving all the requested data.

ERR_ITR_INVALID_HANDLE

Indicates the Iterator parameter was not a valid iterator object.

ERR_ITR_INVALID_SEARCH_DATA

Indicates entry data is in an unexpected format.

nonzero value

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

Remarks

If the returned data does not fit in the application’s buffer, the function returns with partial data. You must then call the NWDSItrGetNext function repeatedly with the current value of the iteration handle to get the remaining data. When the iteration handle is returned as -1, all the data has been retrieved.

This function leaves the current position pointing to the next unread entry after the last one that was retrieved. If the end of the list is reached, the current position is left at EOF.

The return data in the pData parameter is in the same format as the data in the output buffer for the NWDSSearch function. You will need to use the specialized functions such as NWDSGetObjectCount and NWDSGetAttrName to retrieve the data. For step-by-step instructions, see Section 2.2, Retrieving and Unpacking Object and Attribute Name Data or Section 2.3, Retrieving and Unpacking Object, Attribute, and Value Data.

NCP Calls

See Also

NWDSItrGetCurrent, NWDSItrGetPrev, NWDSItrSkip