else
{
// TODO: code your application's behavior here.
/*
CString strHello;
strHello.LoadString(IDS_HELLO);
cout << (LPCTSTR)strHello << endl;
//*/
HANDLE h=CreateMutex(NULL,FALSE,"my13871234567");
if(GetLastError()==ERROR_ALREADY_EXISTS)
{
cout<<"GetLast!"<<endl;
goto endapp;
}
else
{
cout<<"First!"<<endl;
getchar();
}
}
endapp:
return nRetCode;
}
CreateMutex GetLastError防止多个实例运行
最新推荐文章于 2017-11-08 13:09:59 发布