I am developing a rt driver for Win CE and to achieve my purpose I need to be able to change a thread's priority. However problem is that, I do not have the source code special thanks to Microsoft! Thus, I cannot set the thread's priority where it is created.
Currently what I know is the name of the thread (threadname) that I read from Visual Sudio's threads window. (pThread, hThread values always change therefore I cannot use them. Only static thing is threadname.) Can I assign a value to the thread by only knowing its name? (Can I find its unique thread ID by knowing its name?) I checked for built-in functions for threads, there exists a GetCurrentThread function which retrieves a pseudo handle for the calling thread. However, it is not suitable for me. Because in the future I cannot be sure that the current thread is the one that I want. Therefore I may set a different thread's priority.
To sum up: Is there a way to set a thread's priority by only knowin its thread name?
Regards,
Xentius