Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDirectWriterLock::WaitForWriteAccess method

The WaitForWriteAccess method obtains exclusive write access to a storage object.

Syntax


HRESULT WaitForWriteAccess(
  [in] DWORD dwTimeout
);

Parameters

dwTimeout [in]

Specifies the time in milliseconds that this method blocks while waiting to obtain exclusive write access to the storage object. If dwTimeout is zero, the method does not block waiting for exclusive access for writing. The INFINITE time-out defined in the Platform SDK is allowed for dwTimeout.

Return value

This method can return one of these values.

S_OK

The caller has successfully obtained exclusive write access to the storage.

S_FALSE

This method was called again without an intervening call to IDirectWriterLock::ReleaseWriteAccess.

STG_E_INUSE

The specified time-out expired without obtaining exclusive write access.

Remarks

When a storage is opened in direct mode (STGM_DIRECT) with the STGM_READWRITE|STGM_SHARE_DENY_WRITE, you can call this method to obtain exclusive write access to the storage.

This method returns immediately if no readers have the storage open. If the storage is still open for reading, this method blocks for the specified dwTimeout or until the current readers close the storage.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Objidl.h

IDL

Objidl.idl

Library

Uuid.lib

DLL

Ole32.dll

IID

IID_IDirectWriterLock is defined as 0E6D4D92-6738-11CF-9608-00AA00680DB4

See also

IDirectWriterLock::ReleaseWriteAccess
IDirectWriterLock::HaveWriteAccess

 

 

Show:
© 2017 Microsoft