MFCreateSample

Creates an empty media sample.

Syntax

HRESULT MFCreateSample(
         IMFSample **ppIMFSample
)  

Parameters

ppIMFSample
Type: IMFSample **

[out]

Receives a pointer to the IMFSample interface of the media sample. The caller must release the interface.

Return value

Type: HRESULT 

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

Return codes
Return code Description
S_OK The function succeeded.

Refer to Media Foundation return codes.

Remarks

Initially the sample does not contain any media buffers.

Requirements

Header: Declared in mfapi.h.

Library: Use Mfplat.lib.