OOPortal OOPortal

Containment Delegation  «Prev 

Interface is not allowed to change

COM interfaces are immutable

The phrase "COM interfaces are immutable" means that once a COM interface is published or deployed, its specification is not allowed to change. This applies even if different COM objects implement that interface.
For example, once interface IX1 is published or deployed, all COM objects that implement IX1 must implement the interface exactly as specified. So if IX1 has the following IDL (interface definition language) definition:

interface IX1 : IUnknown
   HRESULT x1(int ix);
   HRESULT x2();

All COM objects that implement IX1 must implement x1 and x2 in vtable order with the specified parameters.
This does not mean that IX1 will have the same implementation in different COM objects. It means only that the vtable ordering and method parameters remain the same.
Consider the case of IUnknown. All COM objects implement QueryInterface, AddRef, and Release in vtable order with exactly the same parameters. However, a call to QueryInterface in one object can have a different implementation than a call to QueryInterface in another object because the objects probably support different interfaces.