Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Thread Priorities
Message
From
05/05/2000 17:47:31
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00366808
Message ID:
00366837
Views:
16
>>I need to be able to interactively set the thread priority of a FoxPro exe. Looking at the SetThreadPriority api call, I notice that I need a Thread handle. How do I get a thread handle of an already running process. Or if I call the exe with CreateProcess is the thread handle available to me there?
>>
>
>GetCurrentThread() returns a thread handle. CreateProcess() returns a thread handle to the first thread started in the Process it creates (as well as Process handle, process id and thread id) in the returned PROCESS_INFO structure. API_APPRUN parses this to get the process handle and thread handle in the ParseProcessInfoStruc method.
>
>Unless you understand the implications of altering thread and process priorities, I'd advise against changing them; the results can be far from optimal.

Thanks again, Ed. This is the first time I've actual have a use for the API_APPRUN file. < s >
Previous
Reply
Map
View

Click here to load this message in the networking platform