diff --git a/src/runner/runner.cpp b/src/runner/runner.cpp index 738a0b95..b2a7ace2 100644 --- a/src/runner/runner.cpp +++ b/src/runner/runner.cpp @@ -1,5 +1,4 @@ -#define WIN32_LEAN_AND_MEAN -#include +#include #include int __stdcall WinMain(HINSTANCE, HINSTANCE, PSTR, int) @@ -10,11 +9,10 @@ int __stdcall WinMain(HINSTANCE, HINSTANCE, PSTR, int) if (parent_proc) { const auto pid = DWORD(atoi(parent_proc + strlen(command))); - auto* const process_handle = OpenProcess(SYNCHRONIZE, FALSE, pid); + const utils::nt::handle<> process_handle = OpenProcess(SYNCHRONIZE, FALSE, pid); if (process_handle) { WaitForSingleObject(process_handle, INFINITE); - CloseHandle(process_handle); return 0; } }