From 6005ecaac795631690921d79575beaa35d8e126d Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sun, 30 Oct 2016 15:45:26 +0100 Subject: [PATCH] Compatibility: do not use CharSet.Auto on p/invoke --- src/Numerics/Providers/Common/NativeProviderLoader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Numerics/Providers/Common/NativeProviderLoader.cs b/src/Numerics/Providers/Common/NativeProviderLoader.cs index 51c446bf..1d040a1f 100644 --- a/src/Numerics/Providers/Common/NativeProviderLoader.cs +++ b/src/Numerics/Providers/Common/NativeProviderLoader.cs @@ -222,7 +222,7 @@ namespace MathNet.Numerics.Providers.Common // Search for dependencies in the library's directory rather than the calling process's directory const uint LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008; - [DllImport("kernel32", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Auto, SetLastError = true)] + [DllImport("kernel32", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] static extern IntPtr LoadLibraryEx(string fileName, IntPtr reservedNull, uint flags); } @@ -237,7 +237,7 @@ namespace MathNet.Numerics.Providers.Common const int RTLD_NOW = 2; - [DllImport("libdl.so", CharSet = CharSet.Auto, SetLastError = true)] + [DllImport("libdl.so", SetLastError = true)] static extern IntPtr dlopen(String fileName, int flags); } }