Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

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

Syntax

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 Value

Returns an HRESULTvalue. 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

Header dmo.h
Library Dmoguid.lib
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IMediaObject