Retrieves the status of an OLE command with a request for a particular type of command text.
Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
声明
Public Function GetCommandStatus ( _
    itemId As Integer, _
    command As OleCommand, _
    textType As OleCommandTextType _
) As OleCommandStatus
public OleCommandStatus GetCommandStatus(
    int itemId,
    OleCommand command,
    OleCommandTextType textType
)
public:
OleCommandStatus^ GetCommandStatus(
    int itemId, 
    OleCommand^ command, 
    OleCommandTextType textType
)
member GetCommandStatus : 
        itemId:int * 
        command:OleCommand * 
        textType:OleCommandTextType -> OleCommandStatus 
public function GetCommandStatus(
    itemId : int, 
    command : OleCommand, 
    textType : OleCommandTextType
) : OleCommandStatus
Parameters
- itemId
Type: System.Int32
The item ID for which the command status should be retrieved. 
- command
Type: Microsoft.VisualStudio.Data.OleCommand
The command to query for status. 
- textType
Type: Microsoft.VisualStudio.Data.OleCommandTextType
The type of text that should be retrieved. 
Return Value
Type: Microsoft.VisualStudio.Data.OleCommandStatus
Returns an OleCommandStatus object that describes the status of the OLE command.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | The command parameter is null.  | 
| ArgumentException | The specified itemId is invalid.  | 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.