Compartir a través de


IVsTextScanner.Read Method

Performs a scan of the text buffer, or portion of the text buffer defined by the string length, piLength.

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

Syntax

'Declaración
Function Read ( _
    <OutAttribute> ByRef ppszText As String, _
    <OutAttribute> ByRef piLength As Integer _
) As Integer
'Uso
Dim instance As IVsTextScanner
Dim ppszText As String
Dim piLength As Integer
Dim returnValue As Integer

returnValue = instance.Read(ppszText, _
    piLength)
int Read(
    out string ppszText,
    out int piLength
)
int Read(
    [OutAttribute] String^% ppszText, 
    [OutAttribute] int% piLength
)
abstract Read : 
        ppszText:string byref * 
        piLength:int byref -> int 
function Read(
    ppszText : String, 
    piLength : int
) : int

Parameters

  • ppszText
    Type: System.String%
    [out] Range of the text buffer to read.
  • piLength
    Type: System.Int32%
    [out] Length of text to read from the buffer.

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 IVsTextScanner::Read(
   [out] WCHAR **ppszText,
   [out] long *piLength
);

The parameter piLength is an integer value for the length of text pointed to by ppszText. If the value is zero, there is no more text.

Nota

The text buffer is created by the IVsTextScanner object and the buffer must persist for the life of the IVsTextScanner object or until the CloseScan method is called.

.NET Framework Security

See Also

Reference

IVsTextScanner Interface

IVsTextScanner Members

Microsoft.VisualStudio.TextManager.Interop Namespace