createmutex专题

WinAPI-函数CreateMutex(双开)

#include <iostream>#include <stdlib.h>#include "myhead1.h"#include <windows.h>int main(){HANDLE mutex=CreateMutex(NULL,TRUE,"一个全局独有的字符串"); if(mutex && ERROR_ALREADY_EXISTS==GetLastError()){printf("