NWDSWhoAmI

Returns the name of the object currently logged in to eDirectory.

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)  NWDSWhoAmI  ( 
     NWDSContextHandle   context,  
     pnstr8              objectName); 
  

Pascal

  uses netwin32 
   
  Function NWDSWhoAmI 
    (context : NWDSContextHandle; 
     objectName : pnstr8 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

objectName

(OUT) Points to the name of the object logged in to eDirectory.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

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

The object name is returned in partial dot form. Whether the name in objectName is returned as a full name or a partial name depends upon the setting of the context flags:

  • If the DCV_CANONICALIZE_NAMES flag is set to ON, NWDSWhoAmI returns a partial name.

  • If the DCV_CANONICALIZE_NAMES flag is set to OFF, NWDSWhoAmI returns a distinguished name.

If the context flag associated with DCV_TYPELESS_NAMES is set to 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 Unicode characters (Unicode characters are always 16 bits). One character is used for NULL termination.

NCP Calls