OSDN Git Service

Unicode版のGetWindowTextメソッドを使用することを明示 (CA2101)
authorKimura Youichi <kim.upsilon@bucyou.net>
Mon, 1 Aug 2016 13:28:23 +0000 (22:28 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Mon, 1 Aug 2016 14:02:14 +0000 (23:02 +0900)
OpenTween/NativeMethods.cs

index 89ab2fc..4e43abe 100644 (file)
@@ -483,10 +483,10 @@ namespace OpenTween
         [return: MarshalAs(UnmanagedType.Bool)]
         private static extern bool EnumWindows(EnumWindowCallback lpEnumFunc, IntPtr lParam);
 
-        [DllImport("user32.dll", CharSet = CharSet.Auto)]
+        [DllImport("user32.dll", CharSet = CharSet.Unicode)]
         private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
 
-        [DllImport("user32.dll", CharSet = CharSet.Auto)]
+        [DllImport("user32.dll", CharSet = CharSet.Unicode)]
         private static extern int GetWindowTextLength(IntPtr hWnd);
 
         private static uint targetPid;