* contrib/hbwin/hbwin.ch
+ WIN_SERVICE_CONTROL_SHUTDOWN define added
* contrib/hbwin/win_svc_1.c
+ implemented capability to have custom service control handler. win_serviceStart()
optional parameter added:
win_serviceStart( cName, bEntryFunc | sEntryFunc [, bControlFunc | sControlFunc ] )
The minimal control function implementation is:
PROC SvcControl(nControl)
IF nControl == WIN_SERVICE_CONTROL_STOP .OR. ;
nControl == WIN_SERVICE_CONTROL_SHUTDOWN
win_serviceSetStatus(WIN_SERVICE_STOP_PENDING)
ENDIF
RETURN
If control function parameter is passed, service state will not be set
to running by default. This allows to abort service on startup.
If service is started, service main function should set running status
by calling win_serviceSetStatus(WIN_SERVICE_RUNNING)