次の方法で共有


IVsContainedLanguageHost.Advise Method

Definition

Enables a client to receive messages from the source text.

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

Parameters

pHost
IVsContainedLanguageHostEvents

[in] An IVsContainedLanguageHostEvents object representing the entity that is requesting notification of contained language events generated by the editor.

pvsCookie
UInt32

[out] Returns a unique identifier representing the client. This value can later be used in a call to the Unadvise(UInt32) method.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Remarks

COM Signature

From singlefileeditor.idl:

HRESULT Advise(  
   [in]  IVsContainedLanguageHostEvents* pHost,  
   [out] VSCOOKIE*                       pvsCookie  
);  

Applies to