DirectoryEntry インスタンスを作成するときの舞台裏について詳しく教えてください。
コードスニペット:
var dirEntry = new DirectoryEntry("LDAP://CN=jsmith,DC=fabrikam,DC=Com", userName, password);
つまり、認証はどのように機能するのでしょうか? 誰が誰と話す?上記のコードがコンソール アプリケーションにあるとします。
DirectoryEntry インスタンスを作成するときの舞台裏について詳しく教えてください。
コードスニペット:
var dirEntry = new DirectoryEntry("LDAP://CN=jsmith,DC=fabrikam,DC=Com", userName, password);
つまり、認証はどのように機能するのでしょうか? 誰が誰と話す?上記のコードがコンソール アプリケーションにあるとします。
Reflector を使用して確認できることから、それは activds.dll を使用します
例えば:
[DllImport("activeds.dll", EntryPoint="ADsOpenObject", CharSet=CharSet.Unicode, ExactSpelling=true)]
private static extern int IntADsOpenObject(string path, string userName, string password, int flags, [In, Out] ref Guid iid, [MarshalAs(UnmanagedType.Interface)] out object ppObject);
http://msdn.microsoft.com/en-us/library/aa772238(VS.85).aspx