unit uContainedObject;

interface
uses
  Sysutils;

type
  IContainedInterface = interface
    ['{455B65E1-D33A-48D3-8767-28694D611E7F}']
    function GetContainedName(var sName: WideString): HResult; stdcall;
  end;

  TCnObject = class(TContainedObject, IContainedInterface)
  public
    function GetContainedName(var sName: WideString): HResult; stdcall;
  end;

implementation

{ TCnObject }

function TCnObject.GetContainedName(var sName: WideString): HResult;
begin
  sName := 'I am contained Object!';
  Result := S_OK;
end;

end.
 