AsproHook Links
Download source code:
  
  

AsproHook - Windows Hooks for .Net

While using SetWindowsHookEx for local hooks in .Net is not terribly difficult and there are a number of C# implementations on CodeProject and elsewhere. We felt that there was a very good case for producing another. While there are several windows hook libraries there is a paucity of well designed ones. Rather than just a simple wrapper around the calls to SetWindowsHookEx and UnhookWindowsHookEx we wanted a library that encapsulated the intent of people who wished to use a windows hook. A library with a properly defined class hierarchy and appropriate events and their arguments for receiving and manipulating the data passed through the hooking mechanism.

In addition, and this is the killer, we wanted to go one step farther and provide access to global hooks in .Net. Global hooks cannot be written in a .Net language for a variety of reasons and several workarounds have been proposed, some interesting and some harebrained. With version 1.0 of AsproHook we will provide a quality, performant implementation of global hooks for .Net (also useable in C/C++) that will funnel all events back to the hooking application rather than using dll injection alone. The current version of AsproHook only supports local hooks but development on the unmanaged messaging framework to support global hooks proceeds apace.