Exemple #1
0
 private int GetMessageHookProc(int code, IntPtr wParam, IntPtr lParam)
 {
     if (code >= 0)
     {
         if ((long)wParam > 0L)
         {
             Message structure = (Message)Marshal.PtrToStructure(lParam, typeof(Message));
             if ((this.NotifyGetMessageEvent(ref structure) & MessagePreviewResult.NoDispatch) == MessagePreviewResult.NoDispatch)
             {
                 if (RadMessageFilter.callNextHookWhenNoDispatch)
                 {
                     structure.HWnd = new IntPtr(-1);
                     structure.Msg  = -1;
                     Marshal.StructureToPtr((object)structure, lParam, true);
                 }
             }
         }
     }
     try
     {
         return(RadMessageFilter.CallNextHookEx(this.getMessageHookAddress, code, wParam, lParam));
     }
     catch (AccessViolationException ex)
     {
     }
     return(0);
 }
Exemple #2
0
 private int SystemMessageHookProc(int code, IntPtr wParam, IntPtr lParam)
 {
     if (code >= 0)
     {
         this.NotifyMessageFilterEvent((SystemMessage)code, lParam);
     }
     return(RadMessageFilter.CallNextHookEx(this.systemMessageHookAddress, code, wParam, lParam));
 }
Exemple #3
0
 private int CallWndProcHookProc(int code, IntPtr wParam, IntPtr lParam)
 {
     if (code >= 0)
     {
         this.NotifyCallWndProcEvent(wParam, lParam);
     }
     return(RadMessageFilter.CallNextHookEx(this.callWndProcHookAddress, code, wParam, lParam));
 }