Sign in to follow this  

WinAPI: Change Priority of InputThread

This topic is 3573 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
@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

This topic is 3573 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this