Initializes the sink writer for writing.
public:
HRESULT BeginWriting()
Type: HRESULT
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. |
Refer to Media Foundation return codes.
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.
Header: Declared in mfreadwrite.h.