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 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_STATEThe service state or null if the service doesn't exist or an error occurred.
Exceptions See Also