Returns the name of the object currently logged in to eDirectory.
#include <nwnet.h>
or
#include <nwdsdsa.h>
N_EXTERN_LIBRARY (NWDSCCODE) NWDSWhoAmI (
NWDSContextHandle context,
pnstr8 objectName);
uses netwin32
Function NWDSWhoAmI
(context : NWDSContextHandle;
objectName : pnstr8
) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(OUT) Points to the name of the object logged in to eDirectory.
|
0x0000 0000 |
SUCCESSFUL |
|
nonzero value |
Nonzero values indicate errors. See |
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.