Partager via


IMediaBuffer::SetLength

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method specifies the length of the data currently in the buffer.

Syntax

HRESULT SetLength(
  DWORD cbLength
);

Parameters

  • cbLength
    Size of the data, in bytes. The value must not exceed the buffer's maximum size. Call the IMediaBuffer::GetMaxLength method to obtain the maximum size.

Return Value

Returns S_OK if successful. Otherwise, it returns an HRESULT value indicating the cause of the error.

Remarks

This method sets the size of the valid data currently in the buffer, not the buffer's allocated size.

Requirements

Header dmo.h
Library Dmoguid.lib
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IMediaBuffer