|
@@ -748,7 +748,7 @@ namespace fis.Win
|
|
|
int threadId
|
|
|
);
|
|
|
|
|
|
- [DllImport("user32.dll")]
|
|
|
+ [DllImport("user32.dll", SetLastError = true)]
|
|
|
private static extern int CallNextHookEx(
|
|
|
IntPtr hHook,
|
|
|
int nCode,
|
|
@@ -756,16 +756,16 @@ namespace fis.Win
|
|
|
IntPtr lParam
|
|
|
);
|
|
|
|
|
|
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
|
|
|
+ [DllImport("user32.dll", SetLastError = true)]
|
|
|
private static extern bool UnhookWindowsHookEx(IntPtr hHook);
|
|
|
|
|
|
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
|
|
|
+ [DllImport("user32.dll", SetLastError = true)]
|
|
|
private static extern bool GetCursorPos(out POINT pt);
|
|
|
|
|
|
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
|
|
|
+ [DllImport("user32.dll", SetLastError = true)]
|
|
|
private static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
|
|
|
|
|
|
- [DllImport("user32.dll", CharSet = CharSet.Auto)]
|
|
|
+ [DllImport("user32.dll", SetLastError = true)]
|
|
|
private static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
|
|
|
|
|
|
private static readonly Dictionary<string, IntPtr> _windowHandles = new Dictionary<string, IntPtr>();
|