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

# QueryServiceStatusEx(3w)

## NAME

**QueryServiceStatusEx** (ADVAPI32.@)

## SYNOPSIS

BOOL QueryServiceStatusEx\
  (\
   SC\_HANDLE      *hService*,\
   SC\_STATUS\_TYPE *InfoLevel*,\
   LPBYTE         *lpBuffer*,\
   DWORD          *cbBufSize*,\
   LPDWORD        *pcbBytesNeeded*\
  )

## DESCRIPTION

Get information about a service.

## PARAMS

*hService* **\[In\]**  Handle to service to get information about.

*InfoLevel* **\[In\]**  Level of information to get.

*lpBuffer* **\[Out\]**  Destination for requested information.

*cbBufSize* **\[In\]**  Size of *lpBuffer* in bytes.

*pcbBytesNeeded* **\[Out\]**  Destination for number of bytes needed, if *cbBufSize* is too small.

## RETURNS

**Success:** **TRUE**

**FAILURE:** **FALSE**

## IMPLEMENTATION

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

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

Debug channel **"service"**.
