ServiceController.ServiceHandle Property

 

Gets the handle for the service.

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

<BrowsableAttribute(False)>
Public ReadOnly Property ServiceHandle As SafeHandle

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.

.NET Framework
Available since 2.0
Return to top
Show: