Textractor_test/GUI/main.cpp

23 lines
722 B
C++
Raw Normal View History

2018-07-22 06:40:16 +08:00
#include "mainwindow.h"
#include <QApplication>
2018-09-02 02:57:25 +08:00
LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS* exception)
{
std::wstring errorMsg(L"");
errorMsg += L"Error code: " + std::to_wstring(exception->ExceptionRecord->ExceptionCode);
errorMsg += L"\r\nError address: " + std::to_wstring((DWORD)exception->ExceptionRecord->ExceptionAddress);
errorMsg += L"\r\nAdditional info: " + std::to_wstring(exception->ExceptionRecord->ExceptionInformation[1]);
MessageBoxW(NULL, errorMsg.c_str(), L"NextHooker ERROR", MB_ICONERROR);
return EXCEPTION_CONTINUE_SEARCH;
}
2018-07-22 06:40:16 +08:00
int main(int argc, char *argv[])
{
2018-09-02 02:57:25 +08:00
AddVectoredExceptionHandler(1, ExceptionHandler);
2018-08-23 00:44:16 +08:00
QApplication a(argc, argv);
MainWindow w;
w.show();
2018-07-22 06:40:16 +08:00
2018-08-23 00:44:53 +08:00
return a.exec();
2018-07-22 06:40:16 +08:00
}