home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue49 / ComCorn / AddInDesignerObjects_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-02  |  8.4 KB  |  191 lines

  1. unit AddInDesignerObjects_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.75  $
  15. // File generated on 8/2/99 5:20:15 PM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: c:\Program Files\Common Files\Designer\MSADDNDR.DLL
  19. // IID\LCID: {AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}\0
  20. // Helpfile: 
  21. // HelpString: Microsoft Add-In Designer
  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_AddInDesignerObjects: TGUID = '{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}';
  38.   IID_IAddinDesigner: TGUID = '{AC0714F3-3D04-11D1-AE7D-00A0C90F26F4}';
  39.   IID_IAddinInstance: TGUID = '{AC0714F4-3D04-11D1-AE7D-00A0C90F26F4}';
  40.   IID__IDTExtensibility2: TGUID = '{B65AD801-ABAF-11D0-BB8B-00A0C90F2744}';
  41.   CLASS_AddinDesigner: TGUID = '{AC0714F6-3D04-11D1-AE7D-00A0C90F26F4}';
  42.   CLASS_AddinInstance: TGUID = '{AC0714F7-3D04-11D1-AE7D-00A0C90F26F4}';
  43.  
  44. // *********************************************************************//
  45. // Declaration of Enumerations defined in Type Library                  //
  46. // *********************************************************************//
  47. // ext_ConnectMode constants
  48. type
  49.   ext_ConnectMode = TOleEnum;
  50. const
  51.   ext_cm_AfterStartup = $00000000;
  52.   ext_cm_Startup = $00000001;
  53.   ext_cm_External = $00000002;
  54.   ext_cm_CommandLine = $00000003;
  55.  
  56. // ext_DisconnectMode constants
  57. type
  58.   ext_DisconnectMode = TOleEnum;
  59. const
  60.   ext_dm_HostShutdown = $00000000;
  61.   ext_dm_UserClosed = $00000001;
  62.  
  63. type
  64.  
  65. // *********************************************************************//
  66. // Forward declaration of interfaces defined in Type Library            //
  67. // *********************************************************************//
  68.   IAddinDesigner = interface;
  69.   IAddinDesignerDisp = dispinterface;
  70.   IAddinInstance = interface;
  71.   IAddinInstanceDisp = dispinterface;
  72.   _IDTExtensibility2 = interface;
  73.   _IDTExtensibility2Disp = dispinterface;
  74.  
  75. // *********************************************************************//
  76. // Declaration of CoClasses defined in Type Library                     //
  77. // (NOTE: Here we map each CoClass to its Default Interface)            //
  78. // *********************************************************************//
  79.   AddinDesigner = IAddinDesigner;
  80.   AddinInstance = IAddinInstance;
  81.  
  82.  
  83. // *********************************************************************//
  84. // Declaration of structures, unions and aliases.                       //
  85. // *********************************************************************//
  86.   PPSafeArray1 = ^PSafeArray; {*}
  87.  
  88.   IDTExtensibility2 = _IDTExtensibility2; 
  89.  
  90. // *********************************************************************//
  91. // Interface: IAddinDesigner
  92. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  93. // GUID:      {AC0714F3-3D04-11D1-AE7D-00A0C90F26F4}
  94. // *********************************************************************//
  95.   IAddinDesigner = interface(IDispatch)
  96.     ['{AC0714F3-3D04-11D1-AE7D-00A0C90F26F4}']
  97.   end;
  98.  
  99. // *********************************************************************//
  100. // DispIntf:  IAddinDesignerDisp
  101. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  102. // GUID:      {AC0714F3-3D04-11D1-AE7D-00A0C90F26F4}
  103. // *********************************************************************//
  104.   IAddinDesignerDisp = dispinterface
  105.     ['{AC0714F3-3D04-11D1-AE7D-00A0C90F26F4}']
  106.   end;
  107.  
  108. // *********************************************************************//
  109. // Interface: IAddinInstance
  110. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  111. // GUID:      {AC0714F4-3D04-11D1-AE7D-00A0C90F26F4}
  112. // *********************************************************************//
  113.   IAddinInstance = interface(IDispatch)
  114.     ['{AC0714F4-3D04-11D1-AE7D-00A0C90F26F4}']
  115.   end;
  116.  
  117. // *********************************************************************//
  118. // DispIntf:  IAddinInstanceDisp
  119. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  120. // GUID:      {AC0714F4-3D04-11D1-AE7D-00A0C90F26F4}
  121. // *********************************************************************//
  122.   IAddinInstanceDisp = dispinterface
  123.     ['{AC0714F4-3D04-11D1-AE7D-00A0C90F26F4}']
  124.   end;
  125.  
  126. // *********************************************************************//
  127. // Interface: _IDTExtensibility2
  128. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  129. // GUID:      {B65AD801-ABAF-11D0-BB8B-00A0C90F2744}
  130. // *********************************************************************//
  131.   _IDTExtensibility2 = interface(IDispatch)
  132.     ['{B65AD801-ABAF-11D0-BB8B-00A0C90F2744}']
  133.     procedure OnConnection(const Application_: IDispatch; ConnectMode: ext_ConnectMode; 
  134.                            const AddInInst: IDispatch; var custom: PSafeArray); safecall;
  135.     procedure OnDisconnection(RemoveMode: ext_DisconnectMode; var custom: PSafeArray); safecall;
  136.     procedure OnAddInsUpdate(var custom: PSafeArray); safecall;
  137.     procedure OnStartupComplete(var custom: PSafeArray); safecall;
  138.     procedure OnBeginShutdown(var custom: PSafeArray); safecall;
  139.   end;
  140.  
  141. // *********************************************************************//
  142. // DispIntf:  _IDTExtensibility2Disp
  143. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  144. // GUID:      {B65AD801-ABAF-11D0-BB8B-00A0C90F2744}
  145. // *********************************************************************//
  146.   _IDTExtensibility2Disp = dispinterface
  147.     ['{B65AD801-ABAF-11D0-BB8B-00A0C90F2744}']
  148.     procedure OnConnection(const Application_: IDispatch; ConnectMode: ext_ConnectMode; 
  149.                            const AddInInst: IDispatch; var custom: {??PSafeArray} OleVariant); dispid 1;
  150.     procedure OnDisconnection(RemoveMode: ext_DisconnectMode; var custom: {??PSafeArray} OleVariant); dispid 2;
  151.     procedure OnAddInsUpdate(var custom: {??PSafeArray} OleVariant); dispid 3;
  152.     procedure OnStartupComplete(var custom: {??PSafeArray} OleVariant); dispid 4;
  153.     procedure OnBeginShutdown(var custom: {??PSafeArray} OleVariant); dispid 5;
  154.   end;
  155.  
  156.   CoAddinDesigner = class
  157.     class function Create: IAddinDesigner;
  158.     class function CreateRemote(const MachineName: string): IAddinDesigner;
  159.   end;
  160.  
  161.   CoAddinInstance = class
  162.     class function Create: IAddinInstance;
  163.     class function CreateRemote(const MachineName: string): IAddinInstance;
  164.   end;
  165.  
  166. implementation
  167.  
  168. uses ComObj;
  169.  
  170. class function CoAddinDesigner.Create: IAddinDesigner;
  171. begin
  172.   Result := CreateComObject(CLASS_AddinDesigner) as IAddinDesigner;
  173. end;
  174.  
  175. class function CoAddinDesigner.CreateRemote(const MachineName: string): IAddinDesigner;
  176. begin
  177.   Result := CreateRemoteComObject(MachineName, CLASS_AddinDesigner) as IAddinDesigner;
  178. end;
  179.  
  180. class function CoAddinInstance.Create: IAddinInstance;
  181. begin
  182.   Result := CreateComObject(CLASS_AddinInstance) as IAddinInstance;
  183. end;
  184.  
  185. class function CoAddinInstance.CreateRemote(const MachineName: string): IAddinInstance;
  186. begin
  187.   Result := CreateRemoteComObject(MachineName, CLASS_AddinInstance) as IAddinInstance;
  188. end;
  189.  
  190. end.
  191.