Unlocks a buffer that was previously locked. Call this method once for every call to IMFMediaBuffer::Lock.
public:
HRESULT Unlock()
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. |
| D3DERR_INVALIDCALL | For Direct3D surface buffers, an error occurred when unlocking the surface. |
Refer to Media Foundation return codes.
It is an error to call Unlock if you did not call Lock previously.
After calling this method, do not use the pointer returned by the Lock method. It is no longer guaranteed to be valid.
Header: Declared in mfobjects.h (include mfidl.h).
Library: Use mfuuid.lib.