It depends: if it is an internal unpublished interface, you can modify it as you wish, as long as you manage all the code that interacts with this interface.
After publication, however, the rules are strict: each interface has its own IID. You are changing this interface in any way - by changing, adding, or deleting methods - this is a completely new interface and requires a new IID.
However: COM does not care about how this new interface is implemented: therefore, you can implement your class as the output of the old interface, which simply adds a new method, and let your implementation class implement the output, therefore, since QI returns the appropriate interface when requesting either the old one, or a new interface.
For instance:
class IInterfaceOriginal: public IUnknown { public: ...
So, while you technically “add another interface”, you actually add a little code here: just define a new interface obtained from the old one, change the interface that your class implements to the new one (and add the implementation for the new method) and finally QI update to support both old and new methods - return the same interface for both (and for IUnknown).
source share