From 63b2a07dd98f15d1127d2349e6172da7870f6ded Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Mon, 11 Sep 2023 09:12:41 -0500 Subject: [PATCH] load unmanaged dll from dependencyResolver as well --- Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs | 13 ++++++++++++- .../Flow.Launcher.Plugin.BrowserBookmark.csproj | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs index 1dd0683f0..87bf8e6e8 100644 --- a/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginAssemblyLoader.cs @@ -34,6 +34,17 @@ namespace Flow.Launcher.Core.Plugin return existAssembly ?? (assemblyPath == null ? null : LoadFromAssemblyPath(assemblyPath)); } + + protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) + { + var path = dependencyResolver.ResolveUnmanagedDllToPath(unmanagedDllName); + if (!string.IsNullOrEmpty(path)) + { + return LoadUnmanagedDllFromPath(path); + } + + return IntPtr.Zero; + } internal Type FromAssemblyGetTypeOfInterface(Assembly assembly, Type type) { @@ -41,4 +52,4 @@ namespace Flow.Launcher.Core.Plugin return allTypes.First(o => o.IsClass && !o.IsAbstract && o.GetInterfaces().Any(t => t == type)); } } -} \ No newline at end of file +} diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj index 115d06a32..8ebf292aa 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj @@ -12,7 +12,6 @@ false false true - win-x64