delphi 中madcodehook怎样安装?

Zee_Mars 2010-08-13 09:42:04
我下了一个例子引用了madcodehook这个库,我安装例子给的地址下载了madcodehook,并且已经将madCodeHook,madBasic都复制到libs里面了,可编译的时候还是提示说:
[Fatal Error] Unit1.pas(7): Unit madCodeHook was compiled with a different version of madDisAsm.KernelProc

有没有人能够帮忙指点下?
...全文
222 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Zee_Mars 2010-08-16
  • 打赏
  • 举报
回复
没有没有人能够帮我解答一下???
Zee_Mars 2010-08-15
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 kye_jufei 的回复:]

致命错误]Unit1.pas(7):单位madCodeHook编纂与不同版本的madDisAsm.KernelProc。。。


Delphi(Pascal) code
uses
SysUtils, classes, windows, madCodeHook, winsock2;

var
oldWSARecv: function(s: TSocket; lpBuffers: L……
[/Quote]

我知道这个提示的汉语意思。。。关键是怎样解决?
kye_jufei 2010-08-14
  • 打赏
  • 举报
回复
致命错误]Unit1.pas(7):单位madCodeHook编纂与不同版本的madDisAsm.KernelProc。。。


uses
SysUtils, classes, windows, madCodeHook, winsock2;

var
oldWSARecv: function(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
var lpNumberOfBytesRecvd: DWORD; var lpFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;

function SetHook: Boolean;

implementation

procedure myRecv(buf: PChar; len: integer);
var
ss: string;
//PacketDispose: TPacketDispose;
begin
//PacketDispose := TPacketDispose.Create(buf, len); // 通过其它线程输出以免阻塞

ss := strPas(buf);
Form1.Memo1.Lines.Add(IntToStr(lpNumberOfBytesRecvd) + '------------- >' + #13#10 + ss);
end;

function myWSARecv(s: TSocket; lpBuffers: LPWSABUF; dwBufferCount: DWORD;
var lpNumberOfBytesRecvd: DWORD; var lpFlags: DWORD; lpOverlapped: LPWSAOVERLAPPED;
lpCompletionRoutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE): Integer; stdcall;
begin
myWSARecv := oldWSARecv(s, lpBuffers, dwBufferCount, lpNumberOfBytesRecvd, lpFlags, lpOverlapped, lpCompletionROUTINE);
myRecv(lpBuffers.buf, lpNumberOfBytesRecvd);
end;

function SetHook: Boolean;
begin // 由于我是Hook程序本身(程序里面有TWebBrowser控件),所以没有做DLL
HookAPI('ws2_32.dll', 'WSARecv', @myWSARecv, @oldWSARecv);
end;
# 压缩文件 F:\rar\delphi控件包\FreeZ_MadCollection.v2.5.7.0_FS.rar 2000-07-09 15:17 0 8 madBasic\Demos\under construction 2000-07-09 15:17 0 8 madDisAsm\Demos\under construction 2000-07-09 15:17 0 8 madKernel\Demos\under construction 2000-07-09 15:17 0 8 madSecurity\Demos\under construction 2003-11-22 16:34 3318 1210 madCodeHook\PowerBasic\ProcessAPI.bas 2003-11-22 16:34 3795 447 madCodeHook\PowerBasic\ProcessFunc.bas 2003-11-23 12:50 1840 208 madCodeHook\PowerBasic\test-DllInjector.bas 2003-11-23 12:51 5308 882 madCodeHook\PowerBasic\test.bas 2004-10-03 10:50 8256 1428 madShell\Demos\DesktopPosSaver.bdsproj 2004-10-03 11:01 8252 77 madCodeHook\Demos\system wide\VariousDlls\DllInjector.bdsproj 2005-04-29 18:01 8243 72 madExcept\Demos\EC.bdsproj 2004-10-03 11:00 8246 80 madCodeHook\Demos\system wide\VariousDlls\Empty.bdsproj 2004-10-03 10:36 8249 77 madExcept\Demos\ExcCatch.bdsproj 2004-10-03 11:00 8253 78 madCodeHook\Demos\system wide\VariousDlls\HookDirect3D.bdsproj 2004-10-03 11:01 8256 77 madCodeHook\Demos\system wide\VariousDlls\HookLoadLibrary.bdsproj 2004-10-03 10:56 8254 78 madCodeHook\Demos\system wide\PrintMonitor\HookPrintAPIs.bdsproj 2004-10-03 11:01 8260 78 madCodeHook\Demos\system wide\VariousDlls\HookProcessCreation.bdsproj 2004-10-03 10:55 8263 81 madCodeHook\Demos\system wide\HookProcessTermination\HookProcessTermination.bdsproj 2004-10-03 10:55 8258 74 madCodeHook\Demos\system wide\HookProcessTermination\HookTerminateAPIs.bdsproj 2004-10-03 10:55 8254 227 madCodeHook\Demos\system wide\HookProcessTermination\InjectService.bdsproj 2004-1
madCollection 2.5.6.0 安装版(无源码) MadCollection,是一款集成在 Delphi (D5, D6, D7, D8, D9, BDS2006, D2007) IDE 下的辅助工具,能快速生成带 Error Report 功能的应用程序。能将错误报告发送到指定邮箱、服务器、记录在本地文件等。其报告可具体指出出错的代码行,以及机器当前信息、寄存器信息等诸多重要诊断信息。还可以完全自定义出错后的界面。The "madBasic" package contains several units, which implement a lot ofbasic functionality like standard type definitions (madTypes), string handling (madStrings), simplified message handling (madTools), compression(madZip) and crypting and encoding (madCrypt). Then the base interfaces for the other mad* packages are defined (unit madBasic). Finally some lists are implemented (madLists). As a bonus I've recently added a unit which can modify the resources of dlls/exes (unit madRes).The package "madCodeHook" offers everything you need to hook code (mostly APIs). Usually such hooks show effect only in the current process. But madCodeHook also can inject a specified DLL into any desired 32bit process or even "system wide" (that is into all currently running and into all in the future created processes). So by putting your hooking stuff into a little DLL and injecting it "system wide", you can realize effective and easy to use system wide API hooking. Of course everything works just as fine under both OS families (9x/NT).The package "madDisAsm" features a full x86 disassembler including MMX, 3dNow enhanced, SSE and SSE2 support. The isassembler can examine a single x86 instruction (see ParseCode) or a full function (see ParseFunction) and either return a short analysis or a full text disassembly. Register contents are watched/followed if possible, this improves the analyses forjump/call targets. Case/switch jump tables are automatically detected and handled correctly.The package "madExcept" was exactly build for that purpose, namely to replace Delphi's standard exception handling with a new logic, which finds out the full callstack with as much details and infos as possible. The exact behaviour of ma

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧