Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting the windows 2000 process priority
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00601173
Message ID:
00602092
Vues:
29
>>>>>Does anyone know how to set the priority of a process in windows 2000 programatically from VFP?
>>>>
>>>>Hi Eylon,
>>>>
>>>>Take a look at Message #527632 for some ideas.
>>>
>>>Hello Sergey - I did - thanks. Still - this is for a VFP 6 app and I need a way to get the windows handle from the form.
>>
>>You really need the Thread ID, not the hWnd of a form; the easiest way to do this within the current process is GetCurrentThreadID(), or if you are launching it from a VFP app, you can use my API_APPRUN class, which returns the process and thread IDs and handles for child processes when launched, and you can modify the call to CreateProcess() in API_APPRUN's LaunchApp method to permit you to set a starting priority when launching the application.
>>
>>Once you have a thread handle, you simply call SetThreadPriority() or SetThreadPriorityBoost() as appropriate.
>>
>>You can also use the RUN command in VFP to launch an app using the START verb prefix, which accepts a command line switch to set the process priority at runtime. See the OnLine Help for you version of Windows to get the exact notation for the START verb under your version of Windows.
>
>
>Hello Ed,
>
>Where do I get this API_APPRUN class?
>
>TIA, Eylon

Check Download section here in UT.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform