Closed xanatos closed 7 years ago
The LoadLibrary is using the Ansi Version of the method.
[DllImport("kernel32", SetLastError = true, CharSet = CharSet.Ansi)] private static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string lpFileName);
should be
[DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);
otherwise if you have folders with Unicode names it won't work correctly (or like the CreateFileMapping use CharSet.Auto and LPTStr)
Thanks for the report. I've made the change.
The LoadLibrary is using the Ansi Version of the method.
should be
otherwise if you have folders with Unicode names it won't work correctly (or like the CreateFileMapping use CharSet.Auto and LPTStr)