IExecuteCommand interface (shobjidl_core.h)

Exposes methods that set a given state or parameter related to the command verb, as well as a method to invoke that verb.

Inheritance

The IExecuteCommand interface inherits from the IUnknown interface. IExecuteCommand also has these types of members:

Methods

The IExecuteCommand interface has these methods.

 
IExecuteCommand::Execute

Invoke the verb on the selected items. Call this method after you have called the other methods of this interface.
IExecuteCommand::SetDirectory

Sets a new working directory.
IExecuteCommand::SetKeyState

Sets a value based on the current state of the keys CTRL and SHIFT.
IExecuteCommand::SetNoShowUI

Indicates whether any UI associated with the selected Shell item should be displayed.
IExecuteCommand::SetParameters

Provides parameter values for the verb.
IExecuteCommand::SetPosition

Sets the coordinates of a point used for display.
IExecuteCommand::SetShowWindow

Sets the specified window's visual state.

Remarks

When to Implement

Implement this interface when you choose it as your method to invoke the verb to perform an action on selected items. The items are passed as a Shell item array through IObjectWithSelection::SetSelection, so the object must also implement IObjectWithSelection.

When to Use

Do not call the methods of IExecuteCommand directly. Windows Explorer calls your IExecuteCommand methods when the user wants to perform an action on the items.

Note that, apart from Execute, the methods of this interface pass system information to the handler. The system itself calls these methods, setting the parameters appropriately based on system settings and conditions.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)