Scans a connection for tree objects.
#include <nwnet.h> or #include <nwdsconn.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSScanForAvailableTrees ( NWDSContextHandle context, NWCONN_HANDLE connHandle, pnstr scanFilter, pnint32 scanIndex, pnstr treeName);
uses netwin32 Function NWDSScanForAvailableTrees (context : NWDSContextHandle; connHandle : NWCONN_HANDLE; scanFilter : pnstr; Var scanIndex : pnint32; treeName : pnstr ) : NWDSCCODE;
(IN) Specifies the NDS context for the request or NULL for the preferred tree.
(IN) Specifies the connection handle to be used in scanning for eDirectory trees.
(IN) Points to an ASCII string that allows wildcards to be specified in the scan.
(IN/OUT) Points to the index to be used on the next iteration of the scan.
(OUT) Points to the name of the tree found in the scan operation.
0x0000 0000 |
SUCCESSFUL |
0x89FC |
BIND_NO_SUCH_OBJECT |
nonzero value |
Nonzero values indicate errors. See |
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