Sdílet prostřednictvím


IMemoryBufferReference Interface

Definition

Represents a reference to an IMemoryBuffer object.

public interface class IMemoryBufferReference : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(4223982889, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248)]
struct IMemoryBufferReference : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(4223982889, 9307, 4580, 175, 152, 104, 148, 35, 38, 12, 248)]
public interface IMemoryBufferReference : System.IDisposable
Public Interface IMemoryBufferReference
Implements IDisposable
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The IMemoryBufferReference interface allows a client to retrieve the Capacity of the memory buffer. The same object identity must also implement the COM interface IMemoryBufferByteAccess. A client retrieves the IMemoryBufferByteAccess interface pointer via a QueryInterface from the IMemoryBufferReference object.

C++/WinRT extension functions

Note

Extension functions exist on the C++/WinRT projection types for certain Windows Runtime APIs. For example, winrt::Windows::Foundation::IAsyncAction is the C++/WinRT projection type for IAsyncAction. The extension functions aren't part of the application binary interface (ABI) surface of the actual Windows Runtime types, so they're not listed as members of the Windows Runtime APIs. But you can call them from within any C++/WinRT project. See C++/WinRT functions that extend Windows Runtime APIs.

uint8_t* data() const;

Returns a pointer to the data held inside the buffer.

Properties

Capacity

Gets the size of the memory buffer in bytes.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Events

Closed

Occurs when MemoryBuffer.Close has been called, but before this IMemoryBufferReference has been closed.

Applies to

See also