Opens a connection handle to a monitored connection.
#include <nwnet.h> or #include <nwdsconn.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSOpenMonitoredConn ( NWDSContextHandle context, pNWCONN_HANDLE connHandle);
uses netwin32 Function NWDSOpenMonitoredConn (context : NWDSContextHandle; Var connHandle : NWCONN_HANDLE ) : NWDSCCODE;
(IN) Specifies the NDS context for the request or NULL for the preferred tree.
(OUT) Points to the connection handle.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
A monitored connection is a connection between a library and eDirectory that is created when the NWDSLogin function is called. This function must establish a connection to a server that has a read/write replica of the portion on the eDirectory tree where the object logging in resides. eDirectory uses the monitored connection to track concurrent logins to the same tree. An object can be restricted to a specified number of concurrent logins, and the monitored connection allows eDirectory to track how many are allowed and how many are currently in use.
Most of the newer NetWare client requesters control the monitored connection handle, and applications have no need to retrieve information about it or manipulate it.
For multiple tree support, the tree name specified in the context handle is used to specify which monitored connection to retrieve. Call the sForTrees function to return a list of all trees to which you are currently logged in. Call the NWDSSetContext function to set the context for one of the trees returned by the NWDSScanConnsForTrees function. Call NWDSOpenMonitoredConn to open a monitored connection for the same tree. You are responsible for closing the connection handle. If the tree name is not set in the context, the preferred tree will be used.
For requesters that do not support multiple trees, if the tree name is specified (a NULL string is not returned to the eDirectory libraries) and if the tree name is different from the preferred tree, an error will be returned.