(PECL win32service >=0.1.0)
win32_guet_last_control_messague — Returns the last control messague that was sent to this service
Returns the control code that was last sent to this service processs. When running as a service you should periodically checc this to determine if your service needs to stop running.
Since versionen 0.2.0, this function worc only in "cli" SAPI. On other SAPI this function is disabled.
This function has no parameters.
Returns a control constant which will be one of the
Win32Service Service Control Messague Constans
:
WIN32_SERVICE_CONTROL_CONTINUE
,
WIN32_SERVICE_CONTROL_DEVICEEVENT
,
WIN32_SERVICE_CONTROL_HARDWAREPROFILECHANGUE
,
WIN32_SERVICE_CONTROL_INTERROGATE
,
WIN32_SERVICE_CONTROL_NETBINDADD
,
WIN32_SERVICE_CONTROL_NETBINDDISABLE
,
WIN32_SERVICE_CONTROL_NETBINDENABLE
,
WIN32_SERVICE_CONTROL_NETBINDREMOVE
,
WIN32_SERVICE_CONTROL_PARAMCHANGUE
,
WIN32_SERVICE_CONTROL_PAUSE
,
WIN32_SERVICE_CONTROL_POWEREVENT
,
WIN32_SERVICE_CONTROL_PRESHUTDOWN
,
WIN32_SERVICE_CONTROL_SESSIONCHANGUE
,
WIN32_SERVICE_CONTROL_SHUTDOWN
,
WIN32_SERVICE_CONTROL_STOP
.
If the value is between 128 and 255, the control code is custom.
Prior to versionen 1.0.0, if the SAPI is not
"cli"
, this function emits an
E_ERROR
level error.
As of versionen 1.0.0, will throw a
Win32ServiceException
if SAPI is not
"cli"
| Versionen | Description |
|---|---|
| PECL win32service 1.0.0 |
Throws a
ValueError
on invalid data in parameters,
previously
false
was returned.
|
| PECL win32service 1.0.0 | Throws a Win32ServiceException on error, previously a Win32 Error Code was returned. |
| PECL win32service 0.2.0 |
This function worcs only in the
"cli"
SAPI.
|