MemoryBuffer 클래스

정의

참조 계산된 메모리 버퍼를 나타냅니다.

public ref class MemoryBuffer sealed : IClosable, IMemoryBuffer
/// [Windows.Foundation.Metadata.Activatable(Windows.Foundation.IMemoryBufferFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MemoryBuffer final : IClosable, IMemoryBuffer
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Foundation.IMemoryBufferFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class MemoryBuffer final : IClosable, IMemoryBuffer
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Foundation.IMemoryBufferFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MemoryBuffer : System.IDisposable, IMemoryBuffer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Foundation.IMemoryBufferFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class MemoryBuffer : System.IDisposable, IMemoryBuffer
function MemoryBuffer(capacity)
Public NotInheritable Class MemoryBuffer
Implements IDisposable, IMemoryBuffer
상속
Object Platform::Object IInspectable MemoryBuffer
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

설명

또한 이 형식은 버퍼의 스토리지에 직접 액세스할 수 있는 COM 인터페이스 IMemoryBufferByteAccess를 구현합니다. 버퍼에 액세스하는 방법에 대한 C# 예제는 사용자 지정 효과 샘플을 참조하세요.

참고

C++/WinRT는 데이터에 직접 액세스하기 위한 확장 메서드를 제공합니다 MemoryBuffer . 다양한 언어 및 런타임은 프로세스 메모리에 액세스하는 고유한 방법을 제공합니다. 메모리의 수명 주기가 인터페이스의 수명 주기 IMemoryBufferByteAccess 와 관련이 있으므로 버퍼에 액세스할 때는 주의해야 합니다.

생성자

MemoryBuffer(UInt32)

지정된 용량을 사용하여 새 MemoryBuffer instance 초기화합니다.

메서드

Close()

실제 메모리 버퍼에서 이 MemoryBuffer 개체의 연결을 끊습니다.

CreateReference()

IMemoryBufferReference 인터페이스를 구현하는 새 관리 개체를 반환합니다.

Dispose()

관리되지 않는 리소스의 확보, 해제 또는 다시 설정과 관련된 애플리케이션 정의 작업을 수행합니다.

적용 대상

추가 정보