H
hooyu
Unregistered / Unconfirmed
GUEST, unregistred user!
以下函数在单元中定义调用一切正常,转到DLL中出错如下:
GETANYIFUNC 在 0000:64636227 的模块
<未知> 中导致无效页错误。
Registers:
EAX=00e71cac CS=0167 EIP=64636227 EFLGS=00010246
EBX=00e71cac SS=016f ESP=008500e4 EBP=00850104
ECX=00850188 DS=016f ESI=81735c08 FS=6617
EDX=bff768d5 ES=016f EDI=0085027c GS=0000
Bytes at CS:EIP:
Stack dump:
bff768c9 0085027c 00e71cac 008501b0 00850188 00850568 bff768d5 00e71cac 00850198 bff882eb 0085027c 00e71cac 008501b0 00850188 64636227 008502f0
函数内容如下://字符替换
function ZiFuChuanTiHuan(const S, Srch, Replace: string): string;stdcall;
var
I: Integer;
Source: string;
begin
Source := S;
Result := '';
repeat
I := Pos(Srch, Source);
if I > 0 then begin
Result := Result + Copy(Source, 1, I - 1) + Replace;
Source := Copy(Source, I + Length(Srch), MaxInt);
end
else Result := Result + Source;
until I <= 0;
end;
GETANYIFUNC 在 0000:64636227 的模块
<未知> 中导致无效页错误。
Registers:
EAX=00e71cac CS=0167 EIP=64636227 EFLGS=00010246
EBX=00e71cac SS=016f ESP=008500e4 EBP=00850104
ECX=00850188 DS=016f ESI=81735c08 FS=6617
EDX=bff768d5 ES=016f EDI=0085027c GS=0000
Bytes at CS:EIP:
Stack dump:
bff768c9 0085027c 00e71cac 008501b0 00850188 00850568 bff768d5 00e71cac 00850198 bff882eb 0085027c 00e71cac 008501b0 00850188 64636227 008502f0
函数内容如下://字符替换
function ZiFuChuanTiHuan(const S, Srch, Replace: string): string;stdcall;
var
I: Integer;
Source: string;
begin
Source := S;
Result := '';
repeat
I := Pos(Srch, Source);
if I > 0 then begin
Result := Result + Copy(Source, 1, I - 1) + Replace;
Source := Copy(Source, I + Length(Srch), MaxInt);
end
else Result := Result + Source;
until I <= 0;
end;