Udostępnij za pośrednictwem


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 : Guid * 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

The GUID of the command group.

cCmds
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

nativeint

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 codeDescriptionE_FAILThe operation failed.E_UNEXPECTEDAn unexpected error has occurred.E_POINTERThe prgCmds argument is null.OLECMDERR_E_UNKNOWNGROUPThe 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