The easiest option is to derive the TDevice from the TInterfaced Object and simply extend your descendants with additional methods. Beware of counting links to the interface, although otherwise you will have many unexpected access violations.
Alternatively, you can write a wrapper object that descends from TInterfacedObject and delegates the implementation of interfaces to TDevice descendants. In this case, link counting will be less problematic.
TMacAddressWrapper = class(TInterfacedObject, IMacAddress) private FDevice: TDevice; property Device: TDevice read FDevice implements IMacAddress; public constructor Create(_Device: TDevice); end; constructor TMacAddressWrapper.Create(_Device: TDevice); begin inherited Create; FDevice := _Device; end;
source share