NWDSGetServerDN(3nw)


NWDSGetServerDN -- returns the server's distinguished name in the Directory

Synopsis

   #include <nwnet.h> 
   or 
   #include <nwdsdsa.h> 
   

NWDSCCODE N_API NWDSGetServerDN (NWDSContextHandle context, NWCONN_HANDLE conn, pnstr8 serverDN);

Description

The parameters are as follows:

context
(IN) Specifies the Directory context for the request.

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

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

Return values

0x0000
SUCCESSFUL

Negative Value
Negative values indicate errors. For errors returned by Directory Services, see ``Directory Services OS Errors'' (-001 to -255), ``Directory Services Client Library Errors'' (-301 to -399), or ``Directory Services Agent in the Server Errors'' (-601 to -699).

Notices

conn 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 double-byte characters (Unicode is double byte). 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.

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 -333 error is returned.

Services

Directory

NCP calls

0x2222 104 02
Send NDS Fragmented Request/Reply

53
Get Server Address

30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.