Skip to content

Commit 7a8e57d

Browse files
committed
Avoid problems with multibytechar* by explicitly using unicode. Addresses CA2101
1 parent 66c272c commit 7a8e57d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rubberduck.VBEEditor/WindowsApi/User32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static class User32
7272
/// <param name="lpClassName">Buffer for returning the class name.</param>
7373
/// <param name="nMaxCount">Buffer size in characters, including the null terminator.</param>
7474
/// <returns>The length of the returned class name (without the null terminator), zero on error.</returns>
75-
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
75+
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
7676
public static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
7777

7878
/// <summary> Gets the parent window of this item. </summary>

0 commit comments

Comments
 (0)