Checks whether a given command is supported and enabled on the file node.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Protected Overrides Function QueryStatusOnNode ( _
guidCmdGroup As Guid, _
cmd As UInteger, _
pCmdText As IntPtr, _
ByRef result As QueryStatusResult _
) As Integer
'使用
Dim guidCmdGroup As Guid
Dim cmd As UInteger
Dim pCmdText As IntPtr
Dim result As QueryStatusResult
Dim returnValue As Integer
returnValue = Me.QueryStatusOnNode(guidCmdGroup, _
cmd, pCmdText, result)
protected override int QueryStatusOnNode(
Guid guidCmdGroup,
uint cmd,
IntPtr pCmdText,
ref QueryStatusResult result
)
protected:
virtual int QueryStatusOnNode(
Guid guidCmdGroup,
unsigned int cmd,
IntPtr pCmdText,
QueryStatusResult% result
) override
protected override function QueryStatusOnNode(
guidCmdGroup : Guid,
cmd : uint,
pCmdText : IntPtr,
result : QueryStatusResult
) : int
Parameters
guidCmdGroup
Type: System.GuidThe GUID of the command group, a null reference (Nothing in Visual Basic) to specify the standard group.
cmd
Type: System.UInt32The ID of the command.
pCmdText
Type: System.IntPtrPointer to a OLECMDTEXT structure that indicates the name and status information for a given command. Can be null.
result
Type: Microsoft.VisualStudio.Package.QueryStatusResult%The QueryStatusResult of the command
Return Value
Type: System.Int32
Returns [F:Microsoft.VisualStudio.OLE.Interop OleConstants.OLECMDERR_E_UNKNOWNGROUP] if the command group is anything other than guidStandardCommandSet97() or guidStandardCommandSet2K(). Returns S_OK if the command was found, regardless of the status of the command.
Remarks
This method provides support for the following commands: Copy, Paste, Cut, Rename, ViewCode, Open, OpenWith, and.EXCLUDEFROMPROJECT. Override this method to support different commands.
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.