The main entry point for command execution. It is called from the IVsUIHierarchy and IOleCommandTarget execution methods.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Protected Overridable Function InternalExecCommand ( _
guidCmdGroup As Guid, _
cmdId As UInteger, _
cmdExecOpt As UInteger, _
vaIn As IntPtr, _
vaOut As IntPtr, _
commandOrigin As CommandOrigin _
) As Integer
'使用
Dim guidCmdGroup As Guid
Dim cmdId As UInteger
Dim cmdExecOpt As UInteger
Dim vaIn As IntPtr
Dim vaOut As IntPtr
Dim commandOrigin As CommandOrigin
Dim returnValue As Integer
returnValue = Me.InternalExecCommand(guidCmdGroup, _
cmdId, cmdExecOpt, vaIn, vaOut, commandOrigin)
protected virtual int InternalExecCommand(
Guid guidCmdGroup,
uint cmdId,
uint cmdExecOpt,
IntPtr vaIn,
IntPtr vaOut,
CommandOrigin commandOrigin
)
protected:
virtual int InternalExecCommand(
Guid guidCmdGroup,
unsigned int cmdId,
unsigned int cmdExecOpt,
IntPtr vaIn,
IntPtr vaOut,
CommandOrigin commandOrigin
)
protected function InternalExecCommand(
guidCmdGroup : Guid,
cmdId : uint,
cmdExecOpt : uint,
vaIn : IntPtr,
vaOut : IntPtr,
commandOrigin : CommandOrigin
) : int
Parameters
guidCmdGroup
Type: System.GuidThe GUID of the command group of the command.
cmdId
Type: System.UInt32The ID of the command.
cmdExecOpt
Type: System.UInt32Values taken from the OLECMDEXECOPT enumeration. The values describe how the object should execute the command.
vaIn
Type: System.IntPtrPointer to a VARIANTARG structure that contains input arguments. Can be a null reference (Nothing in Visual Basic).
vaOut
Type: System.IntPtrPointer to a VARIANTARG structure that contains command output. Can be a null reference (Nothing in Visual Basic).
commandOrigin
Type: Microsoft.VisualStudio.Package.CommandOriginThe CommandOrigin value. Can be either UiHierarchy or OleCommandTarget.
Return Value
Type: System.Int32
OLECMDERR_E_NOTSUPPORTED() if the project manager is unavailable or if the command is not supported; otherwise, S_OK if the command succeeded or if it was aborted or canceled; otherwise, returns the error code that is returned by the command.
Permissions
- 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.