home *** CD-ROM | disk | FTP | other *** search
- unit %0:s;
-
- interface
-
- uses
- ComObj, ActiveX, %3:s;
-
- type
- T%1:s = class(TAutoObject, %5:s)
- %6:s
- end;
-
- implementation
-
- uses ComServ;%7:s
-
- initialization
- TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s,
- %2:s, %4:s);
- end.
- |unit %0:s;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, ComServ, ComObj, VCLCom, DataBkr,
- DBClient, %3:s;
-
- type
- T%1:s = class(TRemoteDataModule, I%1:s)
- private
- { Private declarations }
- protected
- class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
- public
- { Public declarations }
- end;
-
- implementation
-
- {$R *.DFM}
-
- class procedure T%1:s.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);
- begin
- if Register then
- begin
- inherited UpdateRegistry(Register, ClassID, ProgID);
- EnableSocketTransport(ClassID);
- EnableWebTransport(ClassID);
- end else
- begin
- DisableSocketTransport(ClassID);
- DisableWebTransport(ClassID);
- inherited UpdateRegistry(Register, ClassID, ProgID);
- end;
- end;
-
- initialization
- TComponentFactory.Create(ComServer, T%1:s,
- Class_%1:s, %2:s, %4:s);
- end.
- |library %s;
-
- uses
- ComServ;
-
- exports
- DllGetClassObject,
- DllCanUnloadNow,
- DllRegisterServer,
- DllUnregisterServer;
-
- {$R *.RES}
-
- begin
- end.
- |unit %0:s;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ActiveX, AxCtrls, %2:s;
-
- type
- T%1:s = class(TActiveForm)
- private
- { Private declarations }
- FEvents: I%1:sEvents;
- protected
- { Protected declarations }
- procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
- procedure EventSinkChanged(const EventSink: IUnknown); override;
- public
- { Public declarations }
- procedure Initialize; override;
- end;
-
- implementation
-
- uses ComObj, ComServ;
-
- {$R *.DFM}
-
- { T%1:s }
-
- procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
- begin
- { Define property pages here. Property pages are defined by calling
- DefinePropertyPage with the class id of the page. For example,
- DefinePropertyPage(Class_%1:sPage); }
- end;
-
- procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
- begin
- FEvents := EventSink as I%1:sEvents;
- end;
-
- procedure T%1:s.Initialize;
- begin
- inherited Initialize;
- end;
-
- initialization
- TActiveFormFactory.Create(
- ComServer,
- TActiveFormControl,
- T%1:s,
- Class_%1:s,
- %3:d,
- '%4:s',
- OLEMISC_SIMPLEFRAME or OLEMISC_ACTSLIKELABEL,
- %5:s);
- end.
- |unit %0:s;
-
- interface
-
- uses
- Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
- ComServ, StdVCL, AXCtrls, %3:s;
-
- type
- T%1:s = class(TActiveXControl)
- private
- { Private declarations }
- FDelphiControl: %2:s;
- FEvents: I%1:sEvents;
- protected
- { Protected declarations }
- procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
- procedure EventSinkChanged(const EventSink: IUnknown); override;
- procedure InitializeControl; override;
- end;
-
- implementation
-
- uses ComObj;
-
- { T%1:s }
-
- procedure T%1:s.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
- begin
- {TODO: Define property pages here. Property pages are defined by calling
- DefinePropertyPage with the class id of the page. For example,
- DefinePropertyPage(Class_%1:sPage); }
- end;
-
- procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
- begin
- FEvents := EventSink as I%1:sEvents;
- end;
-
- procedure T%1:s.InitializeControl;
- begin
- FDelphiControl := Control as %2:s;
- end;
-
- initialization
- TActiveXControlFactory.Create(
- ComServer,
- T%1:s,
- %2:s,
- Class_%1:s,
- %4:d,
- '%5:s',
- %6:s,
- %7:s);
- end.
- |unit %0:s;
-
- interface
-
- uses SysUtils, Windows, Messages, Classes, Graphics, Controls, StdCtrls,
- ExtCtrls, Forms, ComServ, ComObj, StdVcl, AxCtrls;
-
- type
- T%1:s = class(TPropertyPage)
- private
- { Private declarations }
- protected
- { Protected declarations }
- public
- { Public declarations }
- procedure UpdatePropertyPage; override;
- procedure UpdateObject; override;
- end;
-
- const
- Class_%1:s: TGUID = '%2:s';
-
- implementation
-
- {$R *.DFM}
-
- procedure T%1:s.UpdatePropertyPage;
- begin
- { Update your controls from OleObject }
- end;
-
- procedure T%1:s.UpdateObject;
- begin
- { Update OleObject from your controls }
- end;
-
- initialization
- TActiveXPropertyPageFactory.Create(
- ComServer,
- T%1:s,
- Class_%1:s);
- end.
- |
- TComponentFactory.Create(ComServer, T%s,
- Class_%s, ciMultiInstance);
- |unit %0:s;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls;
-
- type
- T%1:s = class(TForm)
- CtlImage: TSpeedButton;
- NameLbl: TLabel;
- OkBtn: TButton;
- CopyrightLbl: TLabel;
- DescLbl: TLabel;
- end;
-
- procedure Show%1:s;
-
- implementation
-
- {$R *.DFM}
-
- procedure Show%1:s;
- begin
- with T%1:s.Create(nil) do
- try
- ShowModal;
- finally
- Free;
- end;
- end;
-
- end.
- |unit %0:s;
-
- interface
-
- uses
- Windows, ActiveX, Classes, ComObj%1:s;
-
- type
- T%2:s = class(T%9:sComObject%3:s)
- protected%4:s
- end;
- %5:s
- implementation
-
- uses ComServ;
-
- initialization
- T%9:sComObjectFactory.Create(ComServer, T%2:s, Class_%2:s,
- %10:s%6:s%7:s, %8:s);
- end.
- |AxCtrls, Classes, |private
- { Private declarations }
- FConnectionPoints: TConnectionPoints;
- FConnectionPoint: TConnectionPoint;
- FSinkList: TList;
- FEvents: %s;
- public
- procedure Initialize; override;
- protected
- { Protected declarations }
- property ConnectionPoints: TConnectionPoints read FConnectionPoints
- implements IConnectionPointContainer;
- procedure EventSinkChanged(const EventSink: IUnknown); override;|
-
- procedure T%1:s.EventSinkChanged(const EventSink: IUnknown);
- begin
- FEvents := EventSink as %0:s;
- if FConnectionPoint <> nil then
- FSinkList := FConnectionPoint.SinkList;
- end;
-
- procedure T%1:s.Initialize;
- begin
- inherited Initialize;
- FConnectionPoints := TConnectionPoints.Create(Self);
- if AutoFactory.EventTypeInfo <> nil then
- FConnectionPoint := FConnectionPoints.CreateConnectionPoint(
- AutoFactory.EventIID, ckSingle, EventConnect)
- else FConnectionPoint := nil;
- end;
- |unit %0:s;
-
- interface
-
- uses
- ComObj, ActiveX, AspTlb, %3:s;
-
- type
- T%1:s = class(%6:s, %5:s)
- end;
-
- implementation
-
- uses ComServ;
-
- initialization
- TAutoObjectFactory.Create(ComServer, T%1:s, Class_%1:s,
- %2:s, %4:s);
- end.
- ||
-