共用方式為


DataPackage.IOleCommandTarget.QueryStatus 方法

查詢由使用者介面事件產生之一個或多個命令的狀態的物件。

命名空間:  Microsoft.VisualStudio.Data.Schema.Package.UI
組件:  Microsoft.VisualStudio.Data.Schema.Package (在 Microsoft.VisualStudio.Data.Schema.Package.dll 中)

語法

'宣告
Private Function QueryStatus ( _
    ByRef pguidCmdGroup As Guid, _
    cCmds As UInteger, _
    prgCmds As OLECMD(), _
    pCmdText As IntPtr _
) As Integer Implements IOleCommandTarget.QueryStatus
int IOleCommandTarget.QueryStatus(
    ref Guid pguidCmdGroup,
    uint cCmds,
    OLECMD[] prgCmds,
    IntPtr pCmdText
)
private:
virtual int QueryStatus(
    Guid% pguidCmdGroup, 
    unsigned int cCmds, 
    array<OLECMD>^ prgCmds, 
    IntPtr pCmdText
) sealed = IOleCommandTarget::QueryStatus
private abstract QueryStatus : 
        pguidCmdGroup:Guid byref * 
        cCmds:uint32 * 
        prgCmds:OLECMD[] * 
        pCmdText:IntPtr -> int 
private override QueryStatus : 
        pguidCmdGroup:Guid byref * 
        cCmds:uint32 * 
        prgCmds:OLECMD[] * 
        pCmdText:IntPtr -> int 
JScript 不支援明確介面實作。

參數

  • pguidCmdGroup
    型別:System.Guid%
    命令群組的唯一識別項,可以是 NULL 以指定標準群組。所有在 prgCmds 陣列中傳遞的命令都必須屬於 pguidCmdGroup 指定的群組。
  • pCmdText
    型別:System.IntPtr
    OLECMDTEXT 結構的指標,在這個結構中會傳回單一命令的名稱或狀態資訊,或兩者皆傳回。這個參數可以是 NULL,以表示呼叫端不需要此資訊。

傳回值

型別:System.Int32

實作

IOleCommandTarget.QueryStatus(Guid%, UInt32, array<OLECMD[], IntPtr)

.NET Framework 安全性

請參閱

參考

DataPackage 類別

Microsoft.VisualStudio.Data.Schema.Package.UI 命名空間