unit uDemoCOM;
{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  ActiveX, Mtsobj, Mtx, ComObj, PDemoCOM_TLB, StdVcl, SysUtils;

type
  TDemoCOM = class(TMtsAutoObject, IDemoCOM, ISecond)
  protected
    function GetSystemTime: WideString; safecall;
    function GetGreeting: WideString; safecall;
  end;

implementation

uses ComServ;

function TDemoCOM.GetGreeting: WideString;
begin
  Result := 'Second Interface : ISecond';
end;

function TDemoCOM.GetSystemTime: WideString;
begin
  Result := DateTimeToStr(Now);
end;

initialization
  TAutoObjectFactory.Create(ComServer, TDemoCOM, Class_DemoCOM,
    ciMultiInstance, tmApartment);
end.
