How to limit 32-bit applications to one instance in Visual C++ (with or without Qt)

I use the code from the following article to allow only a single instance of my programs (mostly written using Qt Framework) to run on Windows. Some programs (specially the ones which connect to a specific type of hardware or resource) need this limitation to avoid conflicts.

Please also note that this code is specific to Windows.

Continue reading “How to limit 32-bit applications to one instance in Visual C++ (with or without Qt)”