Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Thread Priorities
Message
De
05/05/2000 17:47:31
 
 
À
05/05/2000 17:31:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00366808
Message ID:
00366837
Vues:
15
>>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 >
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform