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

# SHInvokeCommand(3w)

## NAME

**SHInvokeCommand** (SHLWAPI.363)

## SYNOPSIS

HRESULT SHInvokeCommand\
  (\
   HWND          *hWnd*,\
   IShellFolder\* *lpFolder*,\
   LPCITEMIDLIST *lpApidl*,\
   BOOL          *bInvokeDefault*\
  )

## DESCRIPTION

Get and show a context menu from a shell folder.

## PARAMS

*hWnd* **\[In\]**  Window displaying the shell folder.

*lpFolder* **\[In\]**  **IShellFolder** interface.

*lpApidl* **\[In\]**  Id for the particular folder desired.

*bInvokeDefault* **\[In\]**  Whether to invoke the default menu item.

## RETURNS

**Success:** **S\_OK**. If *bInvokeDefault* is **TRUE**, the default menu action was executed.

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

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