private void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild,
                                  uint dwEventThread, uint dwmsEventTime)
        {
            if (SubscribedEvents.Contains(HookEvent.ALL_EVENTS))
            {
                OnHookEvent?.Invoke(null, new HookEventArgs(hWinEventHook, eventType, hwnd, idObject, idChild,
                                                            dwEventThread, dwmsEventTime));
                return;
            }

            if (SubscribedEvents.Contains((HookEvent)eventType))
            {
                OnHookEvent?.Invoke(null, new HookEventArgs(hWinEventHook, eventType, hwnd, idObject, idChild,
                                                            dwEventThread, dwmsEventTime));
            }
        }
Beispiel #2
0
 private void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild,
                           uint dwEventThread, uint dwmsEventTime)
 {
     OnHookEvent?.Invoke(hWinEventHook, eventType, hwnd, idObject, idChild, dwEventThread, dwmsEventTime);
 }