Dynamic PInvoke method calls


Version: 1.0
Size:
8KB
Requirements:
No special requirements
Price:
Free
System:
Windows XP/2000/98/Me
Rating:
4.4
License:
Freeware

Description - Dynamic PInvoke method calls



One of the coolest things in the .NET framework has to be Reflection. System.Reflection.Emit gives you the ability to build and execute code at runtime. This sample includes a class, DllRegServer, that uses Reflection Emit to Create another class with two public PInvoke methods, DllRegisterServer and DllUnregisterServer, used to register/unregister a COM DLL. The path to the DLL implementing the methods has to be set at runtime.The DllRegServer class is then used to create a utility called Regsvr.exe, Similar to the Regsvr32.exe app included with Windows. VB.NET and C# source code is included

Dynamic PInvoke method calls Reflection Emit Method Calls


More in Source Code-Dynamic PInvoke method calls

Pinvoke Method Reflection Emit Pinvoke Method Calls