SvCom for Delphi 4 - DCOM server in Windows NT service

Please read the topics below carefully before using SvCom beta.

How to install SvCom
How to create a service application that can work as a DCOM server
How to create a service that can be used as a base for the DCOM server
How to create automation object that works in a service
How to create remote data module that works in service

Installation
Unzip all files from svcom.zip file. From the Delphi IDE go to the Component|Install packages dialog. Press the upper Add button and browse for the dclSvCom4.bpl file. It is a design-time package that contains all SvCom experts. Select this file and double click it or press the Open key. Add the path to the .dcu files extracted from the svcom.zip to the library search path. Installation is completed.

How to create a service application
From the Delphi IDE got to the File|New dialog box. Select the "New" page of this dialog and click the "Service Application" twice or select this icon and press "OK" button. The new project will be created with one new service in it. This service can not be used for storing the com objects created by SvCom. Instead the TComService should be used for this purpose. So if you are not going to use this automatically created service then delete it. It can be done by closing the service unit without saving or by explicit using of Project|Remove from project menu.

How to create a service that can be used as a base for the DCOM server
From the Delphi IDE got to the File|New dialog box go to the "DCOM in service" page. Select the "Com Server in Service" icon. Double click it or press the OK button. The descendant of the TComService module will be added to your project. It is possible to add several ComServices to the one project. They will work as independent DCOM servers. They can be started, stopped and configured independently.

How to create automation object that works in a service
From the Delphi IDE got to the File|New dialog box go to the "DCOM in service" page. Select the "Automation Object in Service" icon. Double click it or press the OK button. The dialog box appears. Enter the class name you wish and the name of service that will hold this com-object. It should be the name of one of the TComServer descendants from your project. This name will be used as a parameter of the classfactory constructor. Do not forget to change it if you are going to rename the service. The unit with source code of the TAutomationObject descendant will be added to your project. The last step is the interface creation.

How to create remote data module that works in service
From the Delphi IDE got to the File|New dialog box go to the "DCOM in service" page. Select the "Remote Data Module in Service" icon. Double click it or press the OK button. The dialog box appears. Enter the class name you wishand the name of service that will hold this com-object. It should be the name of one of the TComServer descendants from your project. This name will be used as a parameter of the classfactory constructor. Do not forget to change it if you are going to rename the service. The unit with source code of the TRemoteDataModule descendant will be added to your project. Go to the Project|Option dialog. Select the "Forms" page of this dialog and remove newly created datamodule from the list of automatically created forms. The last step is the interface creation.

Interface and coclass creation
In this beta version the typelibrary creation is not automated. So if you project has not a typelibrary then add it now. The interface and coclass creation is not automated too. Go to the typelibrary editor using the View|Type library menu. Add a new interface and a new coclass to it. Set the interface name to IXXX value were XXX is a name of class you have entered in wizard dialog. Set to coclass name to XXX. Go to the project source and add a {XXX: CoClass} to the unit with the object created. It should look like this

uses
...
Unit1 in 'Unit1.pas' {XXX: CoClass},
...

Thank you for using SvCom.

Feel free to contact with author.

SvCom homepage: http://www.chat.ru/~aldyn/svcom_frame.html

Copyright (c) 1998 Alexey A. Dynnikov
homepage: http://www.chat.ru/~aldyn/
e-mail: aldyn@chat.ru