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.
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #1 from Jan Slezak jan.slezak@centrum.cz 2009-11-08 15:04:56 --- Created an attachment (id=24601) --> (http://bugs.winehq.org/attachment.cgi?id=24601) Test service written in Delphi 6
http://bugs.winehq.org/show_bug.cgi?id=20630
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, testcase
--- Comment #2 from Austin English austinenglish@gmail.com 2009-11-08 15:55:16 --- Please send patches to wine-patches@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #3 from Jan Slezak jan.slezak@centrum.cz 2009-11-09 03:26:34 --- Sent...
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #4 from Austin English austinenglish@gmail.com 2012-04-03 15:27:47 CDT --- austin@aw25 ~/TestService $ wine net start fixme:service:EnumServicesStatusExW resume handle not supported The following services are running: Mount Manager Plug and Play Service austin@aw25 ~/TestService $ wine TestService.exe err:service:service_control_dispatcher failed to create control pipe error = 676 austin@aw25 ~/TestService $ wine net start service Could not get handle to service. austin@aw25 ~/TestService $ wine net start fixme:service:EnumServicesStatusExW resume handle not supported The following services are running: Mount Manager Plug and Play Service
http://bugs.winehq.org/show_bug.cgi?id=20630
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #5 from Anastasius Focht focht@gmx.net 2012-04-03 15:58:15 CDT --- @austin
You have to register the service first in newly created WINEPREFIX, e.g.:
--- snip --- $ wine TestService.exe /install --- snip ---
For starting and stopping you need to use the service name, e.g.:
--- snip --- $ wine net start delphitestservice
$ wine net stop delphitestservice --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #6 from Austin English austinenglish@gmail.com 2012-04-03 18:15:49 CDT --- (In reply to comment #5)
@austin
You have to register the service first in newly created WINEPREFIX, e.g.:
--- snip --- $ wine TestService.exe /install --- snip ---
For starting and stopping you need to use the service name, e.g.:
--- snip --- $ wine net start delphitestservice
$ wine net stop delphitestservice --- snip ---
Regards
austin@aw25 ~/TestService $ wine TestService.exe /install fixme:service:svcctl_CreateServiceW Don't know how to add a password austin@aw25 ~/TestService $ wine net start fixme:service:EnumServicesStatusExW resume handle not supported The following services are running: Test Delphi service Mount Manager Plug and Play Service austin@aw25 ~/TestService $ wine net stop delphitestservice The Test Delphi service service is stopping. fixme:service:EnumDependentServicesW 0x11f818 0x00000001 (nil) 0x00000000 0x33dd54 0x33dd50 - stub The Test Delphi service service was stopped successfully. austin@aw25 ~/TestService $ wine net start delphitestservice The Test Delphi service service is starting. Service request timeout. austin@aw25 ~/TestService $ wine net stop delphitestservice The Test Delphi service service is stopping. fixme:service:EnumDependentServicesW 0x11f818 0x00000001 (nil) 0x00000000 0x33dd54 0x33dd50 - stub The Test Delphi service service was stopped successfully.
austin@aw25 ~/TestService $ rm -rf ~/.wine austin@aw25 ~/TestService $ /opt/oldwine/wine-1.3.1/bin/wine TestService.exe /install wine: created the configuration directory '/home/austin/.wine' Could not load wine-gecko. HTML rendering will be disabled. wine: configuration in '/home/austin/.wine' has been updated. fixme:service:svcctl_CreateServiceW Don't know how to add a password fixme:service:svcctl_CreateServiceW Dependencies not supported yet austin@aw25 ~/TestService $ /opt/oldwine/wine-1.3.1/bin/wine net start delphitestservice The Test Delphi service service is starting. Service already running
appears to have been fixed for a while. Or am I missing something?
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #7 from Jan Slezak jan.slezak@centrum.cz 2012-04-04 12:08:06 CDT --- Well, I can't confirm if it is fixed or not, I am not using Wine for a while now. But in Austin's list I see:
austin@aw25 ~/TestService $ wine net start delphitestservice The Test Delphi service service is starting. Service request timeout.
And the "Service request timeout." means for me: it is not fixed.
To make a real decision I would need to know if the TestService.exe process (not service) is really running in this point. But I don't know how to list running processes in Wine.
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #8 from Jan Slezak jan.slezak@centrum.cz 2012-04-04 12:48:13 CDT --- Linux "ps ax" should be sufficient.
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #9 from Jan Slezak jan.slezak@centrum.cz 2012-04-04 13:00:05 CDT --- To decide:
1) Make sure no Wine component is running.
2) Start winefile.exe:
wine winefile.exe &
3) Make sure TestService.exe is not running (by ps command). If not go to 6)
4) If TestService.exe is running uninstall it:
wine TestService.exe /uninstall
You need to confirm confirmation dialog on Wine desktop.
5) Stop winefile.exe, go to 1)
6) Install TestService.exe:
wine TestService.exe /install
You need to confirm confirmation dialog on Wine desktop.
7) TestService.exe should NOT be running now. Make sure by ps command. If it is running, there is another bug in Wine.
8) Start delphitestservice service by:
wine net start delphistartservice
This response should follows:
The Test Delphi service service is starting. The Test Delphi service service was started successfully.
9) Make sure TestService.exe is running by ps command.
If the TestService.exe is running, the bug is fixed, otherwise it is not fixed.
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #10 from Austin English austinenglish@gmail.com 2012-04-04 19:33:51 CDT --- Created attachment 39685 --> http://bugs.winehq.org/attachment.cgi?id=39685 steps taken
Thanks for the info.
Not fixed yet.
http://bugs.winehq.org/show_bug.cgi?id=20630
--- Comment #11 from Jan Slezak jan.slezak@centrum.cz 2012-04-05 10:52:12 CDT --- I made a typing error in my Comment 9. And therefore the result in attachment 39685 is not valid. Sorry for that.
The command at point 8 should be:
wine net start delphitestservice
The response "Could not get handle to service." in your attachment inform you that the required service (delphistartservice) doesn't exist at all, i.e. it is not installed. And this is O.K., you installed another service - delphitestservice.
Please, try it again...
https://bugs.winehq.org/show_bug.cgi?id=20630
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #12 from Anastasius Focht focht@gmx.net --- Hello folks,
resolving 'fixed' since I don't see a problem here (PICNIC).
Regards
https://bugs.winehq.org/show_bug.cgi?id=20630
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.20.
http://bugs.winehq.org/show_bug.cgi?id=20630
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com