Tuesday, April 27, 2010

Native Browser Addin for Visual Studio

With .Net Assemblies, today it is as much as easy to get all informations about the Classes and members inside, You can simply use Reflection and you will get all Meta Data even if it is private, internal or public. But did You ever try to get the content of native libraries such as "advapi32.dll" or "user32.dll". Sure, best way should be never to use pInvoke because your Application will not be CLS Compliant. However, in some circumstances you have to.

Background

Some years ago, I developed an application in Delphi 6, showing me the exported method headers of native (Win32) libraries. However, that application was no more longer usefull since I started developing with Visual Studio.Net, because I don't like switching between several applications while developing.

The old Delphi code

The following Delphi snippet is a part of the code that has to be converted into C#. The code was hosted inside a COM Library because I wanted to use it with other languages. The COM Library still works fine today (Except, sometimes getting the whole number of methods with Windows 7), but I don't want to use COM Interop in my .Net Applications in future.

Read more: Codeproject

Posted via email from jasper22's posterous