What's the best way to stop multiple instances of a Windows app being launched?

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-06-10T09:59:14Z Indexed on 2010/06/10 10:02 UTC
Read the original article Hit count: 126

Filed under:

Many Windows apps (like Skype or MSN for instance) don't let you start multiple instances, rather trying to run it a 2nd time just leaves the existing version running.

Is this typically done in some simple way - the start-menu shortcut is a 'wrapper' app around the main app - or is there some registry magic you can do to delegate the problem to Windows itself?

Specifically dealing with Win32 here (unmanaged C++) but happy to hear more general solutions as long as they are workable on Windows XP or alter.

© Stack Overflow or respective owner

Related posts about windows-development