From 895ca500b39f7e6c2fff645572fb8f9e0b31f526 Mon Sep 17 00:00:00 2001 From: neru Date: Fri, 19 Jun 2026 11:29:58 -0300 Subject: [PATCH] fix: mingw fixes --- src/unlocker/main.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/unlocker/main.cpp b/src/unlocker/main.cpp index 8648834..8d34bce 100644 --- a/src/unlocker/main.cpp +++ b/src/unlocker/main.cpp @@ -13,6 +13,9 @@ #include #else #include + + // from: WinBase.h + #define CREATE_NO_WINDOW 0x08000000 #endif #include @@ -20,9 +23,6 @@ #include #include -// from: WinBase.h -#define CREATE_NO_WINDOW 0x08000000 - bool running = true; TinyMITMProxy* proxy = nullptr; ProxyConfigurator* conf = nullptr; @@ -58,10 +58,11 @@ void StartWatchdog() "rundll32.exe user32.dll,UpdatePerUserSystemParameters;\"", pid); - STARTUPINFOA si = {sizeof(si)}; + STARTUPINFOA si; PROCESS_INFORMATION pi; RtlZeroMemory(&si, sizeof(si)); RtlZeroMemory(&pi, sizeof(pi)); + si.cb = sizeof(si); CreateProcessA(NULL, const_cast(psCommand.c_str()), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi); @@ -130,14 +131,14 @@ int main() SetConsoleCtrlHandler(consoleHandler, TRUE); StartWatchdog(); - __try - { - if (!run()) return 1; - } - __except (EXCEPTION_EXECUTE_HANDLER) - { - if (conf) conf->clearProxy(); - } + // __try + // { + if (!run()) return 1; + // } + // __except (EXCEPTION_EXECUTE_HANDLER) + // { + // if (conf) conf->clearProxy(); + // } return 0; }