On 17.05.2017 18:13, Ondrej Pokorny wrote:
My question is, how can I call a virtual stored procedure from PropInfo?
Digging through the code, I found it:
function GetStoredFunction(APropInfo: PPropInfo; AInstance:
TPersistent): CodePointer;
var
StoredProcType: Byte;
xT: Pointer;
begin
StoredProcType := ((APropInfo^.PropProcs shr 4) and 3);
case StoredProcType of
ptStatic: Result:=APropInfo^.StoredProc; // this is fine
* ptVirtual: Result :=
PPointer(Pointer(AInstance.ClassType))[{%H-}PtrInt(APropInfo^.StoredProc)
div SizeOf(Pointer)];**
* end else
Result:=nil;
end;
end;
Ondrej
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel