WinAPI: Change Priority of InputThread
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!
The CreateThread function will return a handle for it.
If it's your primary execution thread, use GetCurrentThread.
Happy coding
If it's your primary execution thread, use GetCurrentThread.
Happy coding
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?
@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.
@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.
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.
If you double click on the thread in the Threads window in the debugger, you can see what code is running.
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!
So i have to find another solution for my problem. But that's another issue..
Thanks again!
Quote:Original post by merphiWhy 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.
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!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement