NWDSWhoAmI(3nw)


NWDSWhoAmI -- returns the distinguished name of the object currently logged in to the Directory

Synopsis

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

NWDSCCODE N_API NWDSWhoAmI (NWDSContextHandle context, pnstr8 objectName);

Description

The parameters are as follows:

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

objectName
(OUT) Points to the distinguished name of the object logged in to the Directory.

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

If the object is not currently logged in, NWDSWhoAmI returns an error.

Whether the name returned in objectName is a full name or a partial name depends upon the setting of the context flag associated with DCV_CANONICALIZE_NAMES. If the DCV_CANONICALIZE_NAMES flag is set ON NWDSWhoAmI returns a partial name. If the DCV_CANONICALIZE_NAMES flag is set OFF NWDSWhoAmI returns a full name.

If the context flag associated with DCV_TYPELESS_NAMES is set ON, the name returned by NWDSWhoAmI will be untyped, otherwise it will be typed.

The caller must allocate memory to hold the distinguished name. The size of memory allocated 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.

Services

Directory

NCP calls

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