Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Process priority
Message
De
27/05/2002 09:13:04
 
 
À
27/05/2002 08:39:09
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00661648
Message ID:
00661659
Vues:
31
>Can the priority of a process or program be controlled in Windows 95 or Windows 98? Or is Windows NT required to do this sort of tricks?
>
>Basically, I need to do some background process (maintenance, backup, etc.) regularly, and want it to interfere as little as possible with programs in the foreground. The time taken for the background process is, of course, secondary: if it takes 30 minutes instead of 15, and I use the computer normally (right now, the background process makes the computer terribly slow), that's fine.

Yes, the process priority can be adjusted, either at the time that the process is spawned, or subsequently given a valid Process handle with adequate privileges using SetPriorityClass(), as documented in the Win32 API section here on UT as #12682. Finer control can be achieved given a thread handle using SetThreadPriority(), which allows you to adjust the relative priority of a thread within a process group rather than shifting it to a different process group, as documented in #12689.
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