#1 2015-04-28 09:51:22

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

TService.GetControlHandler annoyance

TService.GetControlHandler raises an exception when fControlHandler is nil, however this exception kills the service immediately, and cannot be trapped in a try/except or try/finally (I am not sure why exactly), so the exception message is never visible.

Took some time to poinpoint it with manual logs in the source smile

The solution can be to check the ControlHandler assignment in ServicesRun, before calling StartServiceCtrlDispatcher, as exception can be properly trapped at that point, maybe by wrapping the check in a "ValidateService" method.

Offline

#2 2015-04-28 13:43:53

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: TService.GetControlHandler annoyance

Should be fixed by http://synopse.info/fossil/info/681a7ff237

Thanks for the feedback!

Offline

#3 2015-04-29 07:38:01

Eric
Member
Registered: 2012-11-26
Posts: 129
Website

Re: TService.GetControlHandler annoyance

Thanks!

While you're at it, could you integrate service description support?

It's the ChangeServiceConfig2 stuff in my dwsWindowsService, it's just an import, a field & a call, but it makes a service look more "normal" in the service manager.

The function is supported since XP & Windows 2003, so there is probably no need to bother with an OS version check.

Offline

Board footer

Powered by FluxBB