win32单例执行
2021-01-04 14:29
标签:div err nbsp handle hand error 执行 etl == win32单例执行 标签:div err nbsp handle hand error 执行 etl == 原文地址:https://www.cnblogs.com/icyvalley/p/13196089.html 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