IVsTextManager.RegisterIndependentView(Object, IVsTextBuffer) Method

Definition

Registers a view from a source other than the core editor.

public:
 int RegisterIndependentView(System::Object ^ pUnk, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer);
public:
 int RegisterIndependentView(Platform::Object ^ pUnk, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer);
int RegisterIndependentView(winrt::Windows::Foundation::IInspectable const & pUnk, Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer);
public int RegisterIndependentView (object pUnk, Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer);
abstract member RegisterIndependentView : obj * Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer -> int
Public Function RegisterIndependentView (pUnk As Object, pBuffer As IVsTextBuffer) As Integer

Parameters

pUnk
Object

[in] Pointer to the IUnknown interface. Use this parameter to AddRef and Release the view so that the buffer is not freed in advance of the view.

pBuffer
IVsTextBuffer

[in] Pointer to the IVsTextBuffer interface associated with the view.

Returns

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

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextManager::RegisterIndependentView(  
   [in] IUnknown *pUnk,  
   [in] IVsTextBuffer *pBuffer  
);  

If you are putting up a custom view, such as a forms designer, on a buffer, call this method so that the text manager can track it.

Applies to