<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 17.05.2017 18:13, Ondrej Pokorny
wrote:<br>
</div>
<blockquote
cite="mid:0556dbef-1bc7-b27a-b60c-861d4644d617@kluug.net"
type="cite">My question is, how can I call a virtual stored
procedure from PropInfo?</blockquote>
<br>
Digging through the code, I found it:<br>
<br>
<tt>function GetStoredFunction(APropInfo: PPropInfo; AInstance:
TPersistent): CodePointer;</tt><tt><br>
</tt><tt>var</tt><tt><br>
</tt><tt> StoredProcType: Byte;</tt><tt><br>
</tt><tt> xT: Pointer;</tt><tt><br>
</tt><tt>begin</tt><tt><br>
</tt><tt> StoredProcType := ((APropInfo^.PropProcs shr 4) and 3);</tt><tt><br>
</tt><tt> case StoredProcType of</tt><tt><br>
</tt><tt> ptStatic: Result:=APropInfo^.StoredProc; // this is
fine</tt><tt><br>
</tt><b><tt> ptVirtual: Result :=
PPointer(Pointer(AInstance.ClassType))[{%H-}PtrInt(APropInfo^.StoredProc)
div SizeOf(Pointer)];</tt></b><b><tt><br>
</tt></b><tt> end else</tt><tt><br>
</tt><tt> Result:=nil;</tt><tt><br>
</tt><tt> end;</tt><tt><br>
</tt><tt>end;</tt><tt><br>
</tt><br>
Ondrej<br>
</body>
</html>