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 following tables list the members exposed by the ServiceController type.

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

(see also Protected Properties )
  Name Description
Public property CanPauseAndContinue Gets a value indicating whether the service can be paused and resumed.
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.
Public property DisplayName Gets or sets a friendly name for the service.
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

  Name Description
Protected property CanRaiseEvents  Gets a value indicating whether the component can raise an event.(inherited from Component)
Protected property DesignMode  Gets a value that indicates whether the Component is currently in design mode.(inherited from Component)
Protected property Events  Gets the list of event handlers that are attached to this Component.(inherited from Component)
Top

(see also Protected Methods )
  Name Description
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  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method ExecuteCommand Executes a custom command on the service.
Public method Static 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)
Public method Static 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)
Public method Pause Suspends a service's operation.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
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

  Name Description
Protected method Dispose Overloaded. Overridden.  
Protected method Finalize  Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (inherited from Component)
Protected method GetService  Returns an object that represents a service provided by the Component or by its Container. (inherited from Component)
Protected method MemberwiseClone  Overloaded. (inherited from MarshalByRefObject)
Top

  Name Description
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