Partager via


IVsTaskList2.GetSelectionCount(Int32) Method

Definition

Returns the count of selected items, which may be anywhere from zero to the total count of items in the task list.

public:
 int GetSelectionCount([Runtime::InteropServices::Out] int % pnItems);
int GetSelectionCount([Runtime::InteropServices::Out] int & pnItems);
public int GetSelectionCount (out int pnItems);
abstract member GetSelectionCount : int -> int
Public Function GetSelectionCount (ByRef pnItems As Integer) As Integer

Parameters

pnItems
Int32

[out] A pointer to an integer value containing the Count.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

In order to handle commands, the task providers will need to know which tasks are currently selected.

COM Signature

From vsshell80.idl:

HRESULT GetSelectionCount(  
   [out] int* pnItems  
);  

Applies to