IMediaObject::Lock

This method acquires or releases a lock on the DMO. Call this method to keep the DMO serialized when performing multiple operations.

HRESULT Lock(
  LONG bLock
);

Parameters

  • bLock
    Value that specifies whether to acquire or release the lock. If the value is nonzero, a lock is acquired. If the value is zero, the lock is released.

Return Values

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Success
E_FAIL Failure

Remarks

This method prevents other threads from calling methods on the DMO. If another thread calls a method on the DMO, the thread blocks until the lock is released.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Dmo.h.
Link Library: Dmoguid.lib.

See Also

IMediaObject

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.