Export (0) Print
Expand All

IMediaBuffer::GetBufferAndLength method

The GetBufferAndLength method retrieves the buffer and the size of the valid data in the buffer.

Syntax


HRESULT GetBufferAndLength(
  [out]  BYTE **ppBuffer,
  [out]  DWORD *pcbLength
);

Parameters

ppBuffer [out]

Address of a pointer that receives the buffer array. Can be NULL if pcbLength is not NULL.

pcbLength [out]

Pointer to a variable that receives the size of the valid data, in bytes. Can be NULL if ppBuffer is not NULL.

Return value

Returns an HRESULT value. Possible values include those in the following table.

Return codeDescription
E_POINTER

NULL pointer argument

S_OK

Success

 

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

Header

Mediaobj.h (include Dmo.h)

Library

Dmoguids.lib

See also

IMediaBuffer Interface
Implementing IMediaBuffer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft