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