none
2012-06-22 09:09:53 UTC
I have an MFC application that accepts command-line parameters when
launched. The parameter is just a filename, which allows me to associate a
file type in Windows and then just double-clicking a file will launch my
application.
But, I really need to make sure that there is always only one instance of
the application running. So, if the user double-clicks an associated file
and the app is already running, I need to detect that and somehow tell the
running application to load the file.
I remember, way back in the day, that WinAmp used to do this (I guess it
still does). It used something called "DDE". I looked over the MSDN
documentation on DDE and it looks horribly overcomplicated for something
this simple. Is there an easier way?
launched. The parameter is just a filename, which allows me to associate a
file type in Windows and then just double-clicking a file will launch my
application.
But, I really need to make sure that there is always only one instance of
the application running. So, if the user double-clicks an associated file
and the app is already running, I need to detect that and somehow tell the
running application to load the file.
I remember, way back in the day, that WinAmp used to do this (I guess it
still does). It used something called "DDE". I looked over the MSDN
documentation on DDE and it looks horribly overcomplicated for something
this simple. Is there an easier way?