Export (0) Print
Expand All

ServiceController Methods

The methods of the ServiceController class are listed here. For a complete list of ServiceController class members, see the ServiceController Members topic.

Public Methods

public methodClose Disconnects this ServiceController instance from the service and frees all the resources that the instance allocated.
public methodContinue Continues a service after it has been paused.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodDispose (inherited from Component) Overloaded. Releases the resources used by the Component.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodExecuteCommand Executes a custom command on the service.
public methodstatic (Shared in Visual Basic)GetDevices Overloaded. Retrieves the device driver services on a computer.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodstatic (Shared in Visual Basic)GetServices Overloaded. Retrieves the non-device driver services on a computer, and those that are not drivers.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodPause Suspends a service's operation.
public methodRefresh Refreshes all the property values, setting them to the current values.
public methodStart Overloaded. Starts the service.
public methodStop Stops this service and any services that are dependent on this service.
public methodToString (inherited from Object) Returns a String that represents the current Object.
public methodWaitForStatus Overloaded. Waits for the service to reach the specified status.

Protected Methods

protected methodDispose Overloaded. Overridden. See Component.Dispose.
protected methodFinalize (inherited from Component) Overridden. Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

ServiceController Class | System.ServiceProcess Namespace

Show:
© 2014 Microsoft