Stores all services that are dependent on the passed in service into an array.

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

Parameters

cArrayName

The name of the array as a string into which the function should store the information.

On return the array contains the following information from the ENUM_SERVICE_STATUS and SERVICE_STATUS structures.
ColumnDescription
1Servicename
2Displayname
3Servicetype
4Currentstate
5Win32ExitCode
6ServiceSpecificExitCode
7CheckPoint
8ControlsAccepted
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

The number of dependant services.

See Also

Reference

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

Used WinApi functions

EnumDependentServices
OpenSCManager
OpenService
CloseServiceHandle