IMediaBuffer::GetBufferAndLength (Windows CE 5.0)

Send Feedback

This method retrieves the buffer and the size of the valid data in the buffer.

HRESULT GetBufferAndLength(BYTE** ppBuffer,DWORD* pcbLength);

Parameters

  • ppBuffer
    [out] Address of a pointer that receives the buffer array. The ppBuffer parameter can be NULL if pcbLength is not NULL.
  • pcbLength
    [out] Pointer to a variable that receives the size of the valid data, in bytes. The pcbLength parameter can be NULL if ppBuffer is not NULL.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Retrieved the requested number of items
E_POINTER NULL pointer argument

Remarks

Either parameter can be NULL, in which case it does not receive a value. At least one parameter must be non-NULL. If both parameters are NULL, the method returns E_POINTER.

The value returned in the pcbLength parameter is the size of the valid data in the buffer, not the buffer's allocated size. To obtain the buffer's allocated size, call the IMediaBuffer::GetMaxLength method.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Dmo.h.
Link Library: Dmoguid.lib.

See Also

IMediaBuffer | IMediaBuffer::GetMaxLength

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.