求把这个C++函数翻译成delphi 本帖最后由 liu1945325 于 2012-04-30 01:34:23 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function GetSinatureAddr(dn:PChar):DWORD; // 获取特征码偏移var hLib: HMODULE; dwSinatureAddr:DWORD;begin hLib:= LoadLibrary(dn); if (hLib <> 0) then begin asm // 特征码校验 push ebx mov dword ptr [ebx], eax xor eax, eax@check_1_start: mov eax, dword ptr [ebx] cmp byte ptr [eax], $8B jnz @check_1_end mov eax, dword ptr [ebx] inc eax cmp byte ptr [eax], $4D jnz @check_1_end mov eax, dword ptr [ebx] add eax, 2 cmp byte ptr [eax], $0C jnz @check_1_end mov eax, dword ptr [ebx] add eax, 3 cmp byte ptr [eax], $49 je @check_2_start@check_1_end: inc dword ptr [ebx] jmp @check_1_start@check_2_start: mov eax, dword ptr [ebx] cmp byte ptr [eax], $32 jnz @check_2_end mov eax, dword ptr [ebx] inc eax cmp byte ptr [eax], $0c0 jnz @check_2_end mov eax, dword ptr [ebx] push eax lea eax, dwSinatureAddr pop dword ptr [eax] mov eax, dword ptr [ebx] jmp @check__over@check_2_end: inc dword ptr [ebx] jmp @check_2_start@check__over: xor eax, eax pop ebx end; end else begin ShowMessage('Failt to found the Sinature offset.\n'); Result:= Result - 1; end; dwSinatureAddr:= dwSinatureAddr - hLib; FreeLibrary(hLib); Result:= dwSinatureAddr;end;自己翻译的,但是不管用。。求大牛指点 很久很久没玩Delphi了,都忘光了,帮你顶一下。 net send(NetMessageBufferSend)功能问题,各位来帮个忙,急 请问:如何将字节数组转换为字符串? 怎样把DBGrid的左边第一列左面的一个细小列(有一个小黑三角)去掉??? 请问如何将Panel变成透明的? 我没用过Delphi,只是临时编译一个DLL文件,是Delphi超级菜鸟,只会编译,不知下面错误是何原因? 如何从扫描仪读数据? 被黑的证据! 关于窗口停靠 Kingron请进!救救我啊! 哪位朋友知道李维的主页? 帮忙将下面VB.NET 的代码 转换为delphi 请问delphi如何实现画图中的在画板中输入文字的功能
var
hLib: HMODULE;
dwSinatureAddr:DWORD;
begin
hLib:= LoadLibrary(dn);
if (hLib <> 0) then
begin
asm // 特征码校验
push ebx
mov dword ptr [ebx], eax
xor eax, eax@check_1_start:
mov eax, dword ptr [ebx]
cmp byte ptr [eax], $8B
jnz @check_1_end
mov eax, dword ptr [ebx]
inc eax
cmp byte ptr [eax], $4D
jnz @check_1_end
mov eax, dword ptr [ebx]
add eax, 2
cmp byte ptr [eax], $0C
jnz @check_1_end
mov eax, dword ptr [ebx]
add eax, 3
cmp byte ptr [eax], $49
je @check_2_start
@check_1_end:
inc dword ptr [ebx]
jmp @check_1_start@check_2_start:
mov eax, dword ptr [ebx]
cmp byte ptr [eax], $32
jnz @check_2_end
mov eax, dword ptr [ebx]
inc eax
cmp byte ptr [eax], $0c0
jnz @check_2_end
mov eax, dword ptr [ebx]
push eax
lea eax, dwSinatureAddr
pop dword ptr [eax]
mov eax, dword ptr [ebx]
jmp @check__over@check_2_end:
inc dword ptr [ebx]
jmp @check_2_start@check__over:
xor eax, eax
pop ebx
end;
end
else
begin
ShowMessage('Failt to found the Sinature offset.\n');
Result:= Result - 1;
end;
dwSinatureAddr:= dwSinatureAddr - hLib;
FreeLibrary(hLib);
Result:= dwSinatureAddr;
end;自己翻译的,但是不管用。。求大牛指点