随笔分类 -  [12]线程相关

摘要:互斥对象 保证只有一个实例运行创建一个全局对象HANDLE hMutex;在主程序入口:hMutex = CreateMutex(NULL,TRUE,"tickets");if(hMutex){  if(ERROR_ALREADY_EXISTs == GetLastError())  {    AfxMessageBox("此程序已经运行!!");    return;  }} 阅读全文
posted @ 2010-06-24 17:22 zhouli 阅读(306) 评论(0) 推荐(0)