Dynamic PInvoke method calls

Gives you the ability to build and execute code at runtime.
Download

Dynamic PInvoke method calls Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Karl E. Peterson
  • Publisher web site:
  • Operating Systems:
  • Windows XP/2000/98/Me
  • File Size:
  • 8KB

Dynamic PInvoke method calls Tags


Dynamic PInvoke method calls Description

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 Related Software