NWDSScanConnsForTrees

Scans existing connections for tree names.

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) NWDSScanConnsForTrees  ( 
     NWDSContextHandle   context,  
     nuint               numOfPtrs,  
     pnuint              numOfTrees,  
     ppnstr8             treeBufPtrs); 
  

Pascal

  #include <nwdsconn.inc> 
   
  Function NWDSScanConnsForTrees 
    (context : NWDSContextHandle; 
     numOfPtrs : nuint; 
     numOfTrees : pnuint; 
     Var treeBufPtrs : ppnstr8 
  ) : NWDSCCODE;
  

Parameters

context

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

numOfPtrs

(IN) Specifies the number of pointers available in treeBufPtrs.

numOfTrees

(OUT) Points to the number of tree names that can be returned by NWDSScanConnsForTrees.

treeBufPtrs

(OUT) Points to an array of pointers that will receive the tree names.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

NWDSScanConnsForTrees scans existing connections and returns a list of tree names associated with those connections. The list does not include duplicates and is sorted by the defined collation table.

The numOfPtrs parameter indicates the maximum number of strings that may be assigned by NWDSScanConnsForTrees. The numOfTrees parameter specifies the number of strings assigned to treeBufPtrs. In the event that numOfTrees exceeds numOfPtrs, numOfPtrs strings will be assigned and numOfTrees will be returned.

The maximum tree name length is specified by NW_MAX_TREE_NAME_LEN, which is a constant defined to be 33 bytes in length. Unicode defines NW_MAX_TREE_NAME_BYTES to be 66 bytes in length.

The tree names returned imply authentication since a connection isn’t designated as Bindery or eDirectory until authentication.

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

NOTE:When NWDSScanConnsForTrees is called on a workstation running Client32, which runs on Windows 95, it does not actually scan connections. This call utilizes Client32’s ability to scan for identities.

NCP Calls

See Also

NWDSScanForAvailableTrees, NWDSReturnBlockOfAvailableTrees