Re: [GD-Windows] Limiting to one instance
Brought to you by:
vexxed72
From: Dan T. <da...@ar...> - 2006-08-15 16:09:41
|
You have to prefix "Local\" in order to allow for multiple concurrent users. However if you still run on 9x, you have to remove the Local as its reserved or somesuch. -Dan Scoubidou944 (Hotmail) wrote: > 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 > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > |