Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forcefully end task of another program
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00951521
Message ID:
00951580
Vues:
9
This message has been marked as the solution to the initial question of the thread.
This requires Windows Scripting 5.X
FUNCTION terminateProcess(lcProcess)
lcComputer = '.'
loWMIService = Getobject('winmgmts:' ;
    + '{impersonationLevel=impersonate}!\\' + lcComputer + '\root\cimv2')
colProcessList = loWMIService.ExecQuery ;
    ('Select * from Win32_Process')
For Each loProcess In colProcessList
   IF UPPER(loProcess.name) = lcProcess
     loProcess.terminate()
   endif
Next
>Hello,
>
>Is it possible to end the task of another program, when having the window handle, using an API call?
>
>Thanks for your help in advance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform