我是用静态方式调用的DLL文件。代码如下:library TryDLL;uses Windows, SysUtils, Classes, MessUnt in 'MessUnt.pas', APIHookUnt in 'APIHookUnt.pas';{$R *.res}function GetMsgProc(code: integer; removal: integer; msg: Pointer): Integer; stdcall;begin Result:=0;end;var HookHandle : THandle;procedure StartHook;stdcall;begin HookHandle:=SetWindowsHookEx(WH_GETMESSAGE,@GetMsgProc,HInstance,0);end;procedure StopHook;stdcall;begin UnhookWindowsHookEx(HookHandle);end;exports StartHook,StopHook;begin API_Hookup;end.