Beispiel #1
0
 protected void OnHookInvoked(HookEventArgs e)
 {
     if (this.HookInvoked != null)
     {
         this.HookInvoked(this, e);
     }
 }
 private void WindowsHookInvoked(object sender, HookEventArgs e)
 {
     ShellContextMenu.CWPSTRUCT cWPSTRUCT = (ShellContextMenu.CWPSTRUCT)Marshal.PtrToStructure(e.lParam, typeof(ShellContextMenu.CWPSTRUCT));
     if (this._oContextMenu2 != null && (cWPSTRUCT.message == 279 || cWPSTRUCT.message == 44 || cWPSTRUCT.message == 43))
     {
         if (this._oContextMenu2.HandleMenuMsg((uint)cWPSTRUCT.message, cWPSTRUCT.wparam, cWPSTRUCT.lparam) == 0)
         {
             return;
         }
     }
     if (this._oContextMenu3 != null && cWPSTRUCT.message == 288)
     {
         if (this._oContextMenu3.HandleMenuMsg2((uint)cWPSTRUCT.message, cWPSTRUCT.wparam, cWPSTRUCT.lparam, IntPtr.Zero) == 0)
         {
         }
     }
 }