Retrieves the status of an OLE command.
Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
声明
Public Function GetCommandStatus ( _
    itemId As Integer, _
    command As OleCommand _
) As OleCommandStatus
public OleCommandStatus GetCommandStatus(
    int itemId,
    OleCommand command
)
public:
OleCommandStatus^ GetCommandStatus(
    int itemId, 
    OleCommand^ command
)
member GetCommandStatus : 
        itemId:int * 
        command:OleCommand -> OleCommandStatus 
public function GetCommandStatus(
    itemId : int, 
    command : OleCommand
) : 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. 
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.