Invokes a verb on a context menu
Syntax
HRESULT WINAPI SHInvokeCommandOnContextMenuEx (
HWND hwnd,
IObjectWithSite* pSite,
IContextMenu* pCtxMenu,
DWORD fMask,
UINT queryFlags,
LPCSTR pszVerb,
LPCWSTR pwszDirectory
)
Parameters
- hwnd
- The owner window for any UI
- pSite
- A site to host the context menu, can be NULL.
- pCtxMenu
- A context menu interface to manipulate
- fMask
- A collection of CMIC_ flags to pass onto the CMINVOKECOMANDINFO structure used with pCtxMenu->InvokeCommand()
- queryFlags
- A collection of CMF_ flags to pass as the uFlags parameter of pCtxMenu->QueryContextMenu()
- pszVerb
- A verbs to invoke on the context menu. Can be NULL.
- pwszDirectory
- A path to use as the lpDirectoryW member of the CMINVOKECOMMANDINFOEX structure passed to pCtxMenu->InvokeCommand(). Can be NULL.
Return Value
S_OK on success, standard COM error code on failure
Remarks
This function is identical to SHInvokeCommandsOnContextMenuEx with its numVerbs parameter set to 1. The same remarks for that function apply to this one even though this function does not call that one.
This function is also known as _SHInvokeCommandOnContextMenuEx@28.