[PATCH 0/1] MR10642: shcore: Handle 64-bit position in file stream Seek().
From: Nikolay Sivov <nsivov@codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59643 --- dlls/shcore/main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index f04853cb9f5..4d9761a2be8 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -942,19 +942,15 @@ static HRESULT WINAPI filestream_Write(IStream *iface, const void *buff, ULONG s static HRESULT WINAPI filestream_Seek(IStream *iface, LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER *new_pos) { struct shstream *stream = impl_from_IStream(iface); - DWORD position; + LARGE_INTEGER position; TRACE("%p, %s, %ld, %p.\n", iface, wine_dbgstr_longlong(move.QuadPart), origin, new_pos); - position = SetFilePointer(stream->u.file.handle, move.u.LowPart, NULL, origin); - if (position == INVALID_SET_FILE_POINTER) + if (!SetFilePointerEx(stream->u.file.handle, move, &position, origin)) return HRESULT_FROM_WIN32(GetLastError()); if (new_pos) - { - new_pos->u.HighPart = 0; - new_pos->u.LowPart = position; - } + new_pos->QuadPart = position.QuadPart; return S_OK; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10642
participants (2)
-
Nikolay Sivov -
Nikolay Sivov (@nsivov)