For example if i call the method System.IO.Directory.CreateDirectory, within the .NET code the Win32 API method CreateDirectory from kernel32.dll is called.
In the .NET source code the method is declared as following:
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false)]
internal static extern bool CreateDirectory(
string path,
Win32Native.SECURITY_ATTRIBUTES lpSecurityAttributes);
CharSet is set to CharSet.Auto. It seems that always the Ansi version is called.
My question is if i can force .NET to use the unicode version instead of the Ansi version.