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

# SHWeakQueryInterface(3w)

## NAME

**SHWeakQueryInterface** (SHLWAPI.267)

## SYNOPSIS

HRESULT SHWeakQueryInterface\
  (\
   IUnknown\* *pUnk*,\
   IUnknown\* *pInner*,\
   IID\*      *riid*,\
   LPVOID\*   *ppv*\
  )

## PARAMS

*pUnk* **\[In\]**  Outer object.

*pInner* **\[In\]**  Inner object.

*riid* **\[In\]**  Interface **GUID** to query for.

*ppv* **\[Out\]**  Destination for queried interface.

## DESCRIPTION

Get an interface from an object.

## RETURNS

**Success:** **S\_OK**. *ppv* contains the requested interface.

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

## NOTES

This QueryInterface asks the inner object for an interface. In case of aggregation this request would be forwarded by the inner to the outer object. This function asks the inner object directly for the interface circumventing the forwarding to the outer object.

## 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"**.
