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
'宣言
Function QueryStatus ( _
ByRef pguidCmdGroup As Guid, _
cCmds As UInteger, _
<OutAttribute> prgCmds As OLECMD(), _
<OutAttribute> pCmdText As IntPtr _
) As Integer
int QueryStatus(
ref Guid pguidCmdGroup,
uint cCmds,
OLECMD[] prgCmds,
IntPtr pCmdText
)
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.