IVsTextManager.RegisterIndependentView Method

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

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Déclaration
Function RegisterIndependentView ( _
    pUnk As Object, _
    pBuffer As IVsTextBuffer _
) As Integer
'Utilisation
Dim instance As IVsTextManager
Dim pUnk As Object
Dim pBuffer As IVsTextBuffer
Dim returnValue As Integer

returnValue = instance.RegisterIndependentView(pUnk, _
    pBuffer)
int RegisterIndependentView(
    Object pUnk,
    IVsTextBuffer pBuffer
)
int RegisterIndependentView(
    [InAttribute] Object^ pUnk, 
    [InAttribute] IVsTextBuffer^ pBuffer
)
abstract RegisterIndependentView : 
        pUnk:Object * 
        pBuffer:IVsTextBuffer -> int 
function RegisterIndependentView(
    pUnk : Object, 
    pBuffer : IVsTextBuffer
) : int

Parameters

  • pUnk
    Type: System.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.

Return Value

Type: System.Int32
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.

.NET Framework Security

See Also

Reference

IVsTextManager Interface

IVsTextManager Members

Microsoft.VisualStudio.TextManager.Interop Namespace