Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Executes the specified command.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function ExecuteCommand ( _
szCommand As String _
) As Integer
'Usage
Dim instance As IVsCommandWindow
Dim szCommand As String
Dim returnValue As Integer
returnValue = instance.ExecuteCommand(szCommand)
int ExecuteCommand(
string szCommand
)
int ExecuteCommand(
[InAttribute] String^ szCommand
)
abstract ExecuteCommand :
szCommand:string -> int
function ExecuteCommand(
szCommand : String
) : int
Parameters
- szCommand
Type: System.String
[in] String containing the command.
Return Value
Type: System.Int32
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
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.