Fix procedure CheckPackagePtr doesn't work in Win64 application built with runtime packages

This commit is contained in:
Chau Chee Yang 2014-08-12 12:04:56 +08:00
parent 14dcc5133d
commit d4f64bb62c

View File

@ -9930,10 +9930,18 @@ end;
procedure CheckPackagePtr(var P: PByteArr); procedure CheckPackagePtr(var P: PByteArr);
begin begin
{$ifdef Win32}
if (word((@p[0])^) = $25FF) and (word((@p[6])^)=$C08B)then if (word((@p[0])^) = $25FF) and (word((@p[6])^)=$C08B)then
begin begin
p := PPointer((@p[2])^)^; p := PPointer((@p[2])^)^;
end; end;
{$endif}
{$ifdef Win64}
if (word((@p[0])^) = $25FF) {and (word((@p[6])^)=$C08B)}then
begin
p := PPointer(NativeUInt(@P[0]) + Cardinal((@p[2])^) + 6{Instruction Size})^
end;
{$endif}
end; end;
{$IFDEF VER90}{$DEFINE NO_vmtSelfPtr}{$ENDIF} {$IFDEF VER90}{$DEFINE NO_vmtSelfPtr}{$ENDIF}