Hi Lain,
Thanks for your feedback!
Do you mean that you are not familiar with C#? Oh, yes, it is strange that
most of the samples I find are written in C#, not VB.net. However, the
basic idea is the same.
I found one VB.net sample of accessing the user list, for your information:
"Accessing LDAP User list using VB.NET"
http://www.codeproject.com/vb/net/LDAP_Using_VBnet.asp
The best way to translate the C# sample code into VB.net is using
Reflector. *Reflector* is a tool written by Microsoft engineer Lutz Roeder.
It uses .Net Reflection to parse the internal information of the .Net FCL
assemblies. It also decomplies the MSIL code in the FCL into various
languages, such as C#, VB.net, IL etc... It is somewhat like ILdasm.exe in
.Net Framework, but provides higher level language(C#) display. Using it,
you can see the source code of .Net FCL. It is a must have tool for .Net
developer. You may download it for free in the link below:
http://www.aisto.com/roeder/dotnet/
In your scenario, you can use Reflector to open the assemblies generated by
these C# samples. Then you can switch the language from C# to VB.net, then
you can view the sample code in VB.net.
Besides Reflector, you may also some C# to VB.net translators to convert
the sample code. However, these convertion tools are not perfect, you have
to correct the translated VB.net code, I normally use the one below:
http://authors.aspalliance.com/aldotnet/examples/translate.aspx
Additionally, since you want to write your own version of the AD Users &
Computers mmc console, I found a lot more samples in .Net doing the similar
task, you may refer to their source code as sample:
"Simple Active Directory Browser"
http://www.codeproject.com/dotnet/activedirectorybrowser1.asp
"Dynamically browse Active Directory Objects"
http://www.codeproject.com/dotnet/Active_Directory_Browser.asp
"Querying Active Directory using .NET classes and LDAP queries"
http://www.codeproject.com/dotnet/activedirquery.asp
Finally, since the .Net DirectoryService encapsulates Win32 ADSI
technology, I am sure you will get more useful and professional help in the
microsoft.public.adsi.general newsgroup. There are several ADSI programming
experts(MVP) in this newsgroup, and some of them even authored 1 or 2 AD
books.
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.