開發(fā)開發(fā)

          軟件的生命
          隨筆 - 18, 文章 - 0, 評(píng)論 - 0, 引用 - 0
          數(shù)據(jù)加載中……

          mycode1

          function HookPLSQLMsgProc(code: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
          begin
              if code = HC_ACTION then
              begin
                  IDE_DebugLog(PChar(IntToHex(PMsg(lParam)^.Message, 4)));
                  if PMsg(lParam)^.Message = WM_CONTEXTMENU then
                  begin
                      ShowMessage('a111');
                  end;
              end;
              Result := CallNextHookEx(hookHandle, code, WParam, Longint(@lParam));
          end;

           

          // This function is called when the Plug-In is loaded into memory. You can use it to do
          // some one-time initialization. PL/SQL Developer is not logged on yet and you can’t
          // use the callback functions, so you are limited in the things you can do.
          procedure OnActivate; cdecl;
          begin
              try
                  hookHandle := SetWindowsHookEx(WH_GETMESSAGE, HookPLSQLMsgProc, FindHInstance(Pointer(IDE_GetAppHandle())), 0);
                  IDE_DebugLog('Hook Success');
              except
                  on E:Exception do
                  begin
                      IDE_DebugLog('Hook Error.');
                      IDE_DebugLog(PChar(e.Message));
                  end;
              end;
          end;

           

           

          posted on 2011-09-23 22:57 wm6run 閱讀(150) 評(píng)論(0)  編輯  收藏

          主站蜘蛛池模板: 太康县| 武清区| 封开县| 呼伦贝尔市| 庆城县| 道孚县| 利津县| 长治县| 察雅县| 蓬莱市| 库伦旗| 河北区| 方城县| 黔西| 郧西县| 平罗县| 绥棱县| 梓潼县| 汶川县| 洞口县| 永仁县| 朝阳区| 新平| 石阡县| 加查县| 桂阳县| 稻城县| 伊川县| 江陵县| 秦皇岛市| 上蔡县| 柳河县| 高雄县| 自治县| 县级市| 邵武市| 邢台县| 汝州市| 察隅县| 闻喜县| 分宜县|