1

Started here but still the question not closed - I think that I need to revise the whole architecture - so please give your opinions...

Here is the how the application should work: An scheduler executes multiple time the same application, but with different arguments. If the application is started without any parameter or argument - it shows an form which will allows to edit some config data. Despite of multiple executions there should be only one instance of application.

My approach - for single-instance I've used Mutex with ApplicationContext and NativeWindow. This is described here The thing that I can't overcome - when an new instance of application is started- if this instance is started with parameters - how to send data - the parameters - to the application's instance that is running? I've tried to send data using messages - SendMessage/PostMessage - but didn't succeed.

Maybe someone could give another approach?

Community
  • 1
  • 1
DreadAngel
  • 772
  • 11
  • 30
  • Possible duplicate of http://stackoverflow.com/questions/917883/c-how-to-single-instance-application-that-accepts-new-parameters, the link to the blog is dead but in the comments is a link to archive.org. Go and get it there. – ba__friend Jun 29 '11 at 06:20
  • 1
    using SendMessage works. – David Heffernan Jun 29 '11 at 06:38

0 Answers0