From 19cfe6666a7a5ac99d81653de026f5b793b4650f Mon Sep 17 00:00:00 2001 From: bryan Date: Mon, 13 Dec 2021 14:01:17 +0100 Subject: [PATCH] Fix module lookup --- DInvoke/DInvoke/DynamicInvoke/Generic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DInvoke/DInvoke/DynamicInvoke/Generic.cs b/DInvoke/DInvoke/DynamicInvoke/Generic.cs index f11bf30..ca1f5d4 100644 --- a/DInvoke/DInvoke/DynamicInvoke/Generic.cs +++ b/DInvoke/DInvoke/DynamicInvoke/Generic.cs @@ -164,7 +164,7 @@ public static IntPtr GetLoadedModuleAddress(string DLLName) ProcessModuleCollection ProcModules = Process.GetCurrentProcess().Modules; foreach (ProcessModule Mod in ProcModules) { - if (Mod.FileName.ToLower().EndsWith(DLLName.ToLower())) + if (Mod.FileName.ToLower().EndsWith("\\" + DLLName.ToLower())) { return Mod.BaseAddress; }