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?