NWDSCanonicalizeName

Converts an abbreviated name to the canonical form.

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 <nwdsname.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSCanonicalizeName  ( 
     NWDSContextHandle   context,  
     pnstr8              objectName,  
     pnstr8              canonName); 
  

Pascal

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

Parameters

context

(IN) Specifies the NDS context for the request.

objectName

(IN) Points to the object name to be expressed in canonical form.

canonName

(OUT) Points to the canonical form of the name.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

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.

NCP Calls

See Also

NWDSAbbreviateName