Re: IUnknown interface
"George" <George@discussions.microsoft.com> wrote in message
news:2332B9D3-C74F-4C01-98C2-A79344986E78@microsoft.com
If your component implements a lot of COM
interfaces, each of these interfaces could implement its IUnknown
part in a different way
How do you understand each interface's implementation of
QueryInterface could be different? As we mentioned before?
It can't. You chose to quote Stuart selectively, out of context.
Essentially, he said that COM objects derive from IUnknown multiple
times, which in principle could have allowed them to provide several
different implementations. However, COM rules explicitly prohibit that,
and require all IUnknown implementations on the same object to behave in
exactly the same way.
Querying for any interface other than IUnknown is allowed to return a
different pointer every time.
I could not think of a sample why query for the same interface may
return for a different address?
Read about tear-off interfaces.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925