From d98b43a55e6d05e3bda7875d4825aec9066acca8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 27 May 2018 19:03:50 +0300 Subject: pre-check added for plugin dlls that weren't loaded yet --- src/mir_app/src/pluginopts.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 2a6e5ba783..8a60b5c56e 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -62,7 +62,15 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA *fd, wchar_t *path, WPARAM, LPARAM { wchar_t buf[MAX_PATH]; mir_snwprintf(buf, L"%s\\Plugins\\%s", path, fd->cFileName); + + // try to check a plugin without loading it first HINSTANCE hInst = GetModuleHandle(buf); + if (hInst == nullptr) { + bool bIsPlugin = false; + mir_ptr pIds(GetPluginInterfaces(buf, bIsPlugin)); + if (!bIsPlugin) + return TRUE; + } BASIC_PLUGIN_INFO pi; if (checkAPI(buf, &pi, CHECKAPI_NONE) == 0) -- cgit v1.2.3