c++使用CreateMuteX函数创建互斥对象单一运行实例 #include "stdafx.h" #include <Windows.h> // 判断是否重复运行 BOOL IsAlreadyRun() { HANDLE hMutex = NULL; hMutex = ::CreateMutex(NULL, FALSE,"ch"); if (hMutex) { if (