Terminate Application

  • Thread starter Thread starter Marc Ambrosius
  • Start date Start date
M

Marc Ambrosius

Hi,

how can I terminate an (.NET CF) application from another one? My
application runs and I send a WM_CLOSE via PostMessage. It disappears from
screen but remains in memory. Afterwards I try to check if it still runs by
calling FindWindow. But this function never returns. Calling
TerminateProcess doesn't affect my application. Using Windows CE Remote
Process Viewer terminating succeeds. Is there any way to do the same thing
(without changing the application)?

Thanks in advance

Marc
 
If TerminateProcess doesn't affect it, you're not passing the right
parameters...

You should come up with a scheme to notify the application to exit, not just
close. You might do this by creating a new message with
RegisterWindowMessage() and passing that when you want the application to
exit and handling it by actually exiting the application when it is
received. Or, you could use CreateEvent() and in the target application,
exit when the event is set, etc., etc.

Paul T.
 
Back
Top