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

Dmitry Timoshkov dmitry at baikal.ru
Fri Jul 3 02:27:22 CDT 2015


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;
-- 
2.4.5




More information about the wine-patches mailing list