NWDSScanForAvailableTrees

Scans a connection for tree objects.

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

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwdsconn.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE) NWDSScanForAvailableTrees  ( 
     NWDSContextHandle   context,  
     NWCONN_HANDLE       connHandle,  
     pnstr               scanFilter,  
     pnint32             scanIndex,  
     pnstr               treeName); 
  

Pascal

  uses netwin32 
   
  Function NWDSScanForAvailableTrees 
    (context : NWDSContextHandle; 
     connHandle : NWCONN_HANDLE; 
     scanFilter : pnstr; 
     Var scanIndex : pnint32; 
     treeName : pnstr 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request or NULL for the preferred tree.

connHandle

(IN) Specifies the connection handle to be used in scanning for eDirectory trees.

scanFilter

(IN) Points to an ASCII string that allows wildcards to be specified in the scan.

scanIndex

(IN/OUT) Points to the index to be used on the next iteration of the scan.

treeName

(OUT) Points to the name of the tree found in the scan operation.

Return Values

0x0000 0000

SUCCESSFUL

0x89FC

BIND_NO_SUCH_OBJECT

nonzero value

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

Remarks

NWDSScanForAvailableTrees uses the connection specified in connHandle to scan for eDirectory tree objects (object type 0x7802) using the server bindery (the dynamic bindery is used for NetWare 4.x and 5.x servers). When the list of tree objects is exhausted, the NWDSScanForAvailableTrees function returns BIND_NO_SUCH_OBJECT.

This function may return duplicate tree names because it returns the tree name from each server which is advertising it. To receive a sorted list with duplicates removed, use NWDSReturnBlockOfAvailableTrees.

The scanFilter value allows wildcard matching to be specified for the scan operation. The scanIndex value should be initially set to -1 and must not be altered by the user after the first call.

Unlike other eDirectory functions, there is no need to call NWDSCloseIteration to discontinue calling NWDSScanForAvailableTrees once the search is begun.

The context parameter is used to determine the character type for the tree name. The DCV_XLATE_STRINGS flag determines whether local code page format or Unicode strings are returned. For more information, see DCK_FLAGS Key

NCP Calls

See Also

NWDSScanConnsForTrees, NWDSReturnBlockOfAvailableTrees