IVsCommandWindow.ExecuteCommand(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the specified command.
public:
int ExecuteCommand(System::String ^ szCommand);
public:
int ExecuteCommand(Platform::String ^ szCommand);
int ExecuteCommand(std::wstring const & szCommand);
public int ExecuteCommand (string szCommand);
abstract member ExecuteCommand : string -> int
Public Function ExecuteCommand (szCommand As String) As Integer
Parameters
- szCommand
- String
[in] String containing the command.
Returns
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
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.
COM Signature
From vsshell.idl:
HRESULT IVsCommandWindow::ExecuteCommand(
[in, ref] LPCOLESTR szCommand
);