From 000df0a800c1aebc03ef3ed760585c0e1adcd02e Mon Sep 17 00:00:00 2001 From: Olive Date: Tue, 22 Apr 2025 06:29:39 -0600 Subject: [PATCH] [ClassicExplorerSettings] Fix x64 building For a couple years now, building ClassicExplorerSettings in x64 was not possible due to 1. Missing the x64 build configurations all together 2. Always trying to load ClassicExplorer32.dll no matter the architecture --- .../ClassicExplorerSettings.cpp | 12 +++++++++--- .../ClassicExplorerSettings.vcxproj | 12 ++++++++++++ Src/OpenShell.sln | 6 +++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.cpp b/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.cpp index 313316328..f4b2d62ed 100644 --- a/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.cpp +++ b/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.cpp @@ -37,9 +37,15 @@ static BOOL CALLBACK FindSettingsEnum( HWND hwnd, LPARAM lParam ) HMODULE LoadClassicExplorerDll( void ) { wchar_t path[_MAX_PATH]; - GetModuleFileName(NULL,path,_countof(path)); - *PathFindFileName(path)=0; - PathAppend(path,L"ClassicExplorer32.dll"); + GetModuleFileName(NULL, path, _countof(path)); + *PathFindFileName(path) = 0; + + // Load the proper module depending on architecture rather than hardcoding the x86 one +#ifdef _WIN64 + PathAppend(path, L"ClassicExplorer64.dll"); +#else + PathAppend(path, L"ClassicExplorer32.dll"); +#endif return LoadLibrary(path); } diff --git a/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj b/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj index 592247fb7..773cd2143 100644 --- a/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj +++ b/Src/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj @@ -5,14 +5,26 @@ Debug Win32 + + Debug + x64 + Release Win32 + + Release + x64 + Setup Win32 + + Setup + x64 + {E93271C8-0252-4A08-8227-1978C64C2D34} diff --git a/Src/OpenShell.sln b/Src/OpenShell.sln index 192313d85..0c6caf86e 100644 --- a/Src/OpenShell.sln +++ b/Src/OpenShell.sln @@ -201,13 +201,13 @@ Global {E1017135-9916-4B11-9AC5-1EC0BD8F8CD6}.Setup|x64.ActiveCfg = Release|Win32 {E93271C8-0252-4A08-8227-1978C64C2D34}.Debug|Win32.ActiveCfg = Debug|Win32 {E93271C8-0252-4A08-8227-1978C64C2D34}.Debug|Win32.Build.0 = Debug|Win32 - {E93271C8-0252-4A08-8227-1978C64C2D34}.Debug|x64.ActiveCfg = Debug|Win32 + {E93271C8-0252-4A08-8227-1978C64C2D34}.Debug|x64.ActiveCfg = Debug|x64 {E93271C8-0252-4A08-8227-1978C64C2D34}.Release|Win32.ActiveCfg = Release|Win32 {E93271C8-0252-4A08-8227-1978C64C2D34}.Release|Win32.Build.0 = Release|Win32 - {E93271C8-0252-4A08-8227-1978C64C2D34}.Release|x64.ActiveCfg = Release|Win32 + {E93271C8-0252-4A08-8227-1978C64C2D34}.Release|x64.ActiveCfg = Release|x64 {E93271C8-0252-4A08-8227-1978C64C2D34}.Setup|Win32.ActiveCfg = Setup|Win32 {E93271C8-0252-4A08-8227-1978C64C2D34}.Setup|Win32.Build.0 = Setup|Win32 - {E93271C8-0252-4A08-8227-1978C64C2D34}.Setup|x64.ActiveCfg = Setup|Win32 + {E93271C8-0252-4A08-8227-1978C64C2D34}.Setup|x64.ActiveCfg = Setup|x64 {0A60FD06-3A81-4651-A869-9850DBC115EA}.Debug|Win32.ActiveCfg = Resource|Win32 {0A60FD06-3A81-4651-A869-9850DBC115EA}.Debug|Win32.Build.0 = Resource|Win32 {0A60FD06-3A81-4651-A869-9850DBC115EA}.Debug|x64.ActiveCfg = Resource|Win32