
Disable Executing More than One Instance of a Program
Sometimes you don’t want to enable the option of running more than one instance of an executable at a time. This can be achieved by using this fragment of code: void main(){ HANDLE hMutex = CreateMutex(NULL, FALSE, “programName”); // if Create mutex succeeded if (hMutex) { // if we already