CComVariant

Joined
Feb 12, 2008
Messages
108
Reaction score
0
Hello everyone,


In the book ATL Internals, here is the description for CComVariant. My questions,

--------------------
COM permits an object to hand out different binary values each time a client queries it for a specific interface pointer (with the exception of a query for the IUnknown interface). Therefore, two VARIANTs containing IDispatch pointers referencing the same object might not compare for equality.
--------------------

1.

I think it means even if the pointer binary values are different, they may still be pointed to the same object? Right?

I think it happens only in the situation of multiple inheritance, and in single inheritance, there is no such issue. Right?

2.

I think the above statement describes the following scenario, in multiple inheritance, suppose we have interface A inherits from IDispose, and interface B inherits from IDispose, and have inteface C inherits from both A and B.

The queryInterface for A and B from interface C will return different result.


thanks in advance,
George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top