Re: Interface Question
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: 9 Oct 2006 06:16:35 -0700
On Oct 9, 1:24 pm, "Maarten Wiltink" <maar...@xxxxxxxxxxxxxxxxxx>
wrote:
<alangll...@xxxxxxx> wrote in messagenews:1160386781.998311.103960@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[...]
Now IShellLink has _none_ of the methods of IPersist or IPersistFile,
so _how_ can an IShellLink be typecast to an IPersistFile.The actual object may implement both the (disjoint) lists.
They are not totally disjoint, by the way. Both include the methods
inherited from IUnknown. It's like Destroy; every object can be
Destroyed because they're all TObjects. All interfaces can be cast
to other interfaces because they all include IUnknown.QueryInterface.
Or is theThe object is never re-created. If I understand correctly, an interface
COM object of ObjectIF somehow re-created as an IPersistFile when
type-cast as such.
reference points to a VMT-like structure that includes the methods
prescribed by the interface. A classtype that implements multiple
interfaces simply builds several such tables from its 'master' VMT.
Thanks Martin.
I can understand how a Delphi classtype can readily implememnt multiple
interfaces, but this is an MS interface, does the same thing happen
there. And how does one know (except by trial & error, or rumour) that
an interface implements multiple interfaces. Or is that hidden in MS
exotic information. It doesn't appear to be in MSDN.
I can see that a multiple-interface class-type could have its
Delphically-overridden QueryInterface method set up a pseudo-VMT for a
typecast interface which has been implemented. The whole problem seems
to me to be the knowledge of an object's multiple interfaces. But I
suppose that if its _not_ a multiple interface implementing object,
then QueryInterface returns an error.
Alan Lloyd
.
- Follow-Ups:
- Re: Interface Question
- From: Chris Cheney
- Re: Interface Question
- From: Maarten Wiltink
- Re: Interface Question
- From: alanglloyd@xxxxxxx
- Re: Interface Question
- References:
- Interface Question
- From: alanglloyd@xxxxxxx
- Re: Interface Question
- From: Maarten Wiltink
- 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):
Relevant Pages
|