WindowsRuntimeBufferExtensions.GetWindowsRuntimeBuffer Método

Definición

Sobrecargas

GetWindowsRuntimeBuffer(MemoryStream)

Devuelve una interfaz de Windows.Storage.Streams.IBuffer que representa la misma memoria que la secuencia de memoria especificada.Returns a Windows.Storage.Streams.IBuffer interface that represents the same memory as the specified memory stream.

GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32)

Devuelve una interfaz de Windows.Storage.Streams.IBuffer que representa una región dentro de la memoria que representa la secuencia de memoria especificada.Returns a Windows.Storage.Streams.IBuffer interface that represents a region within the memory that the specified memory stream represents.

GetWindowsRuntimeBuffer(MemoryStream)

Importante

Esta API no es conforme a CLS.

Devuelve una interfaz de Windows.Storage.Streams.IBuffer que representa la misma memoria que la secuencia de memoria especificada.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

Parámetros

underlyingStream
MemoryStream

Secuencia que proporciona memoria de respaldo para el IBuffer.The stream that provides the backing memory for the IBuffer.

Devoluciones

Interfaz de Windows.Storage.Streams.IBuffer respaldada por la misma memoria que respalda la secuencia de memoria especificada.A Windows.Storage.Streams.IBuffer interface that is backed by the same memory that backs the specified memory stream.

Atributos

GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32)

Importante

Esta API no es conforme a CLS.

Devuelve una interfaz de Windows.Storage.Streams.IBuffer que representa una región dentro de la memoria que representa la secuencia de memoria especificada.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

Parámetros

underlyingStream
MemoryStream

Secuencia que comparte memoria con el IBuffer.The stream that shares memory with the IBuffer.

positionInStream
Int32

La posición de la región de memoria compartida en underlyingStream.The position of the shared memory region in underlyingStream.

length
Int32

El tamaño máximo de la región de memoria compartida.The maximum size of the shared memory region. Si el número de bytes de underlyingStream, comenzando en positionInStream, es menor que length, el IBuffer que se devuelve representa solo los bytes disponibles.If the number of bytes in underlyingStream, starting at positionInStream, is less than length, the IBuffer that is returned represents only the available bytes.

Devoluciones

Interfaz de Windows.Storage.Streams.IBuffer respaldada por una región dentro de la memoria que respalda la secuencia de memoria especificada.A Windows.Storage.Streams.IBuffer interface that is backed by a region within the memory that backs the specified memory stream.

Atributos

Excepciones

underlyingStream es null.underlyingStream is null.

positionInStream o length es menor que 0 (cero).positionInStream or length is less than 0 (zero).

positionInStream está más allá del final de source.positionInStream is beyond the end of source.

underlyingStream no puede exponer su búfer de memoria subyacente.underlyingStream cannot expose its underlying memory buffer.

underlyingStream se ha cerrado.underlyingStream has been closed.

Se aplica a