Archived

This topic is now archived and is closed to further replies.

spacemonkey005

mult. window instances

Recommended Posts

I searched around here thinking that I could find the answer, but with no luck. I am working on a game in C++/DirectX 8 and I want to limit the user to only have 1 instance of the game open at a time. The only examples I have been able to find are for MFC Apps.... Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites
The most commonly used method is to use CreateMutex() to create and attempt to acquire a named mutex. If the attempt to acquire fails then there''s another instance of the application running.

An example of how to do this is available on MSDN.

Share this post


Link to post
Share on other sites