[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;