Function : Distinguished Name

DNAbbreviate - Abbreviates a canonical distinguished name.
----------------------------------------------------------------------------------------------------------

#include <dname.h>

STATUS LNPUBLIC DNAbbreviate(
DWORD Flags,
const char far *TemplateName,
const char far *InName,
char far *OutName,
WORD OutSize,
WORD far *OutLength
);

Description :

This function converts a distinguished name in canonical format to abbreviated format. A fully distinguished name is in canonical format - it contains all possible naming components. The abbreviated format of a distinguished name removes the labels from the naming components.

Parameters :

Sample Usage :

#define DNAME_JAYNE \                                
"CN=Jayne Doe/OU=Inside Sales/OU=Sales/O=ABCorp/C=US"


/* ..... */

char AbbrevName[MAXUSERNAME];
WORD retLen;
   

error = DNAbbreviate (0L,                                                
                     NULL,                /* user's template */      
                     DNAME_JAYNE,         /* distinguished name to  
                                             be abbreviated */      
                     AbbrevName,          /* abbreviated name */    
                     MAXUSERNAME,         /* max output length */    
                     &retLen);            /* returned output len */


See Also :

DNCanonicalize
----------------------------------------------------------------------------------------------------------