I have managed to confuse myself whether I should return E_NOTIMPL or E_NOINTERFACE from my COM server methods.
I have a class with two functions I have overridden from the class I inherited from, both of those functions do nothing since they aren’t really supported at the moment, so I ask should I use “not implemented” or “no interface” for these functions return values?
Does anyone have a general rule of thumb of when to use each?
If you failed to implement an entire interface, then your
QueryInterfacecould explicitly returnE_NOINTERFACE, so that nobody attempts to call any of its methods, or you could just make all of the methods could returnE_NOTIMPL(it does actually make sense to do this in some edge cases). If you partially implement an interface, then you shouldn’t returnE_NOINTERFACEat all.