Jump to content
  • Advertisement
Sign in to follow this  
merphi

WinAPI: Change Priority of InputThread

This topic is 3795 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i want to change the priority of the windows generated InputThread. I have no clue how to obtain the corresponding handle to this thread, needed as argument for the SetThreadPriority function. I googled several hours but couldn't find any hint. Hope, someone can help me!

Share this post


Link to post
Share on other sites
Advertisement
What do you mean by "windows generated InputThread"?? Do you mean that your app generated it using the Windows API, or that it's some thread generated for you?

Share this post


Link to post
Share on other sites
@LordShade: The thread is not created using CreateThread and isn't the primary execution thread. Thanks though.

@MJP. In Visual Studio i can see 3 threads, running in the main process: WinMainCRTStartup, ProcessThread, InputThread. They must be automatically produced by Windows when creating a window.

Share this post


Link to post
Share on other sites
What libraries are you using? Windows doesn't create any extra threads for window handling, so it must be another library you're linking to.

If you double click on the thread in the Threads window in the debugger, you can see what code is running.

Share this post


Link to post
Share on other sites
Ok, now i see that the thread actually belongs to a kind of library. [oh]
So i have to find another solution for my problem. But that's another issue..

Thanks again!

Share this post


Link to post
Share on other sites
Quote:
Original post by merphi
Ok, now i see that the thread actually belongs to a kind of library. [oh]
So i have to find another solution for my problem. But that's another issue..

Thanks again!
Why do you need to change its priority? You could enumerate all the threads in your process and if you can work out which thread is the InputThread, you can use SetThreadPriority to change it's priority.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!