public WinEventHook(WinEvents from, WinEvents to) { eventProcessor = new winEventDelegate(processListeners); hookHandle = SetWinEventHook((uint)from, (uint)to, IntPtr.Zero, eventProcessor, 0, 0, WINEVENT_OUTOFCONTEXT); }
private static extern IntPtr SetWinEventHook(uint eventMin, uint eventMax, IntPtr hmodWinEventProc, winEventDelegate lpfnWinEventProc, uint idProcess, uint idThread, uint dwFlags);