http://bugs.winehq.org/show_bug.cgi?id=20630
Summary: Services written in Delphi 6: impossible to start by "net start" command Product: Wine Version: 1.1.32 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs@winehq.org ReportedBy: jan.slezak@centrum.cz
Created an attachment (id=24600) --> (http://bugs.winehq.org/attachment.cgi?id=24600) Patch to allow "net start service" for services written in Delphi 6
Any service written in Delphi 6 (maybe in higher versions too) cannot be started by "net start" command. Surprisingly it starts during wine boot (if set to SERVICE_AUTO_START).
output from "net start": The Test Delphi service service is starting. Service request timeout
Test service is attached including source code. Install test service by "TestService.exe /install" command. Remove test service from system by "TestService.exe /uninstall" command.
I track down the problem to programs/services directory, where autostarted services are started with service names in first service argument (services.c, scmdatabase_autostart_services), but services started by StartService WinAPI function (thereby "net start" command) without special arguments are started without any argument. Services made by Delphi always assume service name in the first argument.
Because Microsoft documentation allows no service arguments in StartService function, but if there are arguments, first of them must be service name, I suggest modification of StartService WinAPI emulation code in programs/services/rpc.c as shown in attached patch.