TechNet
Export (0) Print
Expand All

ServiceController.ServiceHandle Property

 

Gets the handle for the service.

Namespace:   System.ServiceProcess
Assembly:  System.ServiceProcess (in System.ServiceProcess.dll)

[BrowsableAttribute(false)]
public SafeHandle ServiceHandle { get; }

Property Value

Type: System.Runtime.InteropServices.SafeHandle

A SafeHandle that contains the handle for the service.

Exception Condition
InvalidOperationException

The service was not found.

SecurityPermission

for access to unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft