28 lines
520 B
C++
28 lines
520 B
C++
#include "mainwindow.h"
|
|
#include <QApplication>
|
|
#include "base/HGDef.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication a(argc, argv);
|
|
|
|
#ifdef HG_CMP_MSC
|
|
HANDLE hMutex = CreateMutexW(NULL, FALSE, L"{A8856E3B-3B67-43e4-82AD-154258C0FD37}");
|
|
assert(NULL != hMutex);
|
|
if (GetLastError() == ERROR_ALREADY_EXISTS)
|
|
{
|
|
CloseHandle(hMutex);
|
|
return -1;
|
|
}
|
|
#endif
|
|
|
|
MainWindow w;
|
|
//w.show();
|
|
int ret = a.exec();
|
|
|
|
#ifdef HG_CMP_MSC
|
|
CloseHandle(hMutex);
|
|
#endif
|
|
return ret;
|
|
}
|