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

'Declaration
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
)
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.

  • 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

See Also

Reference

IOleCommandTarget Interface

Microsoft.VisualStudio.OLE.Interop Namespace