ole32: FileLockBytesImpl_WriteAt() should return STG_E_WRITEFAULT for write errors.

oldstable
Francois Gouget 2014-06-18 17:44:12 +02:00 committed by Alexandre Julliard
parent 6144bae7f8
commit cc4ad353d7
1 changed files with 2 additions and 2 deletions

View File

@ -265,14 +265,14 @@ static HRESULT WINAPI FileLockBytesImpl_WriteAt(
ret = SetFilePointerEx(This->hfile, offset, NULL, FILE_BEGIN);
if (!ret)
return STG_E_READFAULT;
return STG_E_WRITEFAULT;
while (bytes_left)
{
ret = WriteFile(This->hfile, writePtr, bytes_left, &cbWritten, NULL);
if (!ret)
return STG_E_READFAULT;
return STG_E_WRITEFAULT;
if (pcbWritten)
*pcbWritten += cbWritten;