ole32: FileLockBytesImpl_WriteAt() should return STG_E_WRITEFAULT for write errors.
This commit is contained in:
parent
6144bae7f8
commit
cc4ad353d7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue