I can't see a reason that that would work, given the docs here:
http://msdn.microsoft.com/en-us/library/aa366807%28VS.85%29.aspx
Interfaces identified by the dual
attribute must be compatible with
Automation and be derived from
IDispatch. This attribute is not
allowed on dispinterfaces.
It could be that the [dual]
attribute implicitly adds IDispatch
to the interface.
What you could do is check the code implementing the interface (assuming this is ATL) if it derives from IDispatchImpl
. If so, it actually responds to QI for IDispatch
and might be used as such.
Another alternative is to instantiate an object implementing IOurInterface
and QI it for IDispatch
-- if it succeeds, you probably can't remove it.
Actually, come to think of it, maybe [dual]
doesn't technically require that you derive from IDispatch
as long as you implement both your custom interface and IDispatch
?