IVsObjectList2.GetMultipleSourceItems 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
如果有多个,则返回与给定列表项的源文件对应的 ItemID。
public:
int GetMultipleSourceItems(System::UInt32 index, System::UInt32 grfGSI, System::UInt32 cItems, cli::array <Microsoft::VisualStudio::Shell::Interop::VSITEMSELECTION> ^ rgItemSel);
int GetMultipleSourceItems(unsigned int index, unsigned int grfGSI, unsigned int cItems, std::Array <Microsoft::VisualStudio::Shell::Interop::VSITEMSELECTION> const & rgItemSel);
public int GetMultipleSourceItems (uint index, uint grfGSI, uint cItems, Microsoft.VisualStudio.Shell.Interop.VSITEMSELECTION[] rgItemSel);
abstract member GetMultipleSourceItems : uint32 * uint32 * uint32 * Microsoft.VisualStudio.Shell.Interop.VSITEMSELECTION[] -> int
Public Function GetMultipleSourceItems (index As UInteger, grfGSI As UInteger, cItems As UInteger, rgItemSel As VSITEMSELECTION()) As Integer
参数
- index
- UInt32
中指定感兴趣的列表项的索引。
- grfGSI
- UInt32
中用于提供有关应如何返回所选项目的信息的标志。 值取自 __VSGSIFLAGS 枚举。
- cItems
- UInt32
中中返回的项数 rgItemSel 。
- rgItemSel
- VSITEMSELECTION[]
弄结构的数组 VSITEMSELECTION ,其中包含 IVsHierarchy 每个选定项的指针和项标识符。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 vsshell80:
[C++]
HRESULT IVsObjectList2::GetMultipleSourceItems(
[in] ULONG Index,
[in] VSGSIFLAGS grfGSI,
[in] ULONG cItems,
[out, size_is(cItems)] VSITEMSELECTION rgItemSel[]);
GetMultipleSourceItems如果对的初始调用 CountSourceItems 返回的计数大于1,则环境将调用。 请注意,所有都 ItemIds 必须属于 IVsHierarchy 通过返回的相同 (CountSourceItems 。
此方法仅适用于 类视图 。