IMFSinkWriter::BeginWriting method (mfreadwrite.h)

Initializes the sink writer for writing.

Syntax

HRESULT BeginWriting();

Return value

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

Return code Description
S_OK
The method succeeded.
MF_E_INVALIDREQUEST
The request is invalid.

Remarks

Call this method after you configure the input streams and before you send any data to the sink writer.

You must call BeginWriting before calling any of the following methods:

The underlying media sink must have at least one input stream. Otherwise, BeginWriting returns MF_E_INVALIDREQUEST. To add input streams, call the IMFSinkWriter::AddStream method.

If BeginWriting succeeds, any further calls to BeginWriting return MF_E_INVALIDREQUEST.

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header mfreadwrite.h

See also

IMFSinkWriter

Sink Writer