IVsTaskList2::GetSelectionCount Method (Int32)

 

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

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int GetSelectionCount(
	[OutAttribute] int% pnItems
)

Parameters

pnItems
Type: System::Int32

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

Return Value

Type: System::Int32

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

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

From vsshell80.idl:

HRESULT GetSelectionCount(
   [out] int* pnItems
);
Return to top
Show: