Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
WH_GETMESSAGE Hook Posted by martbase on 2 Jun 2004 at 11:28 AM
Hi everyone,

I have installed a global system hook that I have defined in a DLL. The hook procedure is of the type WH_GETMESSAGE. The hook procedure intercepts keyboard messages (WM_KEY???, WM_SYSKEY???) and changes the message field to WM_NULL to discard the user's keystrokes when the keyboard is locked. I am getting an error: 'runtime error 216 at 00004436' when my application is running. The application uses file mapping to set the keyboard lock mode. Does anyone have any idea where the error could be originating from. Any help will be greatly appreciated! My utility is coded using Delphi 4.
Report
Re: WH_GETMESSAGE Hook Posted by hookapi on 23 May 2006 at 8:31 PM
try this http://www.hook-api.com - Hook API SDK, a Software Development Kit for easy and quickly develop Windows system wide hooking program.

It helps you hooking Windows system functions or functions in 3rd applications, this means you can call your own functions instead of some Windows system APIs or functions of other appliction, intercepts Windows system or 3rd application's functions and re-writing target function to easily customize and extend System or other existing application, whether an executable, or a library.
Report
Re: WH_GETMESSAGE Hook Posted by zibadian on 23 May 2006 at 9:08 PM
: Hi everyone,
:
: I have installed a global system hook that I have defined in a DLL. The hook procedure is of the type WH_GETMESSAGE. The hook procedure intercepts keyboard messages (WM_KEY???, WM_SYSKEY???) and changes the message field to WM_NULL to discard the user's keystrokes when the keyboard is locked. I am getting an error: 'runtime error 216 at 00004436' when my application is running. The application uses file mapping to set the keyboard lock mode. Does anyone have any idea where the error could be originating from. Any help will be greatly appreciated! My utility is coded using Delphi 4.
:
Runtime error 216 is an Access Violation error, which is often the result of an uninitialized pointer. You should be able to get an idea of where the error occurred by using the Search>Find Error command and the Stack window. These commands might only work in the debugger.
If that doesn't work, then I often find it useful to keep a simple logfile of the entry points of procedures. That way you can see to which procedure call the application runs.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.