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()

ppszVerbs

A string array of verbs to invoke on the context menu. Can be NULL.

numVerbs

Number of elements in the ppwszVerbs array. Cannot be more than 1

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

If any of pwszDirectory, ppszVerbs, or *ppszVerbs have a value, CMIC_MASK_UNICODE is forced on to the fMask parameter. If neither have a value, fMask is ignored.

If either ppszVerbs or *ppszVerbs are NULL, CMF_DEFAULTONLY is forced on to the queryFlags parameter. If both are not NULL, but the function fails to allocate memory for a copy of *ppszVerbs, CMF_OPTIMIZEFORINVOKE is forced on.