ServiceController::ServiceHandle Property
.NET Framework (current version)
Gets the handle for the service.
Assembly: System.ServiceProcess (in System.ServiceProcess.dll)
public: [BrowsableAttribute(false)] property SafeHandle^ ServiceHandle { SafeHandle^ 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.
.NET Framework
Available since 2.0
Available since 2.0
Show: