|
ServiceHelperControlService Method |
Namespace: Xcalibur.NativeMethods.V2.ServicesAssembly: 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
)
<DllImportAttribute("advapi32.dll", SetLastError := true>]
Public Shared Function ControlService (
serviceHandle As IntPtr,
command As ServiceCommands,
<OutAttribute> ByRef status As ServiceStatusProcess
) As Boolean
public:
[DllImportAttribute(L"advapi32.dll", SetLastError = true)]
static bool ControlService(
IntPtr serviceHandle,
ServiceCommands command,
[OutAttribute] ServiceStatusProcess% status
)
[<DllImportAttribute("advapi32.dll", SetLastError = true)>]
static member ControlService :
serviceHandle : IntPtr *
command : ServiceCommands *
status : ServiceStatusProcess byref -> bool
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
BooleanIf the function fails, the return value is zero. To get extended error
information, call .
See Also