Re: Interface Question
- From: Hans-Peter Diettrich <DrDiettrich1@xxxxxxx>
- Date: Tue, 10 Oct 2006 12:15:13 +0200
Rob Kennedy wrote:
http://www.cs.wisc.edu/~rkennedy/interface-object
A fine article :-)
I only disagree with the last paragraph(s), about how to retrieve object references. In the case of a Delphi class, the offset of the interface pointer is stored in the interface description, no need to look into the stubs (hint: the compiler obtains the offset just from that place).
Looking into the stub code is a bit safer, because that code may be less version dependent, than the info in the classtype structure.
Another note:
Instances of the old "Object" type do not necessarily include an VMT pointer, in case the object has no virtual methods. This restriction may be compatible with CBuilder classes, and it makes it impossible to obtain an classtype or RTTI from such objects. But since a TObject already has virtual methods (Destroy...), the VMT pointer in Class objects always sits at the begin of every object.
DoDi
.
- Follow-Ups:
- Re: Interface Question
- From: Rob Kennedy
- Re: Interface Question
- References:
- Interface Question
- From: alanglloyd@xxxxxxx
- Re: Interface Question
- From: Rob Kennedy
- Interface Question
- Prev by Date: Re: Interface Question
- Next by Date: Re: Interface Question
- Previous by thread: Re: Interface Question
- Next by thread: Re: Interface Question
- Index(es):