#include <windows.h>
int main(int argc, char* argv[])
{
HANDLE hEvent= CreateEvent(NULL,true,true,"init");
if (hEvent)
{
if (GetLastError()==ERROR_ALREADY_EXISTS)
{
printf("Initance is running!\n");
return 0;
}
}
printf("Hello World!\n");
Sleep(10000);
return 0;
}
int main(int argc, char* argv[])
{
HANDLE hEvent= CreateEvent(NULL,true,true,"init");
if (hEvent)
{
if (GetLastError()==ERROR_ALREADY_EXISTS)
{
printf("Initance is running!\n");
return 0;
}
}
printf("Hello World!\n");
Sleep(10000);
return 0;
}