Converts an NDS name (including the naming attributes) to its shortest form relative to a specified name context.
#include <nwnet.h> or #include <nwdsname.h> #include <nwdsbuft.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSAbbreviateName ( NWDSContextHandle context, pnstr8 inName, pnstr8 abbreviatedName);
uses netwin32 Function NWDSAbbreviateName (context : NWDSContextHandle; inName : pnstr8; abbreviatedName : pnstr8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the object name to be abbreviated.
(OUT) Points to the abbreviated form of the name.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
The caller must allocate space for the abbreviated name. The size of the allocated memory is ((MAX_RDN_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.
If the context flag associated with DCV_TYPELESS_NAMES is set on, the types are removed where possible. For example, the name
CN=Elmer Fudd.OU=Looney Tunes.O=Acme
with a context of OU=Looney Tunes.O=Acme converts to
Elmer Fudd.
If the context flag associated with DCV_TYPELESS_NAMES is set off, the name converts to
CN=Elmer Fudd.