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 8883959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:56:50+00:00 2026-06-14T20:56:50+00:00

Does anyone know of a way to determine the input thread of a process?

  • 0

Does anyone know of a way to determine the input thread of a process?

The scenario is that I would like to call GetKeyboardLayout, passing in the input thread ID from within a separate application (could be any program). Each thread can have its own keyboard input language set, but finding out the appropriate input thread ID for another process seems like something that perhaps isn’t possible.

For example, I create a function into which I pass the process ID of Notepad, this function internally determines the input thread ID and returns the value from GetKeyboardLayout. The caller of this function would then display on-screen the input language selected for Notepad.

Any of you fine folks have any ideas?

  • 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-06-14T20:56:51+00:00Added an answer on June 14, 2026 at 8:56 pm

    Windows doesn’t require a process to have a specific thread that interacts with the user. It doesn’t have to be the startup thread of the process, although it often is. And it doesn’t limit a program to a single thread, although it often does use only one thread.

    You’ll need to start by finding the window first. With api functions like FindWindow, FindWindowEx or EnumWindows. Once you got that, you can find out what thread owns the window with GetWindowThreadProcessId(). Watch out for hidden helper windows that a worker thread might create. Spy++ is your basic debugging tool here.

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

Sidebar

Related Questions

Does anyone know a way to determine if a Rails association has been eager
does anyone know of a way to format the date that is returned from
Does anyone know of a way to determine whether the content of a dijit.dialog
Good day, Does anyone know if there is a way to determine when all
does anyone know a programmatic way to determine whether an excel file has a
Does anyone know an elegant way to determine System Load preferably using Windows performance
Does anyone know of a way to determine if a image stream is in
Does anyone know a portable way for Python to determine a system's maximum command
Does anyone know a way to register a persistent UDF in SQLite 3 (using
Does anyone know a way to get the mean amplitude of a .wav file

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.