Esempio n. 1
0
 public void Start()
 {
     if (!this._isStarted && this._hookType != 0)
     {
         this._hookCallback = new GlobalHook.HookProc(this.HookCallbackProcedure);
         this._handleToHook = GlobalHook.SetWindowsHookEx(this._hookType, this._hookCallback, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
         if (this._handleToHook != 0)
         {
             this._isStarted = true;
         }
     }
 }
Esempio n. 2
0
 public void Start()
 {
     if (!this._isStarted && this._hookType != 0)
     {
         this._hookCallback = new GlobalHook.HookProc(this.HookCallbackProcedure);
         this._handleToHook = GlobalHook.SetWindowsHookEx(this._hookType, this._hookCallback, Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
         if (this._handleToHook != 0)
         {
             this._isStarted = true;
         }
     }
 }
Esempio n. 3
0
 public void Start()
 {
     if (this._isStarted || this._hookType == 0)
     {
         return;
     }
     this._hookCallback = new GlobalHook.HookProc(this.HookCallbackProcedure);
     this._handleToHook = GlobalHook.SetWindowsHookEx(this._hookType, this._hookCallback, GlobalHook.GetModuleHandle(Process.GetCurrentProcess().MainModule.ModuleName), 0);
     if (this._handleToHook == 0)
     {
         return;
     }
     this._isStarted = true;
 }
Esempio n. 4
0
 protected static extern int SetWindowsHookEx(int idHook, GlobalHook.HookProc lpfn, IntPtr hMod, int dwThreadId);