Re: Limiting to one instance

"Scoubidou944 (Hotmail)" <[email protected]> Tue, 15 Aug 2006 10:47:55 +0200
Newsgroups gmane.games.devel.windows
Message-ID <[email protected]>
void main (void)
{
    HANDLE hMutex;
    hMutex = ::CreateMutex (NULL, TRUE, "MyMutexName");
    if ((hMutex == NULL) || (::GetLastError() ==ERROR_ALREADY_EXISTS))
    {
        // Can't create mutex, another instance running
        return;
    }

    // Continue init
    // [...]

    // End, release handle
    ::CloseHandle (hMutex);
}

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555