Export (0) Print
Expand All

ServiceController Members

Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it.

The ServiceController type exposes the following members.

  NameDescription
Public method ServiceController Overloaded. Initializes a new instance of the ServiceController class.
Top

  NameDescription
Public method Close Disconnects this ServiceController instance from the service and frees all the resources that the instance allocated.
Public method Continue Continues a service after it has been paused.
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose Overloaded.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method ExecuteCommand Executes a custom command on the service.
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method Static member GetDevices Overloaded. Retrieves the device driver services on a computer.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method Static member GetServices Overloaded. Retrieves the non-device driver services on a computer, and those that are not drivers.
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method MemberwiseClone Overloaded.
Public method Pause Suspends a service's operation.
Public method Refresh Refreshes property values by resetting the properties to their current values.
Public method Start Overloaded. Starts the service.
Public method Stop Stops this service and any services that are dependent on this service.
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public method WaitForStatus Overloaded. Waits for the service to reach the specified status.
Top

  NameDescription
Public property CanPauseAndContinue Gets a value indicating whether the service can be paused and resumed.
Protected property CanRaiseEvents Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Public property CanShutdown Gets a value indicating whether the service should be notified when the system is shutting down.
Public property CanStop Gets a value indicating whether the service can be stopped after it has started.
Public property Container Gets the IContainer that contains the Component. (Inherited from Component.)
Public property DependentServices Gets the set of services that depends on the service associated with this ServiceController instance.
Protected property DesignMode Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public property DisplayName Gets or sets a friendly name for the service.
Protected property Events Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public property MachineName Gets or sets the name of the computer on which this service resides.
Public property ServiceHandle Gets the handle for the service.
Public property ServiceName Gets or sets the name that identifies the service that this instance references.
Public property ServicesDependedOn The set of services that this service depends on.
Public property ServiceType Gets the type of service that this object references.
Public property Site Gets or sets the ISite of the Component. (Inherited from Component.)
Public property Status Gets the status of the service that is referenced by this instance.
Top

  NameDescription
Public event Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Top

Community Additions

ADD
Show:
© 2014 Microsoft