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

# IUnknown\_QueryService(3w)

## NAME

**IUnknown\_QueryService** (SHLWAPI.176)

## SYNOPSIS

HRESULT IUnknown\_QueryService\
  (\
   IUnknown\* *lpUnknown*,\
   REFGUID   *sid*,\
   REFIID    *riid*,\
   LPVOID\*   *lppOut*\
  )

## DESCRIPTION

Retrieve a Service Interface from an object.

## PARAMS

*lpUnknown* **\[In\]**  Object to get an **IServiceProvider** interface from.

*sid* **\[In\]**  Service Id for **IServiceProvider\_QueryService(3w)** call.

*riid* **\[In\]**  Function requested for QueryService call.

*lppOut* **\[Out\]**  Destination for the service interface pointer.

## RETURNS

**Success:** **S\_OK**. *lppOut* contains an object providing the requested service

**Failure:** An **HRESULT** error code.

## NOTES

*lpUnknown* is expected to support the **IServiceProvider** interface.

## IMPLEMENTATION

Declared in **"shlwapi.h"**.

Implemented in **"dlls/shlwapi/ordinal.c"**.

Debug channel **"shell"**.
