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

int GetMultipleSourceItems (
	[InAttribute] uint index,
	[InAttribute] uint grfGSI,
	[InAttribute] uint cItems,
	[OutAttribute] VSITEMSELECTION[] rgItemSel
int GetMultipleSourceItems (
	/** @attribute InAttribute() */ UInt32 index, 
	/** @attribute InAttribute() */ UInt32 grfGSI, 
	/** @attribute InAttribute() */ UInt32 cItems, 
	/** @attribute OutAttribute() */ VSITEMSELECTION[] rgItemSel
function GetMultipleSourceItems (
	index : uint, 
	grfGSI : uint, 
	cItems : uint, 
) : int



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


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


[in] The number of items returned in rgItemSel.


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

Return Value

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.