IMFMediaBuffer::Unlock Method

Unlocks a buffer that was previously locked. Call this method once for every call to IMFMediaBuffer::Lock.

Syntax

public:
HRESULT Unlock()  

Return value

Type: HRESULT 

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

Return codes
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.

Remarks

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.

Requirements

Header: Declared in mfobjects.h (include mfidl.h).

Library: Use mfuuid.lib.