IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr) Method

Definition

Queries the object for the status of one or more commands generated by user interface events.

public:
 int QueryStatus(Guid % pguidCmdGroup, System::UInt32 cCmds, cli::array <Microsoft::VisualStudio::OLE::Interop::OLECMD> ^ prgCmds, IntPtr pCmdText);
public int QueryStatus (ref Guid pguidCmdGroup, uint cCmds, Microsoft.VisualStudio.OLE.Interop.OLECMD[] prgCmds, IntPtr pCmdText);
abstract member QueryStatus :  * uint32 * Microsoft.VisualStudio.OLE.Interop.OLECMD[] * nativeint -> int
Public Function QueryStatus (ByRef pguidCmdGroup As Guid, cCmds As UInteger, prgCmds As OLECMD(), pCmdText As IntPtr) As Integer
Parameters
pguidCmdGroup
Guid Guid Guid Guid

The GUID of the command group.

cCmds
UInt32 UInt32 UInt32 UInt32

The number of commands in prgCmds.

prgCmds
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
IntPtr IntPtr IntPtr 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.

Returns

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

Applies to