WindowsRuntimeBufferExtensions.GetWindowsRuntimeBuffer WindowsRuntimeBufferExtensions.GetWindowsRuntimeBuffer WindowsRuntimeBufferExtensions.GetWindowsRuntimeBuffer WindowsRuntimeBufferExtensions.GetWindowsRuntimeBuffer Method

Definition

Overloads

GetWindowsRuntimeBuffer(MemoryStream) GetWindowsRuntimeBuffer(MemoryStream) GetWindowsRuntimeBuffer(MemoryStream) GetWindowsRuntimeBuffer(MemoryStream)

Returns a Windows.Storage.Streams.IBuffer interface that represents the same memory as the specified memory stream.

GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32)

Returns a Windows.Storage.Streams.IBuffer interface that represents a region within the memory that the specified memory stream represents.

GetWindowsRuntimeBuffer(MemoryStream) GetWindowsRuntimeBuffer(MemoryStream) GetWindowsRuntimeBuffer(MemoryStream) GetWindowsRuntimeBuffer(MemoryStream)

Important

This API is not CLS-compliant.

Returns a Windows.Storage.Streams.IBuffer interface that represents the same memory as the specified memory stream.

public:
[System::Runtime::CompilerServices::Extension]
 static Windows::Storage::Streams::IBuffer ^ GetWindowsRuntimeBuffer(System::IO::MemoryStream ^ underlyingStream);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer GetWindowsRuntimeBuffer (this System.IO.MemoryStream underlyingStream);
static member GetWindowsRuntimeBuffer : System.IO.MemoryStream -> Windows.Storage.Streams.IBuffer
<Extension()>
Public Function GetWindowsRuntimeBuffer (underlyingStream As MemoryStream) As IBuffer

Parameters

underlyingStream
MemoryStream MemoryStream MemoryStream MemoryStream

The stream that provides the backing memory for the IBuffer.

Returns

A Windows.Storage.Streams.IBuffer interface that is backed by the same memory that backs the specified memory stream.

GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32)

Important

This API is not CLS-compliant.

Returns a Windows.Storage.Streams.IBuffer interface that represents a region within the memory that the specified memory stream represents.

public:
[System::Runtime::CompilerServices::Extension]
 static Windows::Storage::Streams::IBuffer ^ GetWindowsRuntimeBuffer(System::IO::MemoryStream ^ underlyingStream, int positionInStream, int length);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer GetWindowsRuntimeBuffer (this System.IO.MemoryStream underlyingStream, int positionInStream, int length);
static member GetWindowsRuntimeBuffer : System.IO.MemoryStream * int * int -> Windows.Storage.Streams.IBuffer
<Extension()>
Public Function GetWindowsRuntimeBuffer (underlyingStream As MemoryStream, positionInStream As Integer, length As Integer) As IBuffer

Parameters

underlyingStream
MemoryStream MemoryStream MemoryStream MemoryStream

The stream that shares memory with the IBuffer.

positionInStream
Int32 Int32 Int32 Int32

The position of the shared memory region in underlyingStream.

length
Int32 Int32 Int32 Int32

The maximum size of the shared memory region. If the number of bytes in underlyingStream, starting at positionInStream, is less than length, the IBuffer that is returned represents only the available bytes.

Returns

A Windows.Storage.Streams.IBuffer interface that is backed by a region within the memory that backs the specified memory stream.

Exceptions

positionInStream is beyond the end of source.

Applies to