unit Unit2;

{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  ComObj, ActiveX, Example1_TLB, StdVcl;

type
  TAutoServ1 = class(TAutoObject, IAutoServ1)
  protected
    procedure NewOle; safecall;
    function Get_Caption: WideString; safecall;
    procedure Set_Caption(const Value: WideString); safecall;
    { Protected declarations }
  end;

implementation

uses ComServ, unit1;

procedure TAutoServ1.NewOle;
begin
  Form1.ActionList1.Actions[0].Execute;
end;

function TAutoServ1.Get_Caption: WideString;
begin
  Result:= Form1.Caption;
end;

procedure TAutoServ1.Set_Caption(const Value: WideString);
begin
  Form1.Caption:= Value;
end;

initialization
  TAutoObjectFactory.Create(ComServer, TAutoServ1, Class_AutoServ1,
    ciMultiInstance, tmApartment);
end.
