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

Definição

Sobrecargas

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

Retorna uma interface Windows.Storage.Streams.IBuffer que representa a mesma memória que o fluxo de memória especificado.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)

Retorna uma interface Windows.Storage.Streams.IBuffer que representa uma região dentro da memória representada pelo fluxo de memória especificado.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)

Importante

Esta API não está em conformidade com CLS.

Retorna uma interface Windows.Storage.Streams.IBuffer que representa a mesma memória que o fluxo de memória especificado.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 MemoryStream MemoryStream MemoryStream

O fluxo que fornece a memória principal do sistema para o IBuffer.The stream that provides the backing memory for the IBuffer.

Retornos

Uma interface Windows.Storage.Streams.IBuffer que representa a mesma memória que atende o fluxo de memória especificado.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)

Importante

Esta API não está em conformidade com CLS.

Retorna uma interface Windows.Storage.Streams.IBuffer que representa uma região dentro da memória representada pelo fluxo de memória especificado.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 MemoryStream MemoryStream MemoryStream

O fluxo que compartilha a memória com o IBuffer.The stream that shares memory with the IBuffer.

positionInStream
Int32 Int32 Int32 Int32

A posição da região de memória compartilhada em underlyingStream.The position of the shared memory region in underlyingStream.

length
Int32 Int32 Int32 Int32

O tamanho máximo da região de memória compartilhada.The maximum size of the shared memory region. Se o número de bytes em underlyingStream, começando em positionInStream, for menor que length, o IBuffer que é retornado representará somente os bytes disponíveis.If the number of bytes in underlyingStream, starting at positionInStream, is less than length, the IBuffer that is returned represents only the available bytes.

Retornos

Uma interface Windows.Storage.Streams.IBuffer que representa uma região dentro da memória que atende o fluxo de memória especificado.A Windows.Storage.Streams.IBuffer interface that is backed by a region within the memory that backs the specified memory stream.

Exceções

underlyingStream é nulo.underlyingStream is null.

positionInStream ou length é menor que 0 (zero).positionInStream or length is less than 0 (zero).

positionInStream está além do final de source.positionInStream is beyond the end of source.

underlyingStream não é capaz de expor seu buffer de memória subjacente.underlyingStream cannot expose its underlying memory buffer.

O underlyingStream foi fechado.underlyingStream has been closed.

Aplica-se a