---
name: "ControlService"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/ControlService"
---

# ControlService(3w)

## NAME

**ControlService** (ADVAPI32.@)

## SYNOPSIS

BOOL ControlService\
  (\
   SC\_HANDLE        *hService*,\
   DWORD            *dwControl*,\
   LPSERVICE\_STATUS *lpServiceStatus*\
  )

## DESCRIPTION

Send a control code to a service.

## PARAMS

*hService* **\[In\]**  Handle of the service control manager database.

*dwControl* **\[In\]**  Control code to send (**SERVICE\_CONTROL\_**\* flags from **"winsvc.h"**).

*lpServiceStatus* **\[Out\]**  Destination for the status of the service, if available.

## RETURNS

**Success:** **TRUE**.

**Failure:** **FALSE**.

## BUGS

Unlike M$' implementation, control requests are not serialized and may be processed asynchronously.

## IMPLEMENTATION

Declared in **"winsvc.h"**.

Implemented in **"dlls/advapi32/service.c"**.

Debug channel **"service"**.
