Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
System Process Kill
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00797595
Message ID:
00797697
Vues:
15
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform