Compartilhar via


IVsSelectionEvents.OnElementValueChanged(UInt32, Object, Object) Method

Definition

Reports that an element value has changed.

public:
 int OnElementValueChanged(System::UInt32 elementid, System::Object ^ varValueOld, System::Object ^ varValueNew);
public:
 int OnElementValueChanged(unsigned int elementid, Platform::Object ^ varValueOld, Platform::Object ^ varValueNew);
int OnElementValueChanged(unsigned int elementid, winrt::Windows::Foundation::IInspectable const & varValueOld, winrt::Windows::Foundation::IInspectable const & varValueNew);
public int OnElementValueChanged (uint elementid, object varValueOld, object varValueNew);
abstract member OnElementValueChanged : uint32 * obj * obj -> int
Public Function OnElementValueChanged (elementid As UInteger, varValueOld As Object, varValueNew As Object) As Integer

Parameters

elementid
UInt32

[in] DWORD value representing a particular entry in the array of element values associated with the selection context. For valid elementid values, see VSConstants.VSSELELEMID.

varValueOld
Object

[in] VARIANT that contains the previous element value. This parameter contains element-specific data, such as a pointer to the IOleCommandTarget interface if elementid is set to SEID_ResultsList or a pointer to the IOleUndoManager interface if elementid is set to SEID_UndoManager.

varValueNew
Object

[in] VARIANT that contains the new element value. This parameter contains element-specific data, such as a pointer to the IOleCommandTarget interface if elementid is set to SEID_ResultsList or a pointer to the IOleUndoManager interface if elementid is set to SEID_UndoManager.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsSelectionEvents::OnElementValueChanged(  
   [in] VSSELELEMID elementid,  
   [in] VARIANT varValueOld,  
   [in] VARIANT varValueNew  
);  

Applies to