This documentation is archived and is not being maintained.

IVsObjectList2.GetMultipleSourceItems Method

Returns the ItemID corresponding to source files for the given list item if more than one.

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

int GetMultipleSourceItems(
	uint index,
	uint grfGSI,
	uint cItems,


Type: System.UInt32

[in] Specifies the index of the list item of interest.

Type: System.UInt32

[in] Flag providing information about how the selected items should be returned. Values are taken from the __VSGSIFLAGS enumeration.

Type: System.UInt32

[in] The number of items returned in rgItemSel.

Type: Microsoft.VisualStudio.Shell.Interop.VSITEMSELECTION[]

[out] Array of VSITEMSELECTION structures that contain an IVsHierarchy pointer and item identifier for each selected item.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

COM Signature

From vsshell80.idl:

HRESULT IVsObjectList2::GetMultipleSourceItems(
   [in] ULONG Index, 
   [in] VSGSIFLAGS grfGSI, 
   [in] ULONG cItems, 
[out, size_is(cItems)] VSITEMSELECTION rgItemSel[]);

The environment calls GetMultipleSourceItems if an initial call to CountSourceItems returns a count greater than 1. Note that all ItemIds must belong to the same IVsHierarchy (returned through CountSourceItems.

This method applies to Class View only.