IVsCommandWindow::ExecuteCommand Method (String^)
Visual Studio 2015
Executes the specified command.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- szCommand
-
Type:
System::String^
[in] String containing the command.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
If the command is invalid or disabled the method reports the error to the user and returns S_OK.
Note that the method returns control to the caller before the command has actually executed: ExecuteCommand simply posts a Windows message. When the shell receives the message, it executes the command.
From vsshell.idl:
HRESULT IVsCommandWindow::ExecuteCommand(
[in, ref] LPCOLESTR szCommand
);
Show: