Jactry Zeng jzeng@codeweavers.com writes:
@@ -913,14 +913,21 @@ static HRESULT WINAPI filestream_Seek(IStream *iface, LARGE_INTEGER move, DWORD static HRESULT WINAPI filestream_SetSize(IStream *iface, ULARGE_INTEGER size) { struct shstream *stream = impl_from_IStream(iface);
DWORD origin;
TRACE("(%p, %s)\n", stream, wine_dbgstr_longlong(size.QuadPart));
- if (!SetFilePointer(stream->u.file.handle, size.QuadPart, NULL, FILE_BEGIN))
- origin = SetFilePointer(stream->u.file.handle, 0, NULL, FILE_CURRENT);
- if (SetFilePointer(stream->u.file.handle, size.QuadPart, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
While you're at it, using SetFilePointerEx() may be a good idea.