Re: Dual interface
"George" <George@discussions.microsoft.com> wrote in message
- STDMEDIUM::pUnkForRelease holds a pointer of IUnknown, I agree and
- But the pointer to IUnknown should actually pointed to some coclass
- If yes, the coclass object as you said only implements IUnknown;
- So, we can only call its AddRef/Release.
Well, and QueryInterface, though it would be rather pointless if the
only interface you could query for is again IUnknown.
So, it is a component
meaningful which only expose AddRef/Release methods?
The component only expose AddRef/Release
only be able to maintain a reference count of itself
Not true. There's no law saying that the only thing Release does is
maintain the object's own reference count. At the very least, it deletes
the object itself when its reference count reaches zero, and can also
perform other cleanup.
while never be
able to do anything else?
Why can't it do anything else?
With best wishes,
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