Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running processes
Message
From
27/02/2001 22:02:06
 
 
To
27/02/2001 14:52:28
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00480243
Message ID:
00480370
Views:
8
>Hi,
>
>How can I list the running processes on the current machine? I couldn't find a native VFP function that did this and it's not clear if an API function will (I discovered some functions like "GetProcessHeap", "GetProcessHeaps" or "GetProcessWindowStation" but I'm not sure that either one does what I want.)
>

There's sample code in the FAQ; it relies on two different approaches, one for NT, and one for everything else. The easiest of the two is the non-NT implementation uses CreateToolhelp32Snapshot, and then lists the processes by enumerating the list using Process32First and Process32Next. The code for doing this in NT, which lacks the Toolhelp32 functions, is implemented differently. Try Ramon Jaquez's Code

The functions you list allow you to do things once you know the ProcessID or hProcess, so you need this code first.
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
Reply
Map
View

Click here to load this message in the networking platform