Invokes a verb on a context menu
Syntax
HRESULT WINAPI SHInvokeCommandOnContextMenu (
HWND hwnd,
IObjectWithSite* pSite,
IContextMenu* pCtxMenu,
DWORD fMask,
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()
- 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 SHInvokeCommandOnContextMenuEx with its queryFlags parameter set to 0. 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 _SHInvokeCommandOnContextMenu@24.