IVsTextStream::GetStream Method (Int32, Int32, IntPtr)

 

Provides direct, stream-oriented access to the text buffer.

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

int GetStream(
	int iPos,
	int iLength,
	IntPtr pszDest
)

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::Int32

If 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.

Return to top
Show: