From fccf33ff0de55518faf2ba780922b66e35afc4e2 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Tue, 16 Nov 2021 02:53:23 +0200 Subject: [PATCH] ep_setup_patch: set subsystem to WINDOWS instead of CONSOLE --- ep_setup_patch/ep_setup_patch.c | 9 +++++++-- ep_setup_patch/ep_setup_patch.vcxproj | 8 ++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ep_setup_patch/ep_setup_patch.c b/ep_setup_patch/ep_setup_patch.c index 4c1fb49..a769b18 100644 --- a/ep_setup_patch/ep_setup_patch.c +++ b/ep_setup_patch/ep_setup_patch.c @@ -3,7 +3,12 @@ #pragma comment(lib, "Shlwapi.lib") #include "../ExplorerPatcher/utility.h" -int main(int argc, char** argv) +int WINAPI wWinMain( + _In_ HINSTANCE hInstance, + _In_opt_ HINSTANCE hPrevInstance, + _In_ LPWSTR lpCmdLine, + _In_ int nShowCmd +) { WCHAR wszPath[MAX_PATH]; GetModuleFileNameW(GetModuleHandle(NULL), wszPath, MAX_PATH); @@ -44,7 +49,7 @@ int main(int argc, char** argv) CloseHandle(hFileMapping); CloseHandle(hFile); - if (argc > 1) + if (__argc > 1) { SHELLEXECUTEINFO ShExecInfo = { 0 }; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); diff --git a/ep_setup_patch/ep_setup_patch.vcxproj b/ep_setup_patch/ep_setup_patch.vcxproj index 74ae05e..20dd63c 100644 --- a/ep_setup_patch/ep_setup_patch.vcxproj +++ b/ep_setup_patch/ep_setup_patch.vcxproj @@ -96,7 +96,7 @@ $(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories) - Console + Windows true @@ -112,7 +112,7 @@ $(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories) - Console + Windows true true true @@ -128,7 +128,7 @@ $(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories) - Console + Windows true @@ -144,7 +144,7 @@ $(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories) - Console + Windows true true true