function HookOn(lpHwnd:HWND;lpType:Longint):Longint;stdcall;export;
  begin
    mhwnd:=lpHwnd;
    if hHk<>0 then UnHookWindowsHookEx(hHk);
    hThread:=GetWindowThreadProcessId(mhwnd,hmod);
    hHk:=SetWindowsHookEx(lpType,@HookProc,hInstance,hThread);
    Result:=hHk ;
  end;function HookProc(nCode:integer;WParam:WPARAM;LParam:LPARAM):LRESULT;stdcall;
begin
  Result:=0;
  if nCode<0 then
    begin
    CallNextHookEx(hHk,nCode,WParam,LParam);
    Result:= 0;
    end
  else
    begin
      GetKeyboardState(kbArray);      if (bShow=False) And (kbArray[mykey]=1) then       //myKey=VK_F7;
        begin
          bShow:=True;
          Form1:=TForm1.Create(Application);
          ShowCursor(True);
          try
            Form1.Caption:='my dll windows';
            SetWindowPos(Form1.Handle ,HWND_TOPMOST,0,0,0,0,SWp_NOMOVE Or SWP_NOSIZE);
            Result:=1;
            SuspendThread(hThread);
            Form1.ShowModal ;
            ShowCursor(True);
            ResumeThread (hThread);
            kbArray[mykey]:=0;
            SetKeyboardState(kbArray);           finally
           Form1.Free;
           end;
          end
        else
          begin
           Result:=CallNextHookEx(hHk,nCode,WParam,LParam);
          end;
        end;
      end;这是我的DLL代码。注入成功了,但是注入之后目标程序无法接收键盘/鼠标消息了,哪里出了问题啊?