Re: QueryInterface mystery
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Tue, 4 Sep 2007 10:52:50 -0700
You clearly seem not to know anything about COM...
QueryInterface is the means for navigating among all interfaces
implemented on a COM object. It's fundamental in the sense
_all_ COM interfaces with no exceptions whatsoever support
it as part of their base interface IUnknown. There are important
rules a COM object must follow for implementing QueryInterface
and all COM clients rely on that. From the client perspective,
you may often not see QueryInterface in action as it is hidden
in smart pointers, but that doesn't diminish its fundamental role.
I highly suggest you read an introductory book on COM:
"Inside COM" by Dale Rogerson, MS Press
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"Dave" <dave5398@xxxxxxxxxxxxxx> wrote in message
news:OHlIWWg7HHA.980@xxxxxxxxxxxxxxxxxxxxxxx
Don't get QueryInterface at all! To use this you need a refid and a (void
**) ptr to something. All the code I've seen requires things like
IID_something or CLSID_somethingelse and the ptr has to be of a type
Isomeinterface. But of course all of this has to be DEFINED somewhere else
they are completely unknown to the compiler. That means headers and
static libraries but NOBODY tells you where to get them. How on earth do
you actually get interface pointers for a real interface???? On the other
hand, if you have all the headers and interfact pointers etc what do you
need QueryInterface for?
Dave
.
- References:
- QueryInterface mystery
- From: Dave
- QueryInterface mystery
- Prev by Date: Re: ActiveX - ATL vs MFC vs C#
- Next by Date: Re: QueryInterface mystery
- Previous by thread: Re: QueryInterface mystery
- Next by thread: IWebBrowser2 problem with Ajax?
- Index(es):
Relevant Pages
|