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 internal helper class handles locking and unlocking.

Copy Code
LockIt(
  _DERIVED_* 
p
);

Parameters

p

Pointer to the derived object.

Return Values

None.

Remarks

The constructor method locks the object, and the destructor method unlocks the object. To lock the object from inside your derived class, declare a local variable of type LockIt, as shown in the following example.

Copy Code
{
	LockIt lck(static_cast<_DERIVED_ *>(this)); // Locks the
object.
} // lck goes out of scope, object is unlocked.

The methods in IMediaObjectImplhandle locking, so in most cases the derived class does not need to lock the object.

Requirements

Header dmoimpl.h
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also