WindowsRuntimeBufferExtensions.GetWindowsRuntimeBuffer 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| GetWindowsRuntimeBuffer(MemoryStream) |
返回Windows。Storage.Streams.IBuffer 接口,该接口表示与指定的内存流相同的内存。 |
| GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32) |
返回Windows。Storage.Streams.IBuffer 接口,该接口表示指定内存流所表示的内存中的区域。 |
GetWindowsRuntimeBuffer(MemoryStream)
重要
此 API 不符合 CLS。
返回Windows。Storage.Streams.IBuffer 接口,该接口表示与指定的内存流相同的内存。
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);
[<System.CLSCompliant(false)>]
static member GetWindowsRuntimeBuffer : System.IO.MemoryStream -> Windows.Storage.Streams.IBuffer
<Extension()>
Public Function GetWindowsRuntimeBuffer (underlyingStream As MemoryStream) As IBuffer
参数
- underlyingStream
- MemoryStream
为 IBuffer 提供后盾内存的流。
返回
Windows。由支持指定内存流的同一内存支持的 Storage.Streams.IBuffer 接口。
- 属性
适用于
GetWindowsRuntimeBuffer(MemoryStream, Int32, Int32)
重要
此 API 不符合 CLS。
返回Windows。Storage.Streams.IBuffer 接口,该接口表示指定内存流所表示的内存中的区域。
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);
[<System.CLSCompliant(false)>]
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
参数
- underlyingStream
- MemoryStream
与 IBuffer 共享内存的流。
- positionInStream
- Int32
共享内存区域的位置 underlyingStream。
- length
- Int32
共享内存区域的最大大小。 如果从
返回
Windows。由支持指定内存流的内存中的区域支持的 Storage.Streams.IBuffer 接口。
- 属性
例外
underlyingStream 为 null。
positionInStream 或 length 小于 0(零)。
positionInStream 超出了结尾 underlyingStream。
underlyingStream 无法公开其基础内存缓冲区。
underlyingStream 已关闭。