IVsTextStream::GetStream Method (Int32, Int32, IntPtr)
Visual Studio 2015
Provides direct, stream-oriented access to the text buffer.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Parameters
- iPos
-
Type:
System::Int32
[in] Starting position in the text buffer
- iLength
-
Type:
System::Int32
[in] Length of the text stream to access.
- pszDest
-
Type:
System::IntPtr
[in] The caller-allocated string buffer. This buffer is filled with the requested text.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From textmgr.idl:
HRESULT IVsTextStream::GetStream( [in] long iPos, [in] long iLength, [out] WCHAR *pszDest );
When using this method, be sure to allocate a buffer of size iLength+1, because this call appends a null to the character array.
Show: