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

Francois Gouget fgouget at free.fr
Mon Jun 16 11:23:41 CDT 2014


---
 dlls/ole32/storage32.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 757138d..49d16fd 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -2874,16 +2874,16 @@ static HRESULT StorageImpl_LockRegionSync(StorageImpl *This, ULARGE_INTEGER offs
     ULARGE_INTEGER cb, DWORD dwLockType)
 {
     HRESULT hr;
+    int delay;
 
     /* if it's a FileLockBytesImpl use LockFileEx in blocking mode */
     if (SUCCEEDED(FileLockBytesImpl_LockRegionSync(This->lockBytes, offset, cb)))
         return S_OK;
 
     /* otherwise we have to fake it based on an async lock */
+    delay = 0;
     do
     {
-        int delay=0;
-
         hr = ILockBytes_LockRegion(This->lockBytes, offset, cb, dwLockType);
 
         if (hr == STG_E_ACCESSDENIED)
-- 
2.0.0




More information about the wine-patches mailing list