IOleCommandTarget.QueryStatus Method
Queries the object for the status of one or more commands generated by user interface events.
Namespace: Microsoft.VisualStudio.OLE.Interop
Assembly: Microsoft.VisualStudio.OLE.Interop (in Microsoft.VisualStudio.OLE.Interop.dll)
Syntax
'Dichiarazione
Function QueryStatus ( _
ByRef pguidCmdGroup As Guid, _
cCmds As UInteger, _
<OutAttribute> prgCmds As OLECMD(), _
<OutAttribute> pCmdText As IntPtr _
) As Integer
'Utilizzo
Dim instance As IOleCommandTarget
Dim pguidCmdGroup As Guid
Dim cCmds As UInteger
Dim prgCmds As OLECMD()
Dim pCmdText As IntPtr
Dim returnValue As Integer
returnValue = instance.QueryStatus(pguidCmdGroup, _
cCmds, prgCmds, pCmdText)
int QueryStatus(
ref Guid pguidCmdGroup,
uint cCmds,
OLECMD[] prgCmds,
IntPtr pCmdText
)
int QueryStatus(
[InAttribute] Guid% pguidCmdGroup,
[InAttribute] unsigned int cCmds,
[InAttribute] [OutAttribute] array<OLECMD>^ prgCmds,
[InAttribute] [OutAttribute] IntPtr pCmdText
)
abstract QueryStatus :
pguidCmdGroup:Guid byref *
cCmds:uint32 *
prgCmds:OLECMD[] byref *
pCmdText:IntPtr byref -> int
function QueryStatus(
pguidCmdGroup : Guid,
cCmds : uint,
prgCmds : OLECMD[],
pCmdText : IntPtr
) : int
Parameters
- pguidCmdGroup
Type: System.Guid%
The GUID of the command group.
- cCmds
Type: System.UInt32
The number of commands in prgCmds.
- prgCmds
Type: array<Microsoft.VisualStudio.OLE.Interop.OLECMD[]
An array of OLECMD structures that indicate the commands for which the caller needs status information. This method fills the cmdf member of each structure with values taken from the OLECMDF enumeration.
- pCmdText
Type: System.IntPtr
An OLECMDTEXT structure in which to return name and/or status information of a single command. This parameter can be null to indicate that the caller does not need this information.
Return Value
Type: System.Int32
This method returns S_OK on success. Other possible return values include the following.
Return code |
Description |
E_FAIL |
The operation failed. |
E_UNEXPECTED |
An unexpected error has occurred. |
E_POINTER |
The prgCmds argument is null. |
OLECMDERR_E_UNKNOWNGROUP |
The pguidCmdGroup parameter is not null but does not specify a recognized command group. |
Remarks
For information on the COM interface, see IOleCommandTarget::QueryStatus
.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.