fix: mingw fixes
Build / build (push) Failing after 7m14s

This commit is contained in:
2026-06-19 11:29:58 -03:00
parent 5732606070
commit 895ca500b3
+12 -11
View File
@@ -13,6 +13,9 @@
#include <windows.h>
#else
#include <consoleapi.h>
// from: WinBase.h
#define CREATE_NO_WINDOW 0x08000000
#endif
#include <processenv.h>
@@ -20,9 +23,6 @@
#include <processthreadsapi.h>
#include <handleapi.h>
// 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<char*>(psCommand.c_str()), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si,
&pi);
@@ -130,14 +131,14 @@ int main()
SetConsoleCtrlHandler(consoleHandler, TRUE);
StartWatchdog();
__try
{
// __try
// {
if (!run()) return 1;
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
if (conf) conf->clearProxy();
}
// }
// __except (EXCEPTION_EXECUTE_HANDLER)
// {
// if (conf) conf->clearProxy();
// }
return 0;
}