{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Author: François PIETTE Description: Simple Midware server demo implémented as a Windows service. OverbyteSvcDemo1 is the wrapper for the service. Actual Midware application server code is in OverbyteMxDaemon. To install the service, use the command line with this: "OverbyteSvcDemo /INSTALL". The use control panel/services to setup services parameters. Don't forget to configure the firewall so that the service has access to the network and also set the file system permissions so that the service has access to the files it uses. Creation: Jan 30, 2011 Version: 1.00 EMail: http://www.overbyte.be francois.piette@overbyte.be Support: Use the mailing list midware@elists.org Follow "support" link at http://www.overbyte.be for subscription. Legal issues: Copyright (C) 2011 by François PIETTE Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software and or any derived or altered versions for any purpose, excluding commercial applications. You can use this software for personal use only. You may distribute it freely untouched. The following restrictions applies: 1. The origin of this software must not be misrepresented, you must not claim that you wrote the original software. 2. If you use this software in a product, an acknowledgment in the product documentation and displayed on screen is required. The text must be: "This product is based on MidWare. Freeware source code is available at http://www.overbyte.be." 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. This notice may not be removed or altered from any source distribution and must be added to the product documentation. Updates: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} program OverbyteSvcDemo; uses SvcMgr, OverbyteSvcDemo1 in 'OverbyteSvcDemo1.pas' {SvcDemo: TService}, OverbyteMwDaemon in 'OverbyteMwDaemon.pas', OverbyteSrvObj1 in 'OverbyteSrvObj1.pas'; {$R *.RES} begin // Windows 2003 Server requires StartServiceCtrlDispatcher to be // called before CoRegisterClassObject, which can be called indirectly // by Application.Initialize. TServiceApplication.DelayInitialize allows // Application.Initialize to be called from TService.Main (after // StartServiceCtrlDispatcher has been called). // // Delayed initialization of the Application object may affect // events which then occur prior to initialization, such as // TService.OnCreate. It is only recommended if the ServiceApplication // registers a class object with OLE and is intended for use with // Windows 2003 Server. // // Application.DelayInitialize := True; // if not Application.DelayInitialize or Application.Installing then Application.Initialize; Application.CreateForm(TSvcDemo, SvcDemo); Application.Run; end.