HANDLE   hMutex=::CreateMutex(NULL,TRUE,"FirstName");//FirstName可以随便取一个唯一的名字  
          if   (hMutex!=NULL)  
          {  
          if   (GetLastError()==ERROR_ALREADY_EXISTS)  
          {  
                  AfxMessageBox("已经有一个程序运行.");  
                  return   FALSE;  
          }  
          }  

相关文章:

  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-03-02
  • 2022-02-23
  • 2021-11-25
  • 2022-02-09
猜你喜欢
  • 2021-12-18
  • 2021-11-05
  • 2021-12-26
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案