Does anybody have any idea how to find the IOffset from an interface reference that work on all delphi compiler ?
Does anybody have any idea how to find the IOffset from an interface reference that work on all delphi compiler ?
the old good
function GetPIMTOffset(const I: IInterface): integer;
from
http://hallvards.blogspot.fr/2006/09/hack11-get-guid-of-interface-reference.html
doesn't work on Android platform.
Thanks.
http://hallvards.blogspot.fr/2006/09/hack11-get-guid-of-interface-reference.html
the old good
function GetPIMTOffset(const I: IInterface): integer;
from
http://hallvards.blogspot.fr/2006/09/hack11-get-guid-of-interface-reference.html
doesn't work on Android platform.
Thanks.
http://hallvards.blogspot.fr/2006/09/hack11-get-guid-of-interface-reference.html
Also possible with RTTI: http://stackoverflow.com/a/8439298/11480
ReplyDeleteThanks Ondrej but with the RTTI it's not dynamic because your need a typeinfo. The solution of Stefan is good and more safe than the old method.
ReplyDeleteRenaud GHIA I see, so you're constructing new interfaces at runtime. Sounds like fun. ;-)
ReplyDelete