Sets the length of the valid data in the buffer.
public:
HRESULT SetCurrentLength(
DWORD cbCurrentLength
)
cbCurrentLength
Type: DWORDÂ
Length of the valid data, in bytes. This value cannot be greater than the allocated size of the buffer, which is returned by the IMFMediaBuffer::GetMaxLength method.
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. |
| E_INVALIDARG | The specified length is greater than the maximum size of the buffer. |
Refer to Media Foundation return codes.
Call this method if you write data into the buffer.
Header: Declared in mfobjects.h (include mfidl.h).
Library: Use mfuuid.lib.