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

oldstable
Francois Gouget 2014-06-16 18:23:41 +02:00 committed by Alexandre Julliard
parent 8583fc4a6c
commit 809b6aeab2
1 changed files with 1 additions and 2 deletions

View File

@ -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)