Single instance of windows form application

  • Thread starter Thread starter Prats
  • Start date Start date
P

Prats

I have a windows form application developed in C++/CLR
How can I verify that only one instance of the application is running on the
user system at any given time.

Thanks
 
I have a windows form application developed in C++/CLR
How can I verify that only one instance of the application is running on the
user system at any given time.

Have a look on MSDN for Knowledge Base article 243953 - "How to limit
32-bit applications to one instance in Visual C++". It uses
CreateMutex to create a unique named item. Also beware that if you
want to ensure a single instance per-machine in a TS environment, you
need to prefix the mutex name with "Global".

Dave
 
Back
Top