DsCrackUnquotedMangledRdnA function (dsparse.h)
The DsCrackUnquotedMangledRdn function unmangles (unencodes) a given relative distinguished name and returns both the decoded GUID and the mangling type used.
Syntax
DSPARSE BOOL DsCrackUnquotedMangledRdnA(
[in] LPCSTR pszRDN,
[in] DWORD cchRDN,
[out, optional] GUID *pGuid,
[out, optional] DS_MANGLE_FOR *peDsMangleFor
);
Parameters
[in] pszRDN
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.
[in] cchRDN
Contains the length, in characters, of the pszRDN string.
[out, optional] pGuid
Pointer to GUID value that receives the GUID of the unmangled relative distinguished name. This parameter can be NULL.
[out, optional] peDsMangleFor
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.
Note
The dsparse.h header defines DsCrackUnquotedMangledRdn as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | dsparse.h (include Ntdsapi.h) |
Library | Ntdsapi.lib |
DLL | Ntdsapi.dll |