Home COM GDI+ WebBrowser Data Access

IDirectWriterLock Interface

 

IID_IDirectWriterLock

{0E6D4D92-6738-11CF-9608-00AA00680DB4}

 

 

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.

 

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 reference count.

Release

Decrements reference count.

IDirectWriterLock Methods

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.

 

QueryInterface

 

FUNCTION IDirectWriterLock_QueryInterface ( _

  BYVAL pthis AS DWORD PTR _

, BYREF riid AS GUID _

, BYREF ppvObj AS DWORD _

  ) AS LONG


  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[0] USING IDirectWriterLock_QueryInterface (pthis, riid, ppvObj) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

AddRef

 

FUNCTION IDirectWriterLock_AddRef ( _

  BYVAL pthis AS DWORD PTR _

  ) AS DWORD
 

  LOCAL DWRESULT AS LONG
  CALL DWORD @@pthis[1] USING IDirectWriterLock_AddRef (pthis) TO DWRESULT
  FUNCTION = DWRESULT
 

END FUNCTION

 

 

Release

 

FUNCTION IDirectWriterLock_Release ( _

  BYVAL pthis AS DWORD PTR _

  ) AS DWORD
 

  LOCAL DWRESULT AS DWORD
  CALL DWORD @@pthis[2] USING IDirectWriterLock_Release (pthis) TO DWRESULT
  FUNCTION = DWRESULT
 

END FUNCTION

 

 

WaitForWriteAccess

 

FUNCTION IDirectWriterLock_WaitForWriteAccess ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwTimeout AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IDirectWriterLock_WaitForWriteAccess (pthis, dwTimeout) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

ReleaseWriteAccess

 

FUNCTION IDirectWriterLock_ReleaseWriteAccess ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IDirectWriterLock_ReleaseWriteAccess (pthis) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

HaveWriteAccess

 

FUNCTION IDirectWriterLock_HaveWriteAccess ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IDirectWriterLock_HaveWriteAccess (pthis) TO HRESULT
  FUNCTION = HRESULT
 

END FUNCTION

 

 

Page last updated on Friday, 17 March 2006 23:33:39 +0100