Commit 809b6aea authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

ole32: Fix StorageImpl_LockRegionSync() to actually wait between locking attempts.

parent 8583fc4a
......@@ -2874,6 +2874,7 @@ static HRESULT StorageImpl_LockRegionSync(StorageImpl *This, ULARGE_INTEGER offs
ULARGE_INTEGER cb, DWORD dwLockType)
{
HRESULT hr;
int delay = 0;
/* if it's a FileLockBytesImpl use LockFileEx in blocking mode */
if (SUCCEEDED(FileLockBytesImpl_LockRegionSync(This->lockBytes, offset, cb)))
......@@ -2882,8 +2883,6 @@ static HRESULT StorageImpl_LockRegionSync(StorageImpl *This, ULARGE_INTEGER offs
/* otherwise we have to fake it based on an async lock */
do
{
int delay=0;
hr = ILockBytes_LockRegion(This->lockBytes, offset, cb, dwLockType);
if (hr == STG_E_ACCESSDENIED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment