@@ -198,7 +198,7 @@ public static uint FillConsoleOutputAttribute(
198
198
/// If the function succeeds, the return value is <c>true</c>. If the function fails, the return value is
199
199
/// <c>false</c>. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
200
200
/// </returns>
201
- [ DllImport ( "kernel32.dll" , SetLastError = true ) ]
201
+ [ DllImport ( "kernel32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
202
202
[ return : MarshalAs ( UnmanagedType . Bool ) ]
203
203
public static extern bool FillConsoleOutputCharacter (
204
204
SafeConsoleHandle hConsoleOutput ,
@@ -414,7 +414,7 @@ public static string GetConsoleAliasExes(uint exeNameBufferLength = 1024)
414
414
/// The size of the buffer required to store the names of all executable files that have console aliases
415
415
/// defined, in bytes.
416
416
/// </returns>
417
- [ DllImport ( "kernel32.dll" ) ]
417
+ [ DllImport ( "kernel32.dll" , CharSet = CharSet . Unicode ) ]
418
418
public static extern uint GetConsoleAliasExesLength ( ) ;
419
419
420
420
/// <summary>
@@ -1021,7 +1021,7 @@ public static uint GetNumberOfConsoleMouseButtons()
1021
1021
/// If the function succeeds, the return value is <c>true</c>. If the function fails, the return value is
1022
1022
/// <c>false</c>. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
1023
1023
/// </returns>
1024
- [ DllImport ( "kernel32.dll" , SetLastError = true ) ]
1024
+ [ DllImport ( "kernel32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
1025
1025
[ return : MarshalAs ( UnmanagedType . Bool ) ]
1026
1026
public static extern bool PeekConsoleInput (
1027
1027
SafeConsoleHandle hConsoleInput ,
@@ -1202,7 +1202,7 @@ public static InputRecord[] ReadConsoleInput(
1202
1202
/// If the function succeeds, the return value is <c>true</c>. If the function fails, the return value is
1203
1203
/// <c>false</c>. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
1204
1204
/// </returns>
1205
- [ DllImport ( "kernel32.dll" , SetLastError = true ) ]
1205
+ [ DllImport ( "kernel32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
1206
1206
[ return : MarshalAs ( UnmanagedType . Bool ) ]
1207
1207
public static extern bool ReadConsoleOutput (
1208
1208
SafeConsoleHandle hConsoleOutput ,
@@ -1371,7 +1371,7 @@ public static string ReadConsoleOutputCharacter(
1371
1371
/// If the function succeeds, the return value is <c>true</c>. If the function fails, the return value is
1372
1372
/// <c>false</c>. To get extended error information, call <see cref="Marshal.GetLastWin32Error"/>.
1373
1373
/// </returns>
1374
- [ DllImport ( "kernel32.dll" , SetLastError = true ) ]
1374
+ [ DllImport ( "kernel32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
1375
1375
[ return : MarshalAs ( UnmanagedType . Bool ) ]
1376
1376
public static extern bool ScrollConsoleScreenBuffer (
1377
1377
SafeConsoleHandle hConsoleOutput ,
0 commit comments