GUID erzeugen (MinGW)


#define APPGUID "XXXXXXXX-49DC-452D-BD0A-4318719DE9B9"
// mit uuidgen erzeugt

static bool TestAppRunning()
{
  bool r = false;

  #ifdef _WIN32
  CreateMutexA(NULL, TRUE, APPGUID)
  if (GetLastError() == ERROR_ALREADY_EXISTS)
  {
    r = true;
  }
  #endif
  return r;
}




Comments are closed.