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

# IUnknown\_QueryServiceExec(3w)

## NAME

**IUnknown\_QueryServiceExec** (SHLWAPI.484)

## SYNOPSIS

HRESULT IUnknown\_QueryServiceExec\
  (\
   IUnknown\*   *lpUnknown*,\
   REFIID      *service*,\
   const GUID\* *group*,\
   DWORD       *cmdId*,\
   DWORD       *cmdOpt*,\
   VARIANT\*    *pIn*,\
   VARIANT\*    *pOut*\
  )

## DESCRIPTION

Calls IOleCommandTarget::Exec() for specified *service* object.

## PARAMS

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

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

*group* **\[In\]**  Group Id for IOleCommandTarget::Exec() call.

*cmdId* **\[In\]**  Command Id for IOleCommandTarget::Exec() call.

*cmdOpt* **\[In\]**  Options flags for command.

*pIn* **\[In\]**  Input arguments for command.

*pOut* **\[Out\]**  Output arguments for command.

## 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

Exported by ordinal only. Use **[GetProcAddress(3w)](/GetProcAddress/3w.md)** to obtain a pointer to the function.

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

Debug channel **"shell"**.
