SPWindowsServiceInstance Class
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
To return a specific Windows service, use the SPWindowsServiceInstance constructor.
Use the inherited Instances property of the SPWindowsService class to return an SPServiceInstanceDependencyCollection object that represents all instances of the Windows service. Use the SPWindowsServiceInstanceCollection constructor to return the collection of Windows service instances that are currently running on a specific server.
Use an indexer to return a single Windows service instance from the collection. For example, if the collection is assigned to a variable named myWindowsServiceInstances, use myWindowsServiceInstances[index] in C#, or myWindowsServiceInstances(index) in Visual Basic, where index is either the name or the GUID that identifies the Windows service instance.
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.SPPersistedObject
Microsoft.SharePoint.Administration.SPPersistedUpgradableObject
Microsoft.SharePoint.Administration.SPServiceInstance
Microsoft.SharePoint.Administration.SPWindowsServiceInstance
Microsoft.SharePoint.Administration.SPLoadBalancerServiceInstance
Microsoft.SharePoint.Administration.SPTimerServiceInstance
Microsoft.SharePoint.Search.Administration.SPSearchServiceInstance