ServiceController.ServiceHandle Property
.NET Framework (current version)
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
Gets the handle for the service.
Assembly: System.ServiceProcess (in System.ServiceProcess.dll)
Property Value
Type: System.Runtime.InteropServices.SafeHandleA 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
Available since 2.0
Show: