Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 473319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:10:29+00:00 2026-05-13T00:10:29+00:00

I am hooking keyboard in application . Requirement is to hook keyboard in all

  • 0

I am hooking keyboard in application . Requirement is to hook keyboard in all threads in the process.

I used SetWindowsHookEx API

SetWindowsHookEx(WH_KEYBOARD_LL, (HOOKPROC)::KeyboardHookProc, hInst, 0);

The hook is created for all the threads in process.
This works fine until calling thread exists .As soon as calling thread terminates hook stop working.

Is there any way to hook on process rather than threads in process.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:10:30+00:00Added an answer on May 13, 2026 at 12:10 am

    This fine print in the SDK docs for LowLevelKeyboardProc is crucial:

    This hook is called in the context of the thread that installed it. The call is made by sending a message to the thread that installed the hook. Therefore, the thread that installed the hook must have a message loop.

    In other words, you must keep the thread alive and the thread must pump a message loop. The behavior you see now is entirely by design.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to perform some action when my application receives focus. I've tried hooking
I'm using the following project to handle global keyboard and mouse hooking in my
In order to use SetWindowsHookEx in a GUI application, you usually want in the
I'm currently researching ways to hook a process and take control of it using
Does anyone know about system-wide API hooking with Delphi? I downloaded madCodeHook, but it
I'm creating an application overlay via Direct3D hooking, however I can't draw any text.
I am following this guide (http://devcenter.heroku.com/articles/omniauth-and-force-com) in hooking up Salesforce.com REST API with ruby
I am hooking the ExtTextOut GDI API. There I want to retrieve the exact
I am Hooking the GDI API ExtTextOut BOOL ExtTextOut( __in HDC hdc, __in int
I am trying to Hook Cocoa API. I know cocoa provides a public api

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.