Example #1
0
 /// <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));
 }
Example #2
0
 public static bool WinEventUnhook(IntPtr hWinEventHook)
 {
     return(UnsafeNativeMethods.UnhookWinEvent(hWinEventHook));
 }