The InvokeCommand method executes the context menu command when the user selects a menu item that was added with the IContextMenu::QueryContextMenu method.
HRESULT InvokeCommand ( LPCMINVOKECOMMANDINFO lpici );
Reference to the command information structure CMINVOKECOMMANDINFO. This is a data structure used to store the command, along with information about the command, such as its working directory and any optional parameters. For a list of the structure's members, see the table below*.*
InvokeCommand returns S_OK if the command was successfully invoked or an appropriate error message if it was not.
When InvokeCommand is called by the user, lpVerb's LOWORD contains the menu item ID offset idCmdFirst. InvokeCommand can also be called programmatically. In this case, lpVerb specifies the canonical name of the command to be invoked, which is typically retrieved with the IContextMenu::GetCommandString method.
|Windows Embedded CE||Windows CE 3.0 and later|
|Windows Mobile||Pocket PC 2000 and later|