Single instance of windows form application

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
 
D

David Lowndes

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top