home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue45 / DCOM / DemoServer / DemoAutoobjImpl.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-10-01  |  747 b   |  36 lines

  1. unit DemoAutoobjImpl;
  2.  
  3. interface
  4.  
  5. uses
  6.   ComObj, ActiveX, sysutils,Demoauto_TLB;
  7.  
  8. type
  9.   TDemoAutoObj = class(TAutoObject, IDemoAutoObj)
  10.   protected
  11.     function Get_AMessage: WideString; safecall;
  12.     procedure Set_AMessage(const Value: WideString); safecall;
  13.   end;
  14.  
  15. implementation
  16.  
  17. uses ComServ,DCOMSecUtils;
  18.  
  19. function TDemoAutoObj.Get_AMessage: WideString;
  20. var
  21.  aWidString : Widestring;
  22. begin
  23.  aWidString := ClientBlanketInfo;
  24.  Result := ' Hi there at ' + DateTimeToStr(Now) + aWidString;
  25. end;
  26.  
  27. procedure TDemoAutoObj.Set_AMessage(const Value: WideString);
  28. begin
  29.  
  30. end;
  31.  
  32. initialization
  33.   SwitchSecurityOff(false);
  34.   TAutoObjectFactory.Create(ComServer, TDemoAutoObj, Class_DemoAutoObj, ciMultiInstance);
  35. end.
  36.