home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Demos / Activex / Oleauto / Autoserv / MEMO_TLB.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  6.7 KB  |  160 lines

  1. unit Memo_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                  //
  5. // -------                                                                  //
  6. // The types declared in this file were generated from data read from a     //
  7. // Type Library. If this type library is explicitly or indirectly (via      //
  8. // another type library referring to this type library) re-imported, or the //
  9. // 'Refresh' command of the Type Library Editor activated while editing the //
  10. // Type Library, the contents of this file will be regenerated and all      //
  11. // manual modifications will be lost.                                       //
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.11.1.62  $
  15. // File generated on 6/12/98 11:21:03 AM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: C:\Delphi4\Demos\Activex\Oleauto\Autoserv\memoedit.tlb
  19. // IID\LCID: {55E49D30-9FFE-11D0-8095-0020AF74DE39}\0
  20. // Helpfile: 
  21. // HelpString: Memo Editor Application
  22. // Version:    1.0
  23. // ************************************************************************ //
  24.  
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  28.  
  29. // *********************************************************************//
  30. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  31. //   Type Libraries     : LIBID_xxxx                                    //
  32. //   CoClasses          : CLASS_xxxx                                    //
  33. //   DISPInterfaces     : DIID_xxxx                                     //
  34. //   Non-DISP interfaces: IID_xxxx                                      //
  35. // *********************************************************************//
  36. const
  37.   LIBID_Memo: TGUID = '{55E49D30-9FFE-11D0-8095-0020AF74DE39}';
  38.   IID_IMemoApp: TGUID = '{55E49D31-9FFE-11D0-8095-0020AF74DE39}';
  39.   CLASS_MemoApp: TGUID = '{F7FF4880-200D-11CF-BD2F-0020AF0E5B81}';
  40.   IID_IMemoDoc: TGUID = '{55E49D34-9FFE-11D0-8095-0020AF74DE39}';
  41.   CLASS_MemoDoc: TGUID = '{55E49D35-9FFE-11D0-8095-0020AF74DE39}';
  42. type
  43.  
  44. // *********************************************************************//
  45. // Forward declaration of interfaces defined in Type Library            //
  46. // *********************************************************************//
  47.   IMemoApp = interface;
  48.   IMemoAppDisp = dispinterface;
  49.   IMemoDoc = interface;
  50.   IMemoDocDisp = dispinterface;
  51.  
  52. // *********************************************************************//
  53. // Declaration of CoClasses defined in Type Library                     //
  54. // (NOTE: Here we map each CoClass to its Default Interface)            //
  55. // *********************************************************************//
  56.   MemoApp = IMemoApp;
  57.   MemoDoc = IMemoDoc;
  58.  
  59.  
  60. // *********************************************************************//
  61. // Interface: IMemoApp
  62. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  63. // GUID:      {55E49D31-9FFE-11D0-8095-0020AF74DE39}
  64. // *********************************************************************//
  65.   IMemoApp = interface(IDispatch)
  66.     ['{55E49D31-9FFE-11D0-8095-0020AF74DE39}']
  67.     function NewMemo: OleVariant; safecall;
  68.     function OpenMemo(const MemoFileName: WideString): OleVariant; safecall;
  69.     procedure TileWindows; safecall;
  70.     procedure CascadeWindows; safecall;
  71.     function Get_MemoCount: Integer; safecall;
  72.     function Get_Memos(MemoIndex: Integer): OleVariant; safecall;
  73.     property MemoCount: Integer read Get_MemoCount;
  74.     property Memos[MemoIndex: Integer]: OleVariant read Get_Memos;
  75.   end;
  76.  
  77. // *********************************************************************//
  78. // DispIntf:  IMemoAppDisp
  79. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  80. // GUID:      {55E49D31-9FFE-11D0-8095-0020AF74DE39}
  81. // *********************************************************************//
  82.   IMemoAppDisp = dispinterface
  83.     ['{55E49D31-9FFE-11D0-8095-0020AF74DE39}']
  84.     function NewMemo: OleVariant; dispid 1;
  85.     function OpenMemo(const MemoFileName: WideString): OleVariant; dispid 2;
  86.     procedure TileWindows; dispid 3;
  87.     procedure CascadeWindows; dispid 4;
  88.     property MemoCount: Integer readonly dispid 5;
  89.     property Memos[MemoIndex: Integer]: OleVariant readonly dispid 6;
  90.   end;
  91.  
  92. // *********************************************************************//
  93. // Interface: IMemoDoc
  94. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  95. // GUID:      {55E49D34-9FFE-11D0-8095-0020AF74DE39}
  96. // *********************************************************************//
  97.   IMemoDoc = interface(IDispatch)
  98.     ['{55E49D34-9FFE-11D0-8095-0020AF74DE39}']
  99.     procedure Clear; safecall;
  100.     procedure Insert(const Text: WideString); safecall;
  101.     procedure Save; safecall;
  102.     procedure Close; safecall;
  103.     function Get_FileName: WideString; safecall;
  104.     procedure Set_FileName(const Value: WideString); safecall;
  105.     function Get_Modified: WordBool; safecall;
  106.     property FileName: WideString read Get_FileName write Set_FileName;
  107.     property Modified: WordBool read Get_Modified;
  108.   end;
  109.  
  110. // *********************************************************************//
  111. // DispIntf:  IMemoDocDisp
  112. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  113. // GUID:      {55E49D34-9FFE-11D0-8095-0020AF74DE39}
  114. // *********************************************************************//
  115.   IMemoDocDisp = dispinterface
  116.     ['{55E49D34-9FFE-11D0-8095-0020AF74DE39}']
  117.     procedure Clear; dispid 1;
  118.     procedure Insert(const Text: WideString); dispid 2;
  119.     procedure Save; dispid 3;
  120.     procedure Close; dispid 4;
  121.     property FileName: WideString dispid 5;
  122.     property Modified: WordBool readonly dispid 6;
  123.   end;
  124.  
  125.   CoMemoApp = class
  126.     class function Create: IMemoApp;
  127.     class function CreateRemote(const MachineName: string): IMemoApp;
  128.   end;
  129.  
  130.   CoMemoDoc = class
  131.     class function Create: IMemoDoc;
  132.     class function CreateRemote(const MachineName: string): IMemoDoc;
  133.   end;
  134.  
  135. implementation
  136.  
  137. uses ComObj;
  138.  
  139. class function CoMemoApp.Create: IMemoApp;
  140. begin
  141.   Result := CreateComObject(CLASS_MemoApp) as IMemoApp;
  142. end;
  143.  
  144. class function CoMemoApp.CreateRemote(const MachineName: string): IMemoApp;
  145. begin
  146.   Result := CreateRemoteComObject(MachineName, CLASS_MemoApp) as IMemoApp;
  147. end;
  148.  
  149. class function CoMemoDoc.Create: IMemoDoc;
  150. begin
  151.   Result := CreateComObject(CLASS_MemoDoc) as IMemoDoc;
  152. end;
  153.  
  154. class function CoMemoDoc.CreateRemote(const MachineName: string): IMemoDoc;
  155. begin
  156.   Result := CreateRemoteComObject(MachineName, CLASS_MemoDoc) as IMemoDoc;
  157. end;
  158.  
  159. end.
  160.