ServiceControllerPermissionEntry Constructor (ServiceControllerPermissionAccess, String, String)

 

Initializes a new instance of the ServiceControllerPermissionEntry class with the specified permission access levels, the name of the computer, and a short name that identifies the service.

Namespace:   System.ServiceProcess
Assembly:  System.ServiceProcess (in System.ServiceProcess.dll)

public ServiceControllerPermissionEntry(
	ServiceControllerPermissionAccess permissionAccess,
	string machineName,
	string serviceName
)

Parameters

permissionAccess
Type: System.ServiceProcess.ServiceControllerPermissionAccess

One of the ServiceControllerPermissionAccess values.

machineName
Type: System.String

The name of the computer on which the service resides.

serviceName
Type: System.String

The short name that identifies the service to the system.

Exception Condition
ArgumentNullException

serviceName is null.

ArgumentException

machineName is not valid.

-or-

serviceName is not valid.

.NET Framework
Available since 1.1
Return to top
Show: