Dmitry Timoshkov : ole32: Accept STG_E_UNIMPLEMENTEDFUNCTION when ILockBytes implementation doesn' t support locking.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 6 06:37:36 CDT 2015


Module: wine
Branch: master
Commit: 1f17334fc298d40459aca511702525d2f15d84db
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1f17334fc298d40459aca511702525d2f15d84db

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Fri Jul  3 15:27:22 2015 +0800

ole32: Accept STG_E_UNIMPLEMENTEDFUNCTION when ILockBytes implementation doesn't support locking.

Some custom implementations return it instead of STG_E_INVALIDFUNCTION.

---

 dlls/ole32/storage32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 220e17e..aa53758 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -5015,7 +5015,7 @@ static HRESULT StorageImpl_GrabLocks(StorageImpl *This, DWORD openFlags)
     hr = StorageImpl_LockRegionSync(This, offset, cb, LOCK_ONLYONCE);
 
     /* If the ILockBytes doesn't support locking that's ok. */
-    if (hr == STG_E_INVALIDFUNCTION) return S_OK;
+    if (hr == STG_E_INVALIDFUNCTION || hr == STG_E_UNIMPLEMENTEDFUNCTION) return S_OK;
     else if (FAILED(hr)) return hr;
 
     hr = S_OK;




More information about the wine-cvs mailing list