How can I force an application, say myapp.exe, to close using C++ on Windows CE from a different application?
The scenario is that I have a previous installation of some software that does not behave properly when upgrading to a new version. I therefore need to kill a process (from the updater) before continuing the update.
TerminateProcess? (MSDN)
BOOL TerminateProcess( HANDLE hProcess,
DWORD uExitCode );
You will need the HANDLE to the process which you can easily obtain using the Toolhelp32 APIs. An eample of their use to enumerate all processes on the system can be found here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With