IVsSelectionEvents.OnSelectionChanged Method
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)
Syntax
'Declaration
Function OnSelectionChanged ( _
pHierOld As IVsHierarchy, _
itemidOld As UInteger, _
pMISOld As IVsMultiItemSelect, _
pSCOld As ISelectionContainer, _
pHierNew As IVsHierarchy, _
itemidNew As UInteger, _
pMISNew As IVsMultiItemSelect, _
pSCNew As ISelectionContainer _
) As Integer
int OnSelectionChanged(
IVsHierarchy pHierOld,
uint itemidOld,
IVsMultiItemSelect pMISOld,
ISelectionContainer pSCOld,
IVsHierarchy pHierNew,
uint itemidNew,
IVsMultiItemSelect pMISNew,
ISelectionContainer pSCNew
)
int OnSelectionChanged(
[InAttribute] IVsHierarchy^ pHierOld,
[InAttribute] unsigned int itemidOld,
[InAttribute] IVsMultiItemSelect^ pMISOld,
[InAttribute] ISelectionContainer^ pSCOld,
[InAttribute] IVsHierarchy^ pHierNew,
[InAttribute] unsigned int itemidNew,
[InAttribute] IVsMultiItemSelect^ pMISNew,
[InAttribute] ISelectionContainer^ pSCNew
)
abstract OnSelectionChanged :
pHierOld:IVsHierarchy *
itemidOld:uint32 *
pMISOld:IVsMultiItemSelect *
pSCOld:ISelectionContainer *
pHierNew:IVsHierarchy *
itemidNew:uint32 *
pMISNew:IVsMultiItemSelect *
pSCNew:ISelectionContainer -> int
function OnSelectionChanged(
pHierOld : IVsHierarchy,
itemidOld : uint,
pMISOld : IVsMultiItemSelect,
pSCOld : ISelectionContainer,
pHierNew : IVsHierarchy,
itemidNew : uint,
pMISNew : IVsMultiItemSelect,
pSCNew : ISelectionContainer
) : int
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.
Remarks
COM Signature
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
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.