Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Thread Priorities
Message
De
05/05/2000 17:31:24
 
 
À
05/05/2000 17:10:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00366808
Message ID:
00366825
Vues:
12
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform