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.
Instructions
- (optional) Compile the GpSysHookDLL.dpr to get the system hook DLL.
You can also use the precompiled DLL from the archive below.
- 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.
- Compile and install the components (GpSysHookPkg_D5.dpk).
- Drop the hook component onto a form.
- 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).
- Set the event handlers of the component.
- In the code, call <component>.Start to enable the hook and <component>.Stop
to disable the hook.
- Examine the demonstration program (included in the archive below)
to discover other features.
Files
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.
|