From e1cf36aa3c0b83ba2b255375e7e4dd5cb5ef10c2 Mon Sep 17 00:00:00 2001 From: Perfare Date: Mon, 14 Dec 2020 21:20:04 +0800 Subject: [PATCH] Fixed #650 --- AssetStudio.PInvoke/DllLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AssetStudio.PInvoke/DllLoader.cs b/AssetStudio.PInvoke/DllLoader.cs index a912231..b4e85ea 100644 --- a/AssetStudio.PInvoke/DllLoader.cs +++ b/AssetStudio.PInvoke/DllLoader.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel; +using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; @@ -26,7 +27,7 @@ namespace AssetStudio.PInvoke private static string GetDirectedDllDirectory() { - var localPath = new Uri(typeof(DllLoader).Assembly.CodeBase).LocalPath; + var localPath = Process.GetCurrentProcess().MainModule.FileName; var localDir = Path.GetDirectoryName(localPath); var subDir = Environment.Is64BitProcess ? "x64" : "x86";