Compartir a través de


IVsUIShell.PostExecCommand(Guid, UInt32, UInt32, Object) Method

Definition

Allows asynchronous execution of commands.

public:
 int PostExecCommand(Guid % pguidCmdGroup, System::UInt32 nCmdID, System::UInt32 nCmdexecopt, System::Object ^ % pvaIn);
public int PostExecCommand (ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, ref object pvaIn);
abstract member PostExecCommand : Guid * uint32 * uint32 * obj -> int
Public Function PostExecCommand (ByRef pguidCmdGroup As Guid, nCmdID As UInteger, nCmdexecopt As UInteger, ByRef pvaIn As Object) As Integer

Parameters

pguidCmdGroup
Guid

[in, unique] Unique identifier of the command group; can be null to specify the standard group. All the commands that are passed in the nCmdID must belong to the group specified by pguidCmdGroup.

nCmdID
UInt32

[in] The command to be executed. This command must belong to the group specified with pguidCmdGroup.

nCmdexecopt
UInt32

[in] Values describe how the object should execute the command.

pvaIn
Object

[in, unique] Pointer to a VARIANTARG structure containing input arguments. Can be null.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::PostExecCommand(  
   [in, unique] const GUID * pguidCmdGroup,  
   [in] DWORD nCmdID,  
   [in] DWORD nCmdexecopt,  
   [in, unique] VARIANT * pvaIn  
);  

To synchronously execute a command, call QueryService for the SID_SUIHostCommandDispatcher service, which returns an object that implements IOleCommandTarget. In this case, the environment synchronously executes the command and return. Use IVsUIShell.PostExecCommand method to asynchronously execute a command. That is, the command is posted to the environment, but control is returned to you immediately. The command then executes at a later time.

Applies to