Converts an abbreviated name to the canonical form.
#include <nwnet.h> or #include <nwdsname.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSCanonicalizeName ( NWDSContextHandle context, pnstr8 objectName, pnstr8 canonName);
uses netwin32 Function NWDSCanonicalizeName (context : NWDSContextHandle; objectName : pnstr8; canonName : pnstr8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the object name to be expressed in canonical form.
(OUT) Points to the canonical form of the name.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
The canonical form of a name includes the full path of the name (a complete name) with the naming attribute type specification for each naming component. Standard naming attribute type abbreviations are used where available. In addition, multiple white spaces are removed from the name.
For example, if the input is
CN=Elmer Fudd
and the name context value in the context parameter is
OU=Looney Toons.O=Acme
the canonicalized name is
CN=Elmer Fudd.OU=Looney Toons.O=Acme
The objectName parameter supplies the abbreviated form of a eDirectory name. The name can be typed or typeless. If a typeless name is supplied, the NWDSCanonicalizeName function uses default typing rules to assign types. The wrong types will be assigned if a component of a typeless name is a Country, Locality, Tree Root, or domain. For more information about the typing rules and a method that ensures accurate results, see the DCV_TYPELESS_NAMES key in DCK_FLAGS Key.
The name can also be truncated. It is assumed that a truncated name is relative to the naming path supplied by the specified context.
The canonName parameter receives the canonical form of the name. The caller must allocate space for the canonicalized name. 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 Unicode characters (Unicode characters are always 16 bits). One character is used for NULL termination.