Home All Groups Group Topic Archive Search About

Domain/User to LDAP NameTranslate ability in the 2.0 framework???

Author
16 Feb 2006 5:28 PM
Dave Kolb
Is there any new 2.0 class that offers the functionality of the ActiveDS
NameTranslate function as below? I would like to not have to use COM interop
to do this.

Thanks,
Dave Kolb

// convert the Netbios style "domain\user" name to an LDAP DN format

ActiveDs.NameTranslate nt = new ActiveDs.NameTranslate();

int typeNT4 = (int)ActiveDs.ADS_NAME_TYPE_ENUM.ADS_NAME_TYPE_NT4;

int typeDN = (int)ActiveDs.ADS_NAME_TYPE_ENUM.ADS_NAME_TYPE_1779;

nt.Set(typeNT4, strNtUser);

string strLdapName = nt.Get(typeDN);

Author
17 Feb 2006 5:56 AM
Marc Scheuner [MVP ADSI]
>Is there any new 2.0 class that offers the functionality of the ActiveDS
>NameTranslate function as below? I would like to not have to use COM interop
>to do this.

I'm not aware of anything new, and quite frankly, even if there was
something, it most likely would be nothing but a wrapper around those
COM classes....

Marc

AddThis Social Bookmark Button