How to test COM object integrity automatically?
Posted
by sharptooth
on Stack Overflow
See other posts from Stack Overflow
or by sharptooth
Published on 2010-03-19T09:04:41Z
Indexed on
2010/03/19
9:11 UTC
Read the original article
Hit count: 487
Every COM object must have integrity. In simplified terms this means that if an object implements 3 interfaces - A
, B
and C
and I have A*
pointer to the object I must be able to successfully QueryInterface()
both B
and C
and having B
I must be able to retrieve A
and C
and having C
I must be able to retrieve A
and B
.
Now my object implements 5 interfaces and I want to test its integrity. Writing checks for all of the above myself will require a substantial effort. Is there a tool or some easily tweakable code or a code pattern that would do it?
© Stack Overflow or respective owner