IVsTrackSelectionEx.GetCurrentSelection 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回当前选定内容。
public:
int GetCurrentSelection([Runtime::InteropServices::Out] IntPtr % ppHier, [Runtime::InteropServices::Out] System::UInt32 % pitemid, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsMultiItemSelect ^ % ppMIS, [Runtime::InteropServices::Out] IntPtr % ppSC);
public int GetCurrentSelection (out IntPtr ppHier, out uint pitemid, out Microsoft.VisualStudio.Shell.Interop.IVsMultiItemSelect ppMIS, out IntPtr ppSC);
abstract member GetCurrentSelection : nativeint * uint32 * IVsMultiItemSelect * nativeint -> int
Public Function GetCurrentSelection (ByRef ppHier As IntPtr, ByRef pitemid As UInteger, ByRef ppMIS As IVsMultiItemSelect, ByRef ppSC As IntPtr) As Integer
参数
- ppHier
-
IntPtr
nativeint
弄指向 IVsHierarchy 当前所选内容的接口的指针的指针。
- pitemid
- UInt32
弄指向当前所选内容的项标识符的指针。 有关有效值的列表 pitemid ,请参阅 VSITEMID 。
- ppMIS
- IVsMultiItemSelect
弄指向 IVsMultiItemSelect 包含当前所选内容的窗口的接口的指针的指针。
- ppSC
-
IntPtr
nativeint
弄指向 ISelectionContainer 当前所选内容的接口的指针的指针。
返回
如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。
注解
COM 签名
从 vsshell:
HRESULT IVsTrackSelectionEx::GetCurrentSelection(
[out] IVsHierarchy ** ppHier,
[out] VSITEMID * pitemid,
[out] IVsMultiItemSelect ** ppMIS,
[out] ISelectionContainer **ppSC
);
如果参数的内容 pitemid 为 VSITEMID_SELECTION (指示表示由多个项组成的选定内容),则 GetSelectedItems 使用指向的接口检索选定项 ppMIS 。