Click or drag to resize

DiagnosticsInformationGetServiceState Method

Retrieves the current status of the specified service.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static SERVICE_STATE? GetServiceState(
	string name,
	bool throwOnError = true
)

Parameters

name
Type: SystemString
The name of the service to be opened. This not the service display name that is shown by user interface applications to identify the service.
throwOnError (Optional)
Type: SystemBoolean
if set to true errors may be throw.

Return Value

Type: NullableSERVICE_STATE
The service state or null if the service doesn't exist or an error occurred.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is null.
See Also