The return value from DsCrackNames indicates errors such as invalid parameters or insufficient memory. However, problems in converting individual names are reported in the status member of the DS_NAME_RESULT_ITEM structure returned for each input name.
The DsCrackNames function converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. For example, user objects can be identified by SAM account names (domain\username), user principal name (username@domain.com), or distinguished name.
9/21/2015 5:53:24 PM - -131.107.0.80
.
// domain object resides in. Thus DS_NAME_RESULT_ITEM?.pDomain
.
public DS_NAME_RESULT_ITEM[] CrackNames(string[] names = null, DS_NAME_FLAGS flags = DS_NAME_FLAGS.DS_NAME_NO_FLAGS,
.
DS_NAME_RESULT Result = (DS_NAME_RESULT)Marshal.PtrToStructure(pResult, typeof(DS_NAME_RESULT));
.
public static extern void DsFreeNameResult(IntPtr pResult /* DS_NAME_RESULT* */);
.
public struct DS_NAME_RESULT
.
internal IntPtr rItems; // PDS_NAME_RESULT_ITEM
.
public DS_NAME_RESULT_ITEM[] Items
.
return new DS_NAME_RESULT_ITEM[0];
.
var ResultArray = new DS_NAME_RESULT_ITEM[cItems];
The DsFreeNameResult function frees the memory held by a DS_NAME_RESULT structure. Use this function to free the memory allocated by the DsCrackNames function.
3/16/2007 8:06:13 AM - anonymous
The DsCrackNames function converts an array of directory service object names from one format to another. Name conversion enables client applications to map between the multiple names used to identify various directory service objects. For example, user objects can be identified by SAM account names (domain\username), user principal name (username@domain.com), or distinguished name.
9/21/2015 5:53:24 PM - -131.107.0.80
.
static public extern void DsFreeNameResult(IntPtr pResult /* DS_NAME_RESULT* */);