unit uFacadeDemoServer;

{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  Windows, Messages, SysUtils, Classes, ComServ, ComObj, VCLCom, DataBkr,
  DBClient, PFacadeDemo_TLB, StdVcl, uObjects;

type
  TFacadeDemo = class(TRemoteDataModule, IFacadeDemo)
  private
    { Private declarations }
  protected
    class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
    procedure CreateObject1; safecall;
    procedure CreateObject2; safecall;
    procedure CreateObject3; safecall;
  public
    { Public declarations }
  end;

implementation

{$R *.DFM}

class procedure TFacadeDemo.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);
begin
  if Register then
  begin
    inherited UpdateRegistry(Register, ClassID, ProgID);
    EnableSocketTransport(ClassID);
    EnableWebTransport(ClassID);
  end else
  begin
    DisableSocketTransport(ClassID);
    DisableWebTransport(ClassID);
    inherited UpdateRegistry(Register, ClassID, ProgID);
  end;
end;

procedure TFacadeDemo.CreateObject1;
begin

end;

procedure TFacadeDemo.CreateObject2;
begin

end;

procedure TFacadeDemo.CreateObject3;
begin

end;

initialization
  TComponentFactory.Create(ComServer, TFacadeDemo,
    Class_FacadeDemo, ciMultiInstance, tmApartment);
end.
