Textractor/GUI/main.cpp

23 lines
722 B
C++
Raw Normal View History

2018-07-21 15:40:16 -07:00
#include "mainwindow.h"
#include <QApplication>
2018-09-01 14:57:25 -04: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-21 15:40:16 -07:00
int main(int argc, char *argv[])
{
2018-09-01 14:57:25 -04:00
AddVectoredExceptionHandler(1, ExceptionHandler);
2018-08-22 12:44:16 -04:00
QApplication a(argc, argv);
MainWindow w;
w.show();
2018-07-21 15:40:16 -07:00
2018-08-22 12:44:53 -04:00
return a.exec();
2018-07-21 15:40:16 -07:00
}