IVsSelectionEvents::OnSelectionChanged Method (IVsHierarchy^, UInt32, IVsMultiItemSelect^, ISelectionContainer^, IVsHierarchy^, UInt32, IVsMultiItemSelect^, ISelectionContainer^)

 

Reports that the project hierarchy, item and/or selection container has changed.

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

int OnSelectionChanged(
	IVsHierarchy^ pHierOld,
	unsigned int itemidOld,
	IVsMultiItemSelect^ pMISOld,
	ISelectionContainer^ pSCOld,
	IVsHierarchy^ pHierNew,
	unsigned int itemidNew,
	IVsMultiItemSelect^ pMISNew,
	ISelectionContainer^ pSCNew
)

Parameters

pHierOld
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] Pointer to the IVsHierarchy interface of the project hierarchy for the previous selection.

itemidOld
Type: System::UInt32

[in] Identifier of the project item for previous selection. For valid itemidOld values, see VSITEMID.

pMISOld
Type: Microsoft.VisualStudio.Shell.Interop::IVsMultiItemSelect^

[in] Pointer to the IVsMultiItemSelect interface to access a previous multiple selection.

pSCOld
Type: Microsoft.VisualStudio.Shell.Interop::ISelectionContainer^

[in] Pointer to the ISelectionContainer interface to access Properties window data for the previous selection.

pHierNew
Type: Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^

[in] Pointer to the IVsHierarchy interface of the project hierarchy for the current selection.

itemidNew
Type: System::UInt32

[in] Identifier of the project item for the current selection. For valid itemidNew values, see VSITEMID.

pMISNew
Type: Microsoft.VisualStudio.Shell.Interop::IVsMultiItemSelect^

[in] Pointer to the IVsMultiItemSelect interface for the current selection.

pSCNew
Type: Microsoft.VisualStudio.Shell.Interop::ISelectionContainer^

[in] Pointer to the ISelectionContainer interface for the current selection.

Return Value

Type: System::Int32

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

From vsshell.idl:

HRESULT IVsSelectionEvents::OnSelectionChanged(
   [in] IVsHierarchy *pHierOld,
   [in] VSITEMID itemidOld,
   [in] IVsMultiItemSelect *pMISOld,
   [in] ISelectionContainer *pSCOld,
   [in] IVsHierarchy *pHierNew,
   [in] VSITEMID itemidNew,
   [in] IVsMultiItemSelect *pMISNew,
   [in] ISelectionContainer *pSCNew
);
Return to top
Show: