Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

WH_GETMESSAGE Hook

martbasemartbase Posts: 49Member
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.

Comments

  • hookapihookapi Posts: 1Member
    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.
  • zibadianzibadian Posts: 6,349Member
    : 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.
Sign In or Register to comment.