Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DsCrackUnquotedMangledRdn function

The DsCrackUnquotedMangledRdn function unmangles (unencodes) a given relative distinguished name and returns both the decoded GUID and the mangling type used.

Syntax


BOOL DsCrackUnquotedMangledRdn(
  _In_      LPCTSTR       pszRDN,
  _In_      DWORD         cchRDN,
  _Out_opt_ GUID          *pGuid,
  _Out_opt_ DS_MANGLE_FOR *peDsMangleFor
);

Parameters

pszRDN [in]

Pointer to a string that contains the relative distinguished name (RDN) to translate. This string length is specified by the cchRDN parameter, so this string is not required to be null-terminated. This string must be in unquoted form. For more information about unquoted relative distinguished names, see DsUnquoteRdnValue.

cchRDN [in]

Contains the length, in characters, of the pszRDN string.

pGuid [out, optional]

Pointer to GUID value that receives the GUID of the unmangled relative distinguished name. This parameter can be NULL.

peDsMangleFor [out, optional]

Pointer to a DS_MANGLE_FOR value that receives the type of mangling used in the mangled relative distinguished name. This parameter can be NULL.

Return value

This function returns TRUE if the relative distinguished name is mangled or FALSE otherwise. If this function returns FALSE, neither pGuid or peDsMangleFor receive any data.

Remarks

This function attempts to decode (unmangle) an RDN that has been previously mangled due to a deletion or a naming conflict. If the relative distinguished name is mangled, the function returns TRUE and retrieves the GUID and mangle type, if requested. If the relative distinguished name is not mangled, the function returns FALSE.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Dsparse.h (include Ntdsapi.h)

Library

Ntdsapi.lib

DLL

Ntdsapi.dll

Unicode and ANSI names

DsCrackUnquotedMangledRdnW (Unicode) and DsCrackUnquotedMangledRdnA (ANSI)

See also

DS_MANGLE_FOR
DsIsMangledDn
DsIsMangledRdnValue
DsUnquoteRdnValue
Domain Controller and Replication Management Functions

 

 

Show:
© 2015 Microsoft