HANDLE hMutex = NULL;
int main () { hMutex = CreateMutex(NULL, FALSE,("Mon Appli")); if ( GetLastError() == ERROR_ALREADY_EXISTS ) { if (hMutex ) CloseHandle(hMutex); printf ("Ce programme est dejà lancé !"); return 0;//quitter ici } // suite du code //................ return 1; }