Stores infomation about the the current status of the specified service into an array.

AServiceStatus(cArrayName, cServiceName | nServiceHandle [, cServer [, cDatabase]])

Parameters

cArrayName

On return the array contains the following information from the SERVICE_STATUS structure.

ElementContent
1CheckPoint
2ControlsAccepted
3Currentstate
4ServiceSpecificExitCode
5Servicetype
6WaitHint
7Win32ExitCode
cServiceName | nServiceHandle

Either the name of the service or a numeric handle returned from the OpenService function.

cServer (optional)

The server name on which the service is running.
See MSDN help for OpenSCManager.

cDatabase (optional)

The database under which the service is registered.
See MSDN help for OpenSCManager.

Return Value

Always .T.

See Also

Reference

ADependentServices
AServiceConfig
AServices
CloseServiceHandle
ContinueService
ControlService
CreateService
OpenService
PauseService
StartService
StopService
WaitForServiceStatus

Used WinApi functions

QueryServiceStatus
OpenSCManager
OpenService
CloseServiceHandle