On 03.07.2015 10:27, Dmitry Timoshkov wrote:
> 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;
>
It looks like StorageImpl_LockRegionSync should be fixed instead to
filter some error codes. Could you add a test with external ILockBytes
implementation that does that?