Interface Question
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: 9 Oct 2006 02:39:42 -0700
Inheritance for IShellLink, IPersist, and IPersistFile is declared as
....
IShellLink = interfac(IUnknown) etc etc
IPersist = interface(IUnknown) etc etc
IPersistFile = interface(IPersist) etc etc
and I then see code of ...
var
ObjectIF : IUnknown;
ShellLinkIF : IShellLink;
PersistFileIF : IPersistFile;
begin
ObjectIf := CreateComObject(CLSID_Shellink);
ShellLinkIF := ObjectIF as IShellLink;
// do something with ShellLinkIF
PersistFileIF := ObjectIF as IPersistFile;
// do something with PersistFileIF
Now IShellLink has _none_ of the methods of IPersist or IPersistFile,
so _how_ can an IShellLink be typecast to an IPersistFile. Or is the
COM object of ObjectIF somehow re-created as an IPersistFile when
type-cast as such.
Alan Lloyd
.
- Follow-Ups:
- Re: Interface Question
- From: Rob Kennedy
- Re: Interface Question
- From: Maarten Wiltink
- Re: Interface Question
- From: Bjørge
- Re: Interface Question
- Prev by Date: Re: WebBrowser - What am i doing wrong?
- Next by Date: Re: Interface Question
- Previous by thread: WebBrowser - What am i doing wrong?
- Next by thread: Re: Interface Question
- Index(es):
Relevant Pages
|