ServiceController::Start Method (array<String^>^)

 

Starts a service, passing the specified arguments.

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

public:
void Start(
	array<String^>^ args
)

Parameters

args
Type: array<System::String^>^

An array of arguments to pass to the service when it starts.

Exception Condition
Win32Exception

An error occurred when accessing a system API.

InvalidOperationException

The service cannot be started.

ArgumentNullException

args is null.

-or-

A member of the array is null.

You cannot call Stop for the service until the service controller status is Running.

ServiceControllerPermission

for controlling services on the computer. Associated enumeration: ServiceControllerPermissionAccess::Control

SecurityPermission

for unrestricted access to service information. Associated enumeration: PermissionState::Unrestricted

.NET Framework
Available since 1.1
Return to top
Show: