Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
System Process Kill
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00797595
Message ID:
00797697
Views:
16
Windows NT calls applied for enumerating processes:
CloseHandle
EnumProcesses
EnumProcessModules
GetModuleBaseName
GetModuleFileNameEx
OpenProcess


Windows 98/Me needs a different set of calls
CloseHandle
CreateToolhelp32Snapshot
Process32First
Process32Next


FoxPro code samples:

Terminating all running applications from a VFP program
http://www.news2news.com/vfp/?example=243

Enumerating Processes -- Win9*
http://www.news2news.com/vfp/?example=164

Enumerating Processes -- WinNT
http://www.news2news.com/vfp/?example=162

There are several ways of terminating a process. You might send WM_QUIT message to the window associated with a process. This works not every time, and even more reliable way is sending WM_SYSCOMMAND message with S_CLOSE parameter.

Sometimes none of these helps, so you have a last resort -- a heavy bombardment -- TerminateProcess API function. This function is a kind of destructive one, an application terminated may leave some files open, system resources not properly released etc.
Previous
Reply
Map
View

Click here to load this message in the networking platform