Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Process priority
Message
From
27/05/2002 11:27:06
 
 
To
27/05/2002 11:16:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00661648
Message ID:
00661698
Views:
33
>>Yep - use my API_APPRUN class rather than run - it returns both a process handle and a thread handle that can be used to adjust the priority. Jusr use the LaunchApp() method and then grab the desired handle from the Process class instance and do your thing...
>
>Thanks; I believe this is exactly the class I needed, but I didn't remember where to find it.
>
>One more question: It seems to me that to combine the following two requirements: 1) Wait for termination, 2) Change the priority, I have to adapt the code in LaunchAppAndWait(). Is this correct, or is there a simpler way?

You can call LaunchApp(), snag the handle from the class instance and adjust the priority, and then have your VFP app poll for termination using the CheckProcessExitCode() method until it completes. You can even let your VFP app run side-by-side as long as it doesn't depend on the other process completing before continuing - I sometimes use this trick to launch a VFP report as a background job by firing it up as a separate .EXE and adjust its priority, letting it rip along in the background while my main app does something else...
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform