Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TerminateProcess()
Message
From
16/12/2003 07:52:44
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00859248
Message ID:
00859423
Views:
31
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform