MFValidateMediaTypeSize function (mfapi.h)

Validates the size of a buffer for a video format block.

Syntax

HRESULT MFValidateMediaTypeSize(
  [in] GUID   FormatType,
  [in] UINT8  *pBlock,
  [in] UINT32 cbSize
);

Parameters

[in] FormatType

GUID that specifies the type of format block. It must be one of the following values:

FORMAT_DvInfo

FORMAT_MFVideoFormat

FORMAT_MPEG2Video

FORMAT_MPEGStreams

FORMAT_MPEGVideo

FORMAT_VideoInfo

FORMAT_VideoInfo2

FORMAT_WaveFormatEx

[in] pBlock

Pointer to a buffer that contains the format block.

[in] cbSize

Size of the pBlock buffer, in bytes.

Return value

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

Return code Description
S_OK
The buffer that contains the format block is large enough.
MF_E_INVALIDMEDIATYPE
The buffer that contains the format block is too small, or the format block is not valid.
MF_E_UNSUPPORTED_FORMAT
This function does not support the specified format type.

Remarks

This function is available on the following platforms if the Windows Media Format 11 SDK redistributable components are installed:

  • Windows XP with Service Pack 2 (SP2) and later.
  • Windows XP Media Center Edition 2005 with KB900325 (Windows XP Media Center Edition 2005) and KB925766 (October 2006 Update Rollup for Windows XP Media Center Edition) installed.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfapi.h
Library Mfplat.lib
DLL Mfplat.dll

See also

Media Foundation Functions