IVsTextImage.AdviseTextImageEvents Method
Registers the environment to receive notification of text image changes.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'宣告
Function AdviseTextImageEvents ( _
pSink As IVsTextImageEvents, _
<OutAttribute> ByRef pCookie As UInteger _
) As Integer
int AdviseTextImageEvents(
IVsTextImageEvents pSink,
out uint pCookie
)
int AdviseTextImageEvents(
[InAttribute] IVsTextImageEvents^ pSink,
[OutAttribute] unsigned int% pCookie
)
abstract AdviseTextImageEvents :
pSink:IVsTextImageEvents *
pCookie:uint32 byref -> int
function AdviseTextImageEvents(
pSink : IVsTextImageEvents,
pCookie : uint
) : int
Parameters
- pSink
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextImageEvents
[in] The IVsTextImageEvents interface on the object requesting notification of text image events.
- pCookie
Type: System.UInt32%
[out] Pointer to an abstract handle for the referenced event sink. This value is required to unadvised the event sink using UnadviseTextImageEvents.
Return Value
Type: System.Int32
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
);
.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.