|
-
April 7th, 2004, 11:10 AM
#1
how can single instance app restart itself?
Is there any way for a "single instance" app to restart itself via CreateProcess()?
I have an app that uses a Mutex as it must ensure only one instance of itself is allowed to run. It is an MFC MDI single document app that "reinitializes" then "restarts" itself after its user reconfigures its database path. It does this by closing its main document and reloading it, but, unfortunately, it does not reinitialize all of itself. The app fails to reinitialize Crystal Reports which in turn uses an ODBC DSN to show database reports. Even though the database pointer changes in the text of the DSN file, there seems to be no way to tell Crystal Reports to reload its DSN.
The app works fine if the user exits the app and then restarts it.
I read the FAQ "How can I start a process" though it is unclear to me how to start a process from a process that uses a mutex to ensure only one copy of itself runs. Any ideas?
Sincerely,
- Ron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|