I have spent a few days on this already...
I am using _beginthread and _endthread, but I cannot correctly set the priority.
!!!Does someone have a simple example of how to use SetThreadPriority???
Currently I am trying to check if the function fails and it always does so I get extended error information, by calling GetLastError.
The hard part is an arg needs to be handle to the thread. But the thread I run are of type void __cdecl. Even after recasting it the SetThreadPriority fails with GetLastError returning "inappropriate handle".
Doesn't beginthread return the handle you should use for SetThreadPriority?
FYI: This code is being developed in MS Visual C++ 6.0.
I use the function with a void argument and void return. According to MSDN the function uses __cdecl calling convention and should have no return value.
void( __cdecl *start_address )( void * ),