home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue50 / COMCorn / Main.pas next >
Encoding:
Pascal/Delphi Source File  |  1999-09-03  |  675 b   |  31 lines

  1. unit Main;
  2.  
  3. interface
  4.  
  5. uses
  6.   ComObj, ActiveX, AspTlb, SteveASO_TLB, StdVcl;
  7.  
  8. type
  9.   TSteveServerObj = class(TASPMTSObject, ISteveServerObj)
  10.   protected
  11.     procedure DoIt; safecall;
  12.   end;
  13.  
  14. implementation
  15.  
  16. uses ComServ;
  17.  
  18. procedure TSteveServerObj.DoIt;
  19. var
  20.   UserAgent: string;
  21. begin
  22.   UserAgent := Request.ServerVariables.Item['HTTP_USER_AGENT'];
  23.   Response.Write('This text is coming to you from within the Active Server ' +
  24.     'Object server.  You are using a <i>' + UserAgent + '</i> web browser.');
  25. end;
  26.  
  27. initialization
  28.   TAutoObjectFactory.Create(ComServer, TSteveServerObj, Class_SteveServerObj,
  29.     ciMultiInstance, tmApartment);
  30. end.
  31.