Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Sets command status.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
'Declaration
Private Function QueryStatus ( _
ByRef guidGroup As Guid, _
nCmdId As UInteger, _
oleCmd As OLECMD(), _
oleText As IntPtr _
) As Integer Implements IOleCommandTarget.QueryStatus
int IOleCommandTarget.QueryStatus(
ref Guid guidGroup,
uint nCmdId,
OLECMD[] oleCmd,
IntPtr oleText
)
private:
virtual int QueryStatus(
Guid% guidGroup,
unsigned int nCmdId,
array<OLECMD>^ oleCmd,
IntPtr oleText
) sealed = IOleCommandTarget::QueryStatus
private abstract QueryStatus :
guidGroup:Guid byref *
nCmdId:uint32 *
oleCmd:OLECMD[] *
oleText:IntPtr -> int
private override QueryStatus :
guidGroup:Guid byref *
nCmdId:uint32 *
oleCmd:OLECMD[] *
oleText:IntPtr -> int
JScript does not support explicit interface implementations.
Parameters
- guidGroup
Type: System.Guid%
System.Guid guidGroup. The menu group. This implementation maps the group to CommandID.Guid.
- nCmdId
Type: System.UInt32
System.UInt32 nCmdId. The ID code of the command. This implementation maps nCmdId to CommandID.ID.
- oleCmd
Type: array<Microsoft.VisualStudio.OLE.Interop.OLECMD[]
Microsoft.OLE.Interop._tagOLECMD[] oleCmd. A command structure that contains data about the status of the command.
- oleText
Type: System.IntPtr
System.IntPtr oleText. A pointer to a text BSTR. If the command is a verb the name of the verb will be filled in here.
Return Value
Type: System.Int32
An HRESULT code indicating the success or failure of the call. The following HRESULTs may be returned:
Value |
Description |
---|---|
The command was successfully invoked. |
|
The group GUID did not match the commandID’s Guid property for any command or verb. |
|
The group was found, but there is no command or verb with an ID that matches. This is also returned if the OleStatus property of a command that was found returns zero. |
Implements
IOleCommandTarget.QueryStatus(Guid%, UInt32, array<OLECMD[], IntPtr)
Remarks
This method is defined as a private interface implementation for IOleCommandTarget. To make use of it, a tool or document window generally implements IOleCommandTarget itself, and then forwards calls to the implementation contained in MenuCommandService. This implementation of QueryStatus uses FindCommand if a command exists, and then sets oleCmd.cmdf to the status code returned by the command’s OleStatus property.
.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.