How do I stop a running program during uninstall or reinstall?

R

Russ Ryba

How do I stop a running program during uninstall?

If the user says uninstall, or reinstall I want my program to stop and
the uninstall or reinstall should happen without any messages or errors.

I want to be able to handle the following situations...

A. Program is Running and user tries to remove program
through handheld control panel

B. Program is Running and user tries to install a new
version of same program from ActiveSync

C. Program is Running and user tries to remove the
program through ActiveSync Add/Remove Programs.


I have written a custom DLL already that checks for the existence of the
Compact Framework during install_init. It's very simple though, only
one function.

I think I need to send a message from the DLL to my application saying
CLOSE NOW, or maybe find the processes and terminate it. The problem is
I don't know how.

Can someone please post some source code or the API Calls or CF methods
I need to use to do this?

Thank You!

- Russ Ryba
 
D

Daniel Moth

I think I need to send a message from the DLL to my application saying
Options include sending it a WM_CLOSE or creating a named event that your
app waits on and you signal from your dll (at which point your app exits
itself)

Cheers
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top