One application instance must be in existence

  • Thread starter Thread starter Dmitriy Kolesnik
  • Start date Start date
D

Dmitriy Kolesnik

Hello, All!

Take me advice about, please:

Description:
At the same time can be in existence only one copy of the my application. If
a user try to run the second copy of the application, the instance of the
application must be leave and one more tab must appeared in application.

What solution I can use for resolving this problem?

Thank You, very much!
 
Straigntforward solution: use kernel object, like semaphore or mutex to
detect if application was already started. Application should also
provide means for its remote control, for example singleton object in
predefined URI (This object also be the mark that application was
already launched so it is possible to avoid kernel objects usage ). On
startup application should check if it is already started, if true it
should obtain reference to published remote object and change
application/UI state.
 
Back
Top