Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TerminateProcess()
Message
 
À
16/12/2003 07:52:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00859248
Message ID:
00859447
Vues:
25
>>That's correct, but the problem is how you can obtain the correct processId. If the other apps started within the same one, it should be possible to get the "pointer" to the corresponding ProcessId and pass it to the application that supposed to close them.
>
>Good morning Nick,
>
>I have something that will work. I use GetWindowThreadProcessId to get the ProcessID based on the handle I retrieved using the Windows title. Then use OpenProcess. Then I used EnumProcessModules to get all the active processes. Then looping through those I finally use GetModuleFileNameEx. From there I can compare to insure that the Windows Title belongs to the executable program I wish to close.
>
>Thanks to all you guys for your help.
>Mike

Glad it helped!
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform