From c77fdad74e4f58752dc5caf5e34fec7dab10b8d4 Mon Sep 17 00:00:00 2001 From: de4dot Date: Tue, 1 Apr 2014 22:01:22 +0200 Subject: [PATCH] Use ImplMap.IsPinvokeMethod() --- de4dot.blocks/DotNetUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/de4dot.blocks/DotNetUtils.cs b/de4dot.blocks/DotNetUtils.cs index 89bd176d..88ad2712 100644 --- a/de4dot.blocks/DotNetUtils.cs +++ b/de4dot.blocks/DotNetUtils.cs @@ -174,9 +174,9 @@ namespace de4dot.blocks { public static bool IsPinvokeMethod(MethodDef method, string dll, string funcName) { if (method == null) return false; - if (method.ImplMap == null || method.ImplMap.Name.String != funcName) + if (method.ImplMap == null) return false; - return GetDllName(dll).Equals(GetDllName(method.ImplMap.Module.Name.String), StringComparison.OrdinalIgnoreCase); + return method.ImplMap.IsPinvokeMethod(dll, funcName); } public static MethodDef GetMethod(ModuleDefMD module, IMethod method) {