NWDSGetServerDN

Returns the server’s distinguished name.

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 <nwdsdsa.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSGetServerDN  ( 
     NWDSContextHandle   context,  
     NWCONN_HANDLE       connHandle,  
     pnstr8              serverDN); 
  

Pascal

  uses netwin32 
   
  Function NWDSGetServerDN 
    (context : NWDSContextHandle; 
     connHandle : NWCONN_HANDLE; 
     serverDN : pnstr8 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

connHandle

(IN) Specifies the connection to the server to be queried.

serverDN

(OUT) Points to the distinguished name of the server.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

The connHandle parameter is the connection handle to the server.

The caller must allocate space to hold the distinguished name of the server and set serverDN to point to it. The size of the allocated memory is (MAX_DN_CHARS+1)*sizeof(character size) where character size is 1 for single-byte characters and 2 for Unicode characters (Unicode characters are always 16 bits). One character is used for NULL termination.

Whether the server name is returned as a complete name or a partial name depends upon the setting of the context flag associated with DCV_CANONICALIZE_NAMES. For more information, see Section 1.1, Context Handles.

NWDSGetServerDN does not work on a local server with a connection 0. Call AttachToFileServer then GetCurrentConnection and pass the returned value to NWDSGetServerDN to return the server’s DN. If connection 0 is used, a ERR_NO_CONNECTION error is returned.

NCP Calls