IDirectWriterLock

[This is preliminary documentation and subject to change.]

The IDirectWriterLock interface enables a single writer to obtain exclusive write access to a root storage object opened in direct mode while allowing concurrent access by multiple readers. This single-writer, multiple-reader mode does not require the overhead of making a snapshot copy of the storage for the readers.

When to Implement

Generally, you do not implement this interface unless you are defining a new storage scheme for your system. COM provides a compound file implementation of the IDirectWriterLock interface. For more information on the system-provided implementation, see IDirectWriterLock - Compound File Implementation.

When to Use

Use this interface to obtain exclusive write access to a storage object in direct mode.

Call IDirectWriterLock::WaitForWriteAccess to obtain exclusive write access to the storage object. Call IDirectWriterLock::ReleaseWriteAccess to release exclusive write access.

IDirectWriterLock::HaveWriteAccess indicates whether the storage is currently locked.

Methods in Vtable Order

IUnknown Methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.

IDirectWriterLock Method Description
WaitForWriteAccess Obtains exclusive write access to a storage.
ReleaseWriteAccess Releases the write lock previously obtained.
HaveWriteAccess Indicates whether the write lock has been taken.

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in objidl.h.

See Also

IStorage, StgCreateDocfile