Re: [GD-Windows] Limiting to one instance
Brought to you by:
vexxed72
From: Scoubidou944 \(Hotmail\) <sco...@ho...> - 2006-08-15 08:48:59
|
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); } |