1 BOOL IsAlreadyRun() 2 3 { 4 5 HANDLE hMutex = NULL; 6 hMutex = ::CreateMutex(NULL,FALSE,"Application"); 7 if(hMutex) 8 { 9 if(ERROR_ALREADY_EXIST==::GetLastError()) 10 { 11 return TRUE; 12 } 13 } 14 return FALSE; 15 } 16 17
2023-11-15 10:49:40
1 BOOL IsAlreadyRun() 2 3 { 4 5 HANDLE hMutex = NULL; 6 hMutex = ::CreateMutex(NULL,FALSE,"Application"); 7 if(hMutex) 8 { 9 if(ERROR_ALREADY_EXIST==::GetLastError()) 10 { 11 return TRUE; 12 } 13 } 14 return FALSE; 15 } 16 17