From a4595236592c691b149326d56bc3fdb82dc57e6e Mon Sep 17 00:00:00 2001 From: Don HO Date: Wed, 21 Apr 2021 23:24:05 +0200 Subject: [PATCH] Fix Notepad++ ARM64 version refusing to load plugins in ARM64 version --- PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp index 7509a6b5d..d95f0b32f 100644 --- a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp +++ b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp @@ -27,9 +27,17 @@ using namespace std; const TCHAR * USERMSG = TEXT(" is not compatible with the current version of Notepad++.\n\n\ Do you want to remove this plugin from the plugins directory to prevent this message from the next launch?"); + #ifdef _WIN64 + +#ifdef _M_ARM64 +#define ARCH_TYPE IMAGE_FILE_MACHINE_ARM64 +const TCHAR *ARCH_ERR_MSG = TEXT("Cannot load 32-bit or non-ARM64 plugin."); +#else #define ARCH_TYPE IMAGE_FILE_MACHINE_AMD64 const TCHAR *ARCH_ERR_MSG = TEXT("Cannot load 32-bit plugin."); +#endif + #else #define ARCH_TYPE IMAGE_FILE_MACHINE_I386 const TCHAR *ARCH_ERR_MSG = TEXT("Cannot load 64-bit plugin.");