钩子问题.keyhook.dll库文件怎么安装? 程序一运行就跳出这个错误,真不知道这个keyhook.dll库文件是在哪里安装的?XP系统还是DELPHI7里安装?请大虾指点一下..要怎么安装它呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 上传图片不见啦??错误框里的意思:没有找到keyhook.dll,因此这个应用程序未能启动.重新安装应用程序可能会修复此问题. keyhook.dll是人家软件作者写的吧 keyhook.dll可能是别人写的一个Hook,把它放到一个目录下,在主调程序中用加载DLL的方式加载! 楼上是说keyhook.dll这个名字是一个自定义的名字而不是系统里的库文件名字是吗? 我把全代码贴上unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Panel1: TPanel; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button4Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}function EnablekeyHook:BOOL;external'KEYHook.dll';function DisablekeyHook:BOOL;external'KEYHook.dll';function GetKeyCount:integer;external'KEYHook.dll';function GetKey(idx:Integer):Char;external'KEYHook.dll';procedure ClearkeyString;external'keyhook.dll';procedure TForm1.Button1Click(Sender: TObject);begin EnablekeyHook;//设置钩子 button1.enabled:=false; button2.Enabled:=true; button3.Enabled:=true; button4.Enabled:=true; panel1.caption:='键盘钩子已经设置';end;procedure TForm1.Button2Click(Sender: TObject);begin Disablekeyhook;//卸载钩子 button2.Enabled:=false; button1.Enabled:=true; button3.Enabled:=true; button4.Enabled:=true; panel1.Caption:='键盘钩子没有设置';end;procedure TForm1.Button3Click(Sender: TObject);var i:integer;begin memo1.Lines.Clear;//在MEMO中显示键盘历史记录 for i:=0 to GetkeyCount-1 do memo1.Text:=memo1.Text+GetKey(i);end;procedure TForm1.Button4Click(Sender: TObject);begin memo1.Clear; clearkeystring;end;end.希望大虾能指点一下.. function EnablekeyHook:BOOL;external'KEYHook.dll'; function DisablekeyHook:BOOL;external'KEYHook.dll'; 以上是KeyHook.dll中导出的函数,功能是安装钩子,KeyHook是自定义的名字! 我是按书上打的.书上就是这样写的,再也没看到别的程序存在啦那是说KEYHook.dll是不是还有一段自己的程序?那请问6楼的,如何把它改成能运行起来吗? 把KEYHook.dll放到当前工程文件夹下 改变标题栏颜色Delphi 问一个 比较 菜的问题,关于 adoquery 的返回值的…… 在线等 熟悉XML的朋友请进 谁有 indy udp 传输jpg图片的完整例子 帮帮忙~ 谢谢啦 windows 2003 让我头疼,怎么解决nt authory/system rpc 服务错误。 有谁开发过与手机发短信的软件 高分求! Delphi实现网页表单数据的自动提交 一个关于用户权限设置的问题? 如何通过PostMessage 启动一个带参数的子程序,请帮忙举个例子 关于动态创建flash控件的问题,无法保存图片
错误框里的意思:没有找到keyhook.dll,因此这个应用程序未能启动.重新安装应用程序可能会修复此问题.
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Panel1: TPanel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}function EnablekeyHook:BOOL;external'KEYHook.dll';
function DisablekeyHook:BOOL;external'KEYHook.dll';
function GetKeyCount:integer;external'KEYHook.dll';
function GetKey(idx:Integer):Char;external'KEYHook.dll';
procedure ClearkeyString;external'keyhook.dll';
procedure TForm1.Button1Click(Sender: TObject);
begin
EnablekeyHook;//设置钩子
button1.enabled:=false;
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
panel1.caption:='键盘钩子已经设置';
end;procedure TForm1.Button2Click(Sender: TObject);
begin
Disablekeyhook;//卸载钩子
button2.Enabled:=false;
button1.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
panel1.Caption:='键盘钩子没有设置';
end;procedure TForm1.Button3Click(Sender: TObject);
var
i:integer;
begin
memo1.Lines.Clear;//在MEMO中显示键盘历史记录
for i:=0 to GetkeyCount-1 do
memo1.Text:=memo1.Text+GetKey(i);
end;procedure TForm1.Button4Click(Sender: TObject);
begin
memo1.Clear;
clearkeystring;
end;end.
希望大虾能指点一下..
function EnablekeyHook:BOOL;external'KEYHook.dll';
function DisablekeyHook:BOOL;external'KEYHook.dll';
以上是KeyHook.dll中导出的函数,功能是安装钩子,KeyHook是自定义的名字!
那是说KEYHook.dll是不是还有一段自己的程序?
那请问6楼的,如何把它改成能运行起来吗?