unit oleMain;

interface

uses
  ComObj, ActiveX, DCOMTSvr_TLB,
  //
  ComServ;


type
  ToleMain = class(TAutoObject, IDCOMTIntf)
  protected
    function GetValue: Integer; safecall;
  end;

implementation

function ToleMain.GetValue: Integer;
begin
  Result := 300;
end;

initialization
  TAutoObjectFactory.Create(ComServer,
    ToleMain,
    Class_DCOMTObject,
    ciMultiInstance);
end.
