Click or drag to resize

DiagnosticsInformationGetServiceState Method

Retrieves the current status of the specified service.

Namespace:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.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