public WinEventHooker(int threadId, int hwnd) { this._instHookHandles = new List <int>(); this._threadId = threadId; this._hwnd = hwnd; this.DlgWinEventCallback = new WinApiLocal.WinEventDelegate(this.WinEventStatic); DispatcherEx.xBeginInvoke(new Action(this.InitHooks)); }
static WinEventHooker() { DlgWinEventStaticCallback = new WinApiLocal.WinEventDelegate(WinEventStaticCallback); _hwndDesc = new Dictionary <int, string>(); DispatcherEx.xBeginInvoke(delegate { SetWinEventHook(); }); }
public static extern int SetWinEventHook(EventTypeEnum eventMin, EventTypeEnum eventMax, int hmodWinEventProc, WinApiLocal.WinEventDelegate pfnWinEventProc, int idProcess, int idThread, uint dwFlags);