GpSysHook 17.slon
Version 1.03b
used in:
A system hook DLL with supporting components that greatly simplify the use of CBT, Keyboard, Mouse, and Shell hook.  

DLL and components are written in a modular fashion so it is very easy to add support for another hook type.

TGpSysHook is written for Delphi 5. It should compile with Delphi 6. Components only should compile with previous Delphi versions, too. Just don't try to compile the DLL in any Delphi prior to version 5. It just won't work.

Released under the BSD License.


  1. (optional) Compile the GpSysHookDLL.dpr to get the system hook DLL. You can also use the precompiled DLL from the archive below.
  2. Rename this DLL. Use a name specific to the project you are working on so that you wan't cause any name-clash. GpSysHookDLL can peacefully coexist with another GpSysHookDLL as long as they don't have the same name.
  3. Compile and install the components (GpSysHookPkg_D5.dpk).
  4. Drop the hook component onto a form.
  5. Set the HookDLL propert of the component to pointo to the renamed DLL. You can use the full path or file name only (in that case, Windows will look for the DLL in the common locations).
  6. Set the event handlers of the component.
  7. In the code, call <component>.Start to enable the hook and <component>.Stop to disable the hook.
  8. Examine the demonstration program (included in the archive below) to discover other features.


Last modifications

1.03b: 2002-01-16

  • Bug fixed: parameters for some event handlers in the demo program were incorrectly defined as cardinal instead of longint.

1.03a: 2001-12-12

  • Bug fixed: parameters for some events were incorrectly defined as DWORD instead of longint.
Last update: 2010-12-25