NWDSOpenMonitoredConn

Opens a connection handle to a monitored connection.

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) NWDSOpenMonitoredConn  ( 
     NWDSContextHandle   context,  
     pNWCONN_HANDLE      connHandle); 
  

Pascal

  uses netwin32 
   
  Function NWDSOpenMonitoredConn 
    (context : NWDSContextHandle; 
     Var connHandle : NWCONN_HANDLE 
  ) : NWDSCCODE;
  

Parameters

context

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

connHandle

(OUT) Points to the connection handle.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

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.

NCP Calls

See Also

NWDSGetMonitoredConnRef, NWDSOpenConnToNDSServer