home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue45 / DCOM / DemoServer / Demoauto_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-05-09  |  1.8 KB  |  73 lines

  1. unit Demoauto_TLB;
  2.  
  3. { This file contains pascal declarations imported from a type library.
  4.   This file will be written during each import or refresh of the type
  5.   library editor.  Changes to this file will be discarded during the
  6.   refresh process. }
  7.  
  8. { Demoauto Library }
  9. { Version 1.0 }
  10.  
  11. interface
  12.  
  13. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  14.  
  15. const
  16.   LIBID_Demoauto: TGUID = '{F07F2940-4BF2-11D2-BBE0-0000C0B5D6A0}';
  17.  
  18. const
  19.  
  20. { Component class GUIDs }
  21.   Class_DemoAutoObj: TGUID = '{F07F2942-4BF2-11D2-BBE0-0000C0B5D6A0}';
  22.  
  23. type
  24.  
  25. { Forward declarations: Interfaces }
  26.   IDemoAutoObj = interface;
  27.   IDemoAutoObjDisp = dispinterface;
  28.  
  29. { Forward declarations: CoClasses }
  30.   DemoAutoObj = IDemoAutoObj;
  31.  
  32. { Dispatch interface for DemoAutoObj Object }
  33.  
  34.   IDemoAutoObj = interface(IDispatch)
  35.     ['{F07F2941-4BF2-11D2-BBE0-0000C0B5D6A0}']
  36.     function Get_AMessage: WideString; safecall;
  37.     procedure Set_AMessage(const Value: WideString); safecall;
  38.     property AMessage: WideString read Get_AMessage write Set_AMessage;
  39.   end;
  40.  
  41. { DispInterface declaration for Dual Interface IDemoAutoObj }
  42.  
  43.   IDemoAutoObjDisp = dispinterface
  44.     ['{F07F2941-4BF2-11D2-BBE0-0000C0B5D6A0}']
  45.     property AMessage: WideString dispid 1;
  46.   end;
  47.  
  48. { DemoAutoObjObject }
  49.  
  50.   CoDemoAutoObj = class
  51.     class function Create: IDemoAutoObj;
  52.     class function CreateRemote(const MachineName: string): IDemoAutoObj;
  53.   end;
  54.  
  55.  
  56.  
  57. implementation
  58.  
  59. uses ComObj;
  60.  
  61. class function CoDemoAutoObj.Create: IDemoAutoObj;
  62. begin
  63.   Result := CreateComObject(Class_DemoAutoObj) as IDemoAutoObj;
  64. end;
  65.  
  66. class function CoDemoAutoObj.CreateRemote(const MachineName: string): IDemoAutoObj;
  67. begin
  68.   Result := CreateRemoteComObject(MachineName, Class_DemoAutoObj) as IDemoAutoObj;
  69. end;
  70.  
  71.  
  72. end.
  73.