.NET Framework Class Library
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.

Constructors

  NameDescription
Public methodServiceControllerOverloaded. Initializes a new instance of the ServiceController class.
Top
Methods

  NameDescription
Public methodCloseDisconnects this ServiceController instance from the service and frees all the resources that the instance allocated.
Public methodContinueContinues a service after it has been paused.
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodDisposeOverloaded.
Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodExecuteCommandExecutes a custom command on the service.
Protected methodFinalizeReleases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public methodStatic memberGetDevicesOverloaded. Retrieves the device driver services on a computer.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodGetServiceReturns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public methodStatic memberGetServicesOverloaded. Retrieves the non-device driver services on a computer, and those that are not drivers.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodMemberwiseCloneOverloaded.
Public methodPauseSuspends a service's operation.
Public methodRefreshRefreshes property values by resetting the properties to their current values.
Public methodStartOverloaded. Starts the service.
Public methodStopStops this service and any services that are dependent on this service.
Public methodToStringReturns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public methodWaitForStatusOverloaded. Waits for the service to reach the specified status.
Top
Properties

  NameDescription
Public propertyCanPauseAndContinueGets a value indicating whether the service can be paused and resumed.
Protected propertyCanRaiseEventsGets a value indicating whether the component can raise an event. (Inherited from Component.)
Public propertyCanShutdownGets a value indicating whether the service should be notified when the system is shutting down.
Public propertyCanStopGets a value indicating whether the service can be stopped after it has started.
Public propertyContainerGets the IContainer that contains the Component. (Inherited from Component.)
Public propertyDependentServicesGets the set of services that depends on the service associated with this ServiceController instance.
Protected propertyDesignModeGets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public propertyDisplayNameGets or sets a friendly name for the service.
Protected propertyEventsGets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public propertyMachineNameGets or sets the name of the computer on which this service resides.
Public propertyServiceHandleGets the handle for the service.
Public propertyServiceNameGets or sets the name that identifies the service that this instance references.
Public propertyServicesDependedOnThe set of services that this service depends on.
Public propertyServiceTypeGets the type of service that this object references.
Public propertySiteGets or sets the ISite of the Component. (Inherited from Component.)
Public propertyStatusGets the status of the service that is referenced by this instance.
Top
Events

  NameDescription
Public eventDisposedOccurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Top
See Also

Reference

Tags :


Page view tracker