Ultimate ToolBox COXInstanceManager class
COXInstanceManager class

Do you also have an application which should only be started once?
WIN32 allows multiple instances by default. This class organizes this problem and allows you to activate the first instance and close every other.

An object of the class COXInstanceManager will manage all the instances of the same application. It can be used to limit the maximum number of running instances, but also to share all kinds of data between these instances. In Win32 every process (and thus every instance of an application) uses its own protected memory space. By default memory addresses cannot be shared between applications. Sometimes it may be necessary to do so, this is when COXInstanceManagercomes in handy.

Features:
•	COXInstanceManager is your all-round solution to managing different instances of a program 
•	Very easy to allow only one instance 
•	Maximum allowed number of instances can be specified freely (e.g. 1, 5, unlimited) 
•	Keeps a list of running instances in shared memory 
•	All access to the list is automatically synchronized 
•	Framework is available to share your own data between multiple instances