|
win32_start_service_ctrl_dispatcherRegisters the script with the SCM, so that it can act as the service with the given name Description
void win32_start_service_ctrl_dispatcher(string
$name , bool $gracefulMode = true)When launched via the Service Control Manager, a service process is required to "check-in" with it to establish service monitoring and communication facilities. This function performs the check-in by spawning a thread to handle the lower-level communication with the service control manager.
Once started, the service process should do 2 things. The first is to tell
the Service Control Manager that the service is running. This is achieved
by calling win32_set_service_status with the
Caution
Since version 0.2.0, this function work only in "cli" SAPI. On other SAPI this function is disabled. Parameters
Return ValuesNo value is returned.
Prior to version 1.0.0, returned Errors/Exceptions
Prior to version 1.0.0, if the SAPI is not
As of version 1.0.0, will throw a
Win32ServiceException if SAPI is not
Changelog
Examples
Example #1 A win32_start_service_ctrl_dispatcher example Check if the service is runnig under the SCM.
See Also
|