Partager via


IVsCodeWindow.GetBuffer Method

Returns the buffer used by all views in the code window.

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

Syntax

'Déclaration
Function GetBuffer ( _
    <OutAttribute> ByRef ppBuffer As IVsTextLines _
) As Integer
'Utilisation
Dim instance As IVsCodeWindow
Dim ppBuffer As IVsTextLines
Dim returnValue As Integer

returnValue = instance.GetBuffer(ppBuffer)
int GetBuffer(
    out IVsTextLines ppBuffer
)
int GetBuffer(
    [OutAttribute] IVsTextLines^% ppBuffer
)
abstract GetBuffer : 
        ppBuffer:IVsTextLines byref -> int 
function GetBuffer(
    ppBuffer : IVsTextLines
) : int

Parameters

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method returns a pointer to the IVsTextLines interface representing the text buffer. If you access the text buffer through stream coordinates, rather than line and index coordinates, you can call QueryInterface from IVsTextLines to return a pointer to IVsTextStream.

COM Signature

From textmgr.idl:

HRESULT IVsCodeWindow::GetBuffer(
   [out] IVsTextLines **ppBuffer
);

.NET Framework Security

See Also

Reference

IVsCodeWindow Interface

IVsCodeWindow Members

Microsoft.VisualStudio.TextManager.Interop Namespace