This documentation is archived and is not being maintained.

ServiceBase.ServiceHandle Property

Note: This property is new in the .NET Framework version 2.0.

Gets the service control handle for the service.

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

protected IntPtr ServiceHandle { get; }
/** @property */
protected IntPtr get_ServiceHandle ()

protected function get ServiceHandle () : IntPtr

Property Value

An IntPtr structure that contains the service control handle for the service.

The service control handle is used to communicate with the Service Control Manager (SCM). The handle can be used to update the service control manager's status information for the calling service using the unmanaged SetServiceStatus function.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: