IMF2DBuffer::ContiguousCopyTo Method

Copies this buffer into the caller’s buffer, converting the data to contiguous format.

Syntax

public:
HRESULT ContiguousCopyTo(
         BYTE *pbDestBuffer,
         DWORD cbDestBuffer
)  

Parameters

pbDestBuffer
Type: BYTE *

[out]

Pointer to the destination buffer where the data will be copied. The caller allocates the buffer.

cbDestBuffer
Type: DWORD 

Size of the destination buffer, in bytes. To get the required size, call IMF2DBuffer::GetContiguousLength.

Return value

Type: HRESULT 

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
S_OK The method succeeded.
E_INVALIDARG Invalid size specified in pbDestBuffer.

Refer to Media Foundation return codes.

Remarks

If the original buffer is not contiguous, this method converts the contents into contiguous format during the copy. For a definition of contiguous as it applies to 2-D buffers, see the Remarks section in IMF2DBuffer interface.

Requirements

Header: Declared in mfobjects.h (include mfidl.h).

Library: Use Mfuuid.lib.