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


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

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

int IOleCommandTarget.QueryStatus(
	ref Guid guidGroup,
	uint nCmdId,
	OLECMD[] oleCmd,
	IntPtr oleText


Type: System.Guid

The GUID of the command group to which the command belongs.

Type: System.UInt32

The number of elements in the oleCmd array. In Visual Studio this number is always 1.

Type: Microsoft.VisualStudio.OLE.Interop.OLECMD[]

An array of OLECMD structures representing the commands being queried.

Type: System.IntPtr

A pointer to an OLECMDTEXT structure in which to return name and/or status information for a single command. Can be null to indicate that the caller does not need this information.

Return Value

Type: System.Int32

S_OK if the method succeeded, otherwise an error code. This method returns OLECMDERR_E_NOTSUPPORTED if no instance of IOleCommandTarget can be found.

Return to top