home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Bin / DPHPRO50.BPL / 0 / RCDATA / PASPROCRTRS < prev    next >
Encoding:
Text File  |  1999-08-11  |  6.6 KB  |  339 lines

  1. unit %0:s;
  2.  
  3. interface
  4.  
  5. uses
  6.   ComObj, ActiveX, %3:s;
  7.  
  8. type
  9.   T%1:s = class(TAutoObject, %5:s)
  10.   %6:s
  11.   end;
  12.  
  13. implementation
  14.  
  15. uses ComServ;%7:s
  16.  
  17. initialization
  18.   TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s,
  19.     %2:s, %4:s);
  20. end.
  21. |unit %0:s;
  22.  
  23. interface
  24.  
  25. uses
  26.   Windows, Messages, SysUtils, Classes, ComServ, ComObj, VCLCom, DataBkr,
  27.   DBClient, %3:s;
  28.  
  29. type
  30.   T%1:s = class(TRemoteDataModule, I%1:s)
  31.   private
  32.     { Private declarations }
  33.   protected
  34.     class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
  35.   public
  36.     { Public declarations }
  37.   end;
  38.  
  39. implementation
  40.  
  41. {$R *.DFM}
  42.  
  43. class procedure T%1:s.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);
  44. begin
  45.   if Register then
  46.   begin
  47.     inherited UpdateRegistry(Register, ClassID, ProgID);
  48.     EnableSocketTransport(ClassID);
  49.     EnableWebTransport(ClassID);
  50.   end else
  51.   begin
  52.     DisableSocketTransport(ClassID);
  53.     DisableWebTransport(ClassID);
  54.     inherited UpdateRegistry(Register, ClassID, ProgID);
  55.   end;
  56. end;
  57.  
  58. initialization
  59.   TComponentFactory.Create(ComServer, T%1:s,
  60.     Class_%1:s, %2:s, %4:s);
  61. end.
  62. |library %s;
  63.  
  64. uses
  65.   ComServ;
  66.  
  67. exports
  68.   DllGetClassObject,
  69.   DllCanUnloadNow,
  70.   DllRegisterServer,
  71.   DllUnregisterServer;
  72.  
  73. {$R *.RES}
  74.  
  75. begin
  76. end.
  77. |unit %0:s;
  78.  
  79. interface
  80.  
  81. uses
  82.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  83.   ActiveX, AxCtrls, %2:s;
  84.  
  85. type
  86.   T%1:s = class(TActiveForm)
  87.   private
  88.     { Private declarations }
  89.     FEvents: I%1:sEvents;
  90.   protected
  91.     { Protected declarations }
  92.     procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
  93.     procedure EventSinkChanged(const EventSink: IUnknown); override;
  94.   public
  95.     { Public declarations }
  96.     procedure Initialize; override;
  97.   end;
  98.  
  99. implementation
  100.  
  101. uses ComObj, ComServ;
  102.  
  103. {$R *.DFM}
  104.  
  105. { T%1:s }
  106.  
  107. procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
  108. begin
  109.   { Define property pages here.  Property pages are defined by calling
  110.     DefinePropertyPage with the class id of the page.  For example,
  111.       DefinePropertyPage(Class_%1:sPage); }
  112. end;
  113.  
  114. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  115. begin
  116.   FEvents := EventSink as I%1:sEvents;
  117. end;
  118.  
  119. procedure T%1:s.Initialize;
  120. begin
  121.   inherited Initialize;
  122. end;
  123.  
  124. initialization
  125.   TActiveFormFactory.Create(
  126.     ComServer,
  127.     TActiveFormControl,
  128.     T%1:s,
  129.     Class_%1:s,
  130.     %3:d,
  131.     '%4:s',
  132.     OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
  133.     %5:s);
  134. end.
  135. |unit %0:s;
  136.  
  137. interface
  138.  
  139. uses
  140.   Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
  141.   ComServ, StdVCL, AXCtrls, %3:s;
  142.  
  143. type
  144.   T%1:s = class(TActiveXControl)
  145.   private
  146.     { Private declarations }
  147.     FDelphiControl: %2:s;
  148.     FEvents: I%1:sEvents;
  149.   protected
  150.     { Protected declarations }
  151.     procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
  152.     procedure EventSinkChanged(const EventSink: IUnknown); override;
  153.     procedure InitializeControl; override;
  154.   end;
  155.  
  156. implementation
  157.  
  158. uses ComObj;
  159.  
  160. { T%1:s }
  161.  
  162. procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
  163. begin
  164.   {TODO: Define property pages here.  Property pages are defined by calling
  165.     DefinePropertyPage with the class id of the page.  For example,
  166.       DefinePropertyPage(Class_%1:sPage); }
  167. end;
  168.  
  169. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  170. begin
  171.   FEvents := EventSink as I%1:sEvents;
  172. end;
  173.  
  174. procedure T%1:s.InitializeControl;
  175. begin
  176.   FDelphiControl := Control as %2:s;
  177. end;
  178.  
  179. initialization
  180.   TActiveXControlFactory.Create(
  181.     ComServer,
  182.     T%1:s,
  183.     %2:s,
  184.     Class_%1:s,
  185.     %4:d,
  186.     '%5:s',
  187.     %6:s,
  188.     %7:s);
  189. end.
  190. |unit %0:s;
  191.  
  192. interface
  193.  
  194. uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
  195.   ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls;
  196.  
  197. type
  198.   T%1:s = class(TPropertyPage)
  199.   private
  200.     { Private declarations }
  201.   protected
  202.     { Protected declarations }
  203.   public
  204.     { Public declarations }
  205.     procedure UpdatePropertyPage; override;
  206.     procedure UpdateObject; override;
  207.   end;
  208.  
  209. const
  210.   Class_%1:s: TGUID = '%2:s';
  211.  
  212. implementation
  213.  
  214. {$R *.DFM}
  215.  
  216. procedure T%1:s.UpdatePropertyPage;
  217. begin
  218.   { Update your controls from OleObject }
  219. end;
  220.  
  221. procedure T%1:s.UpdateObject;
  222. begin
  223.   { Update OleObject from your controls }
  224. end;
  225.  
  226. initialization
  227.   TActiveXPropertyPageFactory.Create(
  228.     ComServer,
  229.     T%1:s,
  230.     Class_%1:s);
  231. end.
  232. |
  233.   TComponentFactory.Create(ComServer, T%s,
  234.     Class_%s, ciMultiInstance);
  235. |unit %0:s;
  236.  
  237. interface
  238.  
  239. uses
  240.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  241.   StdCtrls, ExtCtrls;
  242.  
  243. type
  244.   T%1:s = class(TForm)
  245.     CtlImage: TSpeedButton;
  246.     NameLbl: TLabel;
  247.     OkBtn: TButton;
  248.     CopyrightLbl: TLabel;
  249.     DescLbl: TLabel;
  250.   end;
  251.  
  252. procedure Show%1:s;
  253.  
  254. implementation
  255.  
  256. {$R *.DFM}
  257.  
  258. procedure Show%1:s;
  259. begin
  260.   with T%1:s.Create(nil) do
  261.     try
  262.       ShowModal;
  263.     finally
  264.       Free;
  265.     end;
  266. end;
  267.  
  268. end.
  269. |unit %0:s;
  270.  
  271. interface
  272.  
  273. uses
  274.   Windows, ActiveX, Classes, ComObj%1:s;
  275.  
  276. type
  277.   T%2:s = class(T%9:sComObject%3:s)
  278.   protected%4:s
  279.   end;
  280. %5:s
  281. implementation
  282.  
  283. uses ComServ;
  284.  
  285. initialization
  286.   T%9:sComObjectFactory.Create(ComServer, T%2:s, Class_%2:s,
  287.     %10:s%6:s%7:s, %8:s);
  288. end.
  289. |AxCtrls, Classes, |private
  290.     { Private declarations }
  291.     FConnectionPoints: TConnectionPoints;
  292.     FConnectionPoint: TConnectionPoint;
  293.     FSinkList: TList;
  294.     FEvents: %s;
  295.   public
  296.     procedure Initialize; override;
  297.   protected
  298.     { Protected declarations }
  299.     property ConnectionPoints: TConnectionPoints read FConnectionPoints
  300.       implements IConnectionPointContainer;
  301.     procedure EventSinkChanged(const EventSink: IUnknown); override;|
  302.  
  303. procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
  304. begin
  305.   FEvents := EventSink as %0:s;
  306.   if FConnectionPoint <> nil then
  307.      FSinkList := FConnectionPoint.SinkList;
  308. end;
  309.  
  310. procedure T%1:s.Initialize;
  311. begin
  312.   inherited Initialize;
  313.   FConnectionPoints := TConnectionPoints.Create(Self);
  314.   if AutoFactory.EventTypeInfo <> nil then
  315.     FConnectionPoint := FConnectionPoints.CreateConnectionPoint(
  316.       AutoFactory.EventIID, ckSingle, EventConnect)
  317.   else FConnectionPoint := nil;
  318. end;
  319. |unit %0:s;
  320.  
  321. interface
  322.  
  323. uses
  324.   ComObj, ActiveX, AspTlb, %3:s;
  325.  
  326. type
  327.   T%1:s = class(%6:s, %5:s)
  328.   end;
  329.  
  330. implementation
  331.  
  332. uses ComServ;
  333.  
  334. initialization
  335.   TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s,
  336.     %2:s, %4:s);
  337. end.
  338. ||
  339.