From dac89aec439ab0e583729b1ceff0aee75a4f2619 Mon Sep 17 00:00:00 2001 From: debug Date: Sun, 31 Jan 2016 21:22:45 -0600 Subject: [PATCH] Update AntiDebug.Win32.cs Fixes a bug with Windows 8/10 that causes a crash using OutputDebugString --- Confuser.Runtime/AntiDebug.Win32.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Confuser.Runtime/AntiDebug.Win32.cs b/Confuser.Runtime/AntiDebug.Win32.cs index 9867f39..95ae77a 100644 --- a/Confuser.Runtime/AntiDebug.Win32.cs +++ b/Confuser.Runtime/AntiDebug.Win32.cs @@ -22,7 +22,7 @@ namespace Confuser.Runtime { [DllImport("kernel32.dll")] static extern bool IsDebuggerPresent(); - [DllImport("kernel32.dll")] + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] static extern int OutputDebugString(string str); static void Worker(object thread) { @@ -67,4 +67,4 @@ namespace Confuser.Runtime { } } } -} \ No newline at end of file +}