diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index 7c78d6809fb..6d20725fa7a 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c @@ -563,7 +563,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_LockRegion( ULARGE_INTEGER cb, /* [in] */ DWORD dwLockType) /* [in] */ { - return S_OK; + return STG_E_INVALIDFUNCTION; } /* diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c index df63093bd68..1377741474e 100644 --- a/dlls/ole32/tests/hglobalstream.c +++ b/dlls/ole32/tests/hglobalstream.c @@ -71,9 +71,7 @@ static void test_streamonhglobal(IStream *pStream) ok_ole_success(hr, "IStream_Revert"); hr = IStream_LockRegion(pStream, ull, ull, LOCK_WRITE); - todo_wine { ok(hr == STG_E_INVALIDFUNCTION, "IStream_LockRegion should have returned STG_E_INVALIDFUNCTION instead of 0x%08lx\n", hr); - } hr = IStream_Stat(pStream, &statstg, STATFLAG_DEFAULT); ok_ole_success(hr, "IStream_Stat");