Click or drag to resize
Xcalibur Systems LLC Logo

ServiceHelperControlService Method

Sends a control code to a service.

ControlService function


Namespace: Xcalibur.NativeMethods.V2.Services
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("advapi32.dll", SetLastError = true)]
public static bool ControlService(
	IntPtr serviceHandle,
	ServiceCommands command,
	out ServiceStatusProcess status
)

Parameters

serviceHandle  IntPtr
A handle to the service.
command  ServiceCommands
The control code.
status  ServiceStatusProcess
A pointer to a structure that receives the latest service status information. The information returned reflects the most recent status that the service reported to the service control manager.

Return Value

Boolean
If the function fails, the return value is zero. To get extended error information, call .
See Also