/// <summary> /// 返回 hWnd 窗口的线程标识 /// </summary> /// <param name="hWnd"></param> /// <returns></returns> public static uint GetWindowThread(IntPtr hWnd) { new UIPermission(UIPermissionWindow.AllWindows).Demand(); return(UnsafeNativeMethods.GetWindowThreadProcessId(hWnd, IntPtr.Zero)); }
public static bool WinEventUnhook(IntPtr hWinEventHook) { return(UnsafeNativeMethods.UnhookWinEvent(hWinEventHook)); }