다음을 통해 공유


IVsTextImage.AdviseTextImageEvents(IVsTextImageEvents, UInt32) Method

Definition

Registers the environment to receive notification of text image changes.

public:
 int AdviseTextImageEvents(Microsoft::VisualStudio::TextManager::Interop::IVsTextImageEvents ^ pSink, [Runtime::InteropServices::Out] System::UInt32 % pCookie);
int AdviseTextImageEvents(Microsoft::VisualStudio::TextManager::Interop::IVsTextImageEvents const & pSink, [Runtime::InteropServices::Out] unsigned int & pCookie);
public int AdviseTextImageEvents (Microsoft.VisualStudio.TextManager.Interop.IVsTextImageEvents pSink, out uint pCookie);
abstract member AdviseTextImageEvents : Microsoft.VisualStudio.TextManager.Interop.IVsTextImageEvents * uint32 -> int
Public Function AdviseTextImageEvents (pSink As IVsTextImageEvents, ByRef pCookie As UInteger) As Integer

Parameters

pSink
IVsTextImageEvents

[in] The IVsTextImageEvents interface on the object requesting notification of text image events.

pCookie
UInt32

[out] Pointer to an abstract handle for the referenced event sink. This value is required to unadvised the event sink using UnadviseTextImageEvents(UInt32).

Returns

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

Remarks

The IVsTextImageEvents interface is the mechanism through which the environment can be notified of a change in a text image. If the environment registers for notification, you must call OnTextChange when a change occurs.

COM Signature

From textmgr.idl:

HRESULT IVsTextImage::AdviseTextImageEvents(  
   [in] IVsTextImageEvents * pSink,  
   [out, retval] DWORD * pCookie  
);  

Applies to