No functional changes here.
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/oleaut32/tests/olepicture.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index f0468a6f83c..1cdea2ec2b9 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -294,7 +294,7 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); + hres = IStream_Seek(stream, seekto, STREAM_SEEK_CUR, &newpos1); ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); test_pic_with_stream(stream, imgsize); @@ -325,7 +325,7 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) ok (hres == S_OK, "createstreamonhglobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); + hres = IStream_Seek(stream, seekto, STREAM_SEEK_CUR, &newpos1); ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); test_pic_with_stream(stream, imgsize); @@ -362,7 +362,7 @@ static void test_empty_image(void) { ok (hres == S_OK, "CreatestreamOnHGlobal failed? doubt it... hres 0x%08lx\n", hres);
memset(&seekto,0,sizeof(seekto)); - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); + hres = IStream_Seek(stream, seekto, STREAM_SEEK_CUR, &newpos1); ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
pvObj = NULL; @@ -409,7 +409,7 @@ static void test_empty_image_2(void) {
memset(&seekto,0,sizeof(seekto)); seekto.LowPart = 42; - hres = IStream_Seek(stream,seekto,SEEK_CUR,&newpos1); + hres = IStream_Seek(stream, seekto, STREAM_SEEK_CUR, &newpos1); ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres);
pvObj = NULL; @@ -1246,7 +1246,7 @@ static void test_load_save_bmp(void) ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; - hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); + hr = IStream_Seek(dst_stream, offset, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); @@ -1332,7 +1332,7 @@ static void test_load_save_icon(void) ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; - hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); + hr = IStream_Seek(dst_stream, offset, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); @@ -1447,7 +1447,7 @@ static void test_load_save_empty_picture(void)
/* first with statable and seekable stream */ offset.QuadPart = 0; - hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); + hr = IStream_Seek(dst_stream, offset, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
pic = NULL; @@ -1574,7 +1574,7 @@ static void test_load_save_dib(void) ok(size == -1, "expected -1, got %ld\n", size);
offset.QuadPart = 0; - hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); + hr = IStream_Seek(dst_stream, offset, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek %#lx\n", hr);
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream);
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/windowscodecs/tests/converter.c | 6 +++--- dlls/windowscodecs/tests/metadata.c | 8 ++++---- dlls/windowscodecs/tests/tiffformat.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index fd617a1feb7..b5cad5ae2f4 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -1008,7 +1008,7 @@ static void check_tiff_format(IStream *stream, const WICPixelFormatGUID *format) ok(tiff.version == 42, "wrong TIFF version %u\n", tiff.version);
pos.QuadPart = tiff.dir_offset; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
hr = CoCreateInstance(&CLSID_WICIfdMetadataReader, NULL, CLSCTX_INPROC_SERVER, @@ -1308,7 +1308,7 @@ static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WIC LARGE_INTEGER pos;
pos.QuadPart = 0; - hr = IStream_Seek(stream, pos, SEEK_SET, (ULARGE_INTEGER *)&pos); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, (ULARGE_INTEGER *)&pos); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
if (IsEqualGUID(encoder, &CLSID_WICPngEncoder)) @@ -1322,7 +1322,7 @@ static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WIC else ok(0, "unknown encoder %s\n", wine_dbgstr_guid(encoder));
- hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr); }
diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index 14d24c1d0f9..f811f96e945 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -342,7 +342,7 @@ static void load_stream(IWICMetadataReader *reader, const char *data, int data_s IWICPersistStream_Release(persist);
pos.QuadPart = 0; - hr = IStream_Seek(stream, pos, SEEK_CUR, &cur_pos); + hr = IStream_Seek(stream, pos, STREAM_SEEK_CUR, &cur_pos); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr); /* IFD metadata reader doesn't rewind the stream to the start */ ok(cur_pos.QuadPart == 0 || cur_pos.QuadPart <= data_size, @@ -2266,7 +2266,7 @@ static void test_metadata_LSD(void) stream = create_stream(LSD_data, sizeof(LSD_data));
pos.QuadPart = 6; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); @@ -2360,7 +2360,7 @@ static void test_metadata_IMD(void) stream = create_stream(IMD_data, sizeof(IMD_data));
pos.QuadPart = 12; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); @@ -2451,7 +2451,7 @@ static void test_metadata_GCE(void) stream = create_stream(GCE_data, sizeof(GCE_data));
pos.QuadPart = 12; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
hr = IUnknown_QueryInterface(reader, &IID_IWICPersistStream, (void **)&persist); diff --git a/dlls/windowscodecs/tests/tiffformat.c b/dlls/windowscodecs/tests/tiffformat.c index 86365fb7b92..23aa97cb518 100644 --- a/dlls/windowscodecs/tests/tiffformat.c +++ b/dlls/windowscodecs/tests/tiffformat.c @@ -519,7 +519,7 @@ static void test_QueryCapability(void) ok(hr == WINCODEC_ERR_FRAMEMISSING || broken(hr == E_POINTER) /* XP */, "expected WINCODEC_ERR_FRAMEMISSING, got %#lx\n", hr);
pos.QuadPart = 4; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
capability = 0xdeadbeef; @@ -538,7 +538,7 @@ static void test_QueryCapability(void) IWICBitmapFrameDecode_Release(frame);
pos.QuadPart = 5; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
hr = IWICBitmapDecoder_QueryCapability(decoder, stream, &capability); @@ -558,7 +558,7 @@ static void test_QueryCapability(void) IWICBitmapDecoder_Release(decoder);
pos.QuadPart = 0; - hr = IStream_Seek(stream, pos, SEEK_SET, NULL); + hr = IStream_Seek(stream, pos, STREAM_SEEK_SET, NULL); ok(hr == S_OK, "IStream_Seek error %#lx\n", hr);
hr = IWICImagingFactory_CreateDecoderFromStream(factory, stream, NULL, 0, &decoder);
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/windowscodecs/metadatahandler.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/windowscodecs/metadatahandler.c b/dlls/windowscodecs/metadatahandler.c index 2d60c38ee10..7618d8cd6aa 100644 --- a/dlls/windowscodecs/metadatahandler.c +++ b/dlls/windowscodecs/metadatahandler.c @@ -837,7 +837,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, if (!item->value.caub.pElems) return E_OUTOFMEMORY;
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) { CoTaskMemFree(item->value.caub.pElems); @@ -882,7 +882,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, if (!item->value.caui.pElems) return E_OUTOFMEMORY;
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) { CoTaskMemFree(item->value.caui.pElems); @@ -915,7 +915,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, if (!item->value.caul.pElems) return E_OUTOFMEMORY;
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) { CoTaskMemFree(item->value.caul.pElems); @@ -946,7 +946,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, ULONGLONG ull;
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) return hr;
hr = IStream_Read(input, &ull, sizeof(ull), &bytesread); @@ -972,7 +972,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, if (!item->value.cauh.pElems) return E_OUTOFMEMORY;
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) { CoTaskMemFree(item->value.cauh.pElems); @@ -1010,7 +1010,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, }
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) { CoTaskMemFree(item->value.pszVal); @@ -1046,7 +1046,7 @@ static HRESULT load_IFD_entry(IStream *input, const struct IFD_entry *entry, }
pos.QuadPart = value; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) { CoTaskMemFree(item->value.blob.pBlobData); @@ -1118,7 +1118,7 @@ static HRESULT LoadIfdMetadata(IStream *input, const GUID *preferred_vendor, if (!next_ifd_offset) break;
pos.QuadPart = next_ifd_offset; - hr = IStream_Seek(input, pos, SEEK_SET, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_SET, NULL); if (FAILED(hr)) break;
hr = IStream_Read(input, &next_ifd_count, sizeof(next_ifd_count), &bytesread); @@ -1128,7 +1128,7 @@ static HRESULT LoadIfdMetadata(IStream *input, const GUID *preferred_vendor, SWAP_USHORT(next_ifd_count);
pos.QuadPart = next_ifd_count * sizeof(*entry); - hr = IStream_Seek(input, pos, SEEK_CUR, NULL); + hr = IStream_Seek(input, pos, STREAM_SEEK_CUR, NULL); if (FAILED(hr)) break; }
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/windowscodecs/ddsformat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index c9cdad08725..eb8fc456266 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -1405,7 +1405,7 @@ static HRESULT WINAPI DdsDecoder_Dds_GetFrame(IWICDdsDecoder *iface, frame_decode->info.pixel_format_bpp = This->info.pixel_format_bpp; frame_decode->block_data = malloc(frame_size); frame_decode->pixel_data = NULL; - hr = IStream_Seek(This->stream, seek, SEEK_SET, NULL); + hr = IStream_Seek(This->stream, seek, STREAM_SEEK_SET, NULL); if (hr != S_OK) goto end; hr = IStream_Read(This->stream, frame_decode->block_data, frame_size, &bytesread); if (hr != S_OK || bytesread != frame_size) { @@ -1470,7 +1470,7 @@ static HRESULT WINAPI DdsDecoder_Wine_Initialize(IWICWineDecoder *iface, IStream }
seek.QuadPart = 0; - hr = IStream_Seek(stream, seek, SEEK_SET, NULL); + hr = IStream_Seek(stream, seek, STREAM_SEEK_SET, NULL); if (FAILED(hr)) goto end;
hr = IStream_Read(stream, &magic, sizeof(magic), &bytesread);
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d2d1/factory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c index 954d90efc0e..d4e17057686 100644 --- a/dlls/d2d1/factory.c +++ b/dlls/d2d1/factory.c @@ -1070,7 +1070,7 @@ static HRESULT d2d_factory_register_effect_from_string(struct d2d_factory *facto
size = sizeof(*property_xml) * (wcslen(property_xml) + 1); if (SUCCEEDED(hr = IStream_Write(stream, property_xml, size, NULL))) - hr = IStream_Seek(stream, zero, SEEK_SET, NULL); + hr = IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
if (SUCCEEDED(hr)) hr = d2d_factory_register_effect_from_stream(factory, effect_id, stream, bindings,
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dmloader/loaderstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dmloader/loaderstream.c b/dlls/dmloader/loaderstream.c index 80e9f91e77a..ac926126d4a 100644 --- a/dlls/dmloader/loaderstream.c +++ b/dlls/dmloader/loaderstream.c @@ -408,7 +408,7 @@ static HRESULT WINAPI file_stream_Clone(IStream *iface, IStream **ret_iface) { LARGE_INTEGER position = {0}; position.LowPart = SetFilePointer(This->file, 0, NULL, SEEK_CUR); - hr = IStream_Seek(*ret_iface, position, SEEK_SET, NULL); + hr = IStream_Seek(*ret_iface, position, STREAM_SEEK_SET, NULL); }
return hr;
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/kernel32/tests/file.c | 34 +++++++++++++++++----------------- dlls/kernel32/tests/loader.c | 10 +++++----- 2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index c57edebb316..b651fc1a1ba 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -6121,7 +6121,7 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(!file_size.QuadPart, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 2, NULL, SEEK_SET); + SetFilePointer(file, 2, NULL, FILE_BEGIN);
ret = GetFileSizeEx(file, &file_size); ok(ret, "failed to get size, error %lu\n", GetLastError()); @@ -6133,7 +6133,7 @@ static void test_eof(void) ok(!size, "got size %lu\n", size); ok(GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError());
- SetFilePointer(file, 2, NULL, SEEK_SET); + SetFilePointer(file, 2, NULL, FILE_BEGIN);
SetLastError(0xdeadbeef); size = 0xdeadbeef; @@ -6146,7 +6146,7 @@ static void test_eof(void) "got status %#lx\n", (NTSTATUS)overlapped.Internal); ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
- SetFilePointer(file, 2, NULL, SEEK_SET); + SetFilePointer(file, 2, NULL, FILE_BEGIN);
ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError()); @@ -6163,7 +6163,7 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 4, NULL, SEEK_SET); + SetFilePointer(file, 4, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError());
@@ -6171,13 +6171,13 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 4, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 0, NULL, SEEK_SET); + SetFilePointer(file, 0, NULL, FILE_BEGIN); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); ok(ret, "failed to read, error %lu\n", GetLastError()); ok(size == 4, "got size %lu\n", size); ok(!memcmp(buffer, "\0\0da", 4), "wrong data\n");
- SetFilePointer(file, 6, NULL, SEEK_SET); + SetFilePointer(file, 6, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError());
@@ -6185,7 +6185,7 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 0, NULL, SEEK_SET); + SetFilePointer(file, 0, NULL, FILE_BEGIN); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); ok(ret, "failed to read, error %lu\n", GetLastError()); ok(size == 6, "got size %lu\n", size); @@ -6194,7 +6194,7 @@ static void test_eof(void) ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError());
- SetFilePointer(file, 2, NULL, SEEK_SET); + SetFilePointer(file, 2, NULL, FILE_BEGIN); ret = WriteFile(file, "data", 4, &size, NULL); ok(ret, "failed to write, error %lu\n", GetLastError()); ok(size == 4, "got size %lu\n", size); @@ -6203,7 +6203,7 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 0, NULL, SEEK_SET); + SetFilePointer(file, 0, NULL, FILE_BEGIN); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); ok(ret, "failed to read, error %lu\n", GetLastError()); ok(size == 6, "got size %lu\n", size); @@ -6218,14 +6218,14 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 6, NULL, SEEK_SET); + SetFilePointer(file, 6, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 8, NULL, SEEK_SET); + SetFilePointer(file, 8, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); @@ -6233,7 +6233,7 @@ static void test_eof(void) ok(file_size.QuadPart == 8, "got size %I64d\n", file_size.QuadPart);
SetLastError(0xdeadbeef); - SetFilePointer(file, 6, NULL, SEEK_SET); + SetFilePointer(file, 6, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(!ret, "expected failure\n"); ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %lu\n", GetLastError()); @@ -6241,14 +6241,14 @@ static void test_eof(void) ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 8, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 8192, NULL, SEEK_SET); + SetFilePointer(file, 8192, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 8192, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 8191, NULL, SEEK_SET); + SetFilePointer(file, 8191, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(!ret, "expected failure\n"); ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %lu\n", GetLastError()); @@ -6261,14 +6261,14 @@ static void test_eof(void)
CloseHandle(mapping);
- SetFilePointer(file, 16384, NULL, SEEK_SET); + SetFilePointer(file, 16384, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 16384, "got size %I64d\n", file_size.QuadPart);
- SetFilePointer(file, 16383, NULL, SEEK_SET); + SetFilePointer(file, 16383, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(!ret, "expected failure\n"); ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %lu\n", GetLastError()); @@ -6279,7 +6279,7 @@ static void test_eof(void) ret = UnmapViewOfFile(view); ok(ret, "failed to unmap view, error %lu\n", GetLastError());
- SetFilePointer(file, 6, NULL, SEEK_SET); + SetFilePointer(file, 6, NULL, FILE_BEGIN); ret = SetEndOfFile(file); ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 9b0f8f6bff2..bf52a3b2e77 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -2272,7 +2272,7 @@ static void test_import_resolution(void) WriteFile(hfile, &nt, sizeof(nt), &dummy, NULL); WriteFile(hfile, §ion, sizeof(section), &dummy, NULL);
- SetFilePointer( hfile, section.PointerToRawData, NULL, SEEK_SET ); + SetFilePointer( hfile, section.PointerToRawData, NULL, FILE_BEGIN ); WriteFile(hfile, &data, sizeof(data), &dummy, NULL);
CloseHandle( hfile ); @@ -4300,7 +4300,7 @@ static void test_ResolveDelayLoadedAPI(void) ok(ret, "WriteFile error %ld\n", GetLastError());
/* fill up to delay data */ - SetFilePointer( hfile, nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT].VirtualAddress, NULL, SEEK_SET ); + SetFilePointer( hfile, nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT].VirtualAddress, NULL, FILE_BEGIN );
/* delay data */ idd.Attributes.AllAttributes = 1; @@ -4321,7 +4321,7 @@ static void test_ResolveDelayLoadedAPI(void) ok(ret, "WriteFile error %ld\n", GetLastError());
/* fill up to extended delay data */ - SetFilePointer( hfile, idd.DllNameRVA, NULL, SEEK_SET ); + SetFilePointer( hfile, idd.DllNameRVA, NULL, FILE_BEGIN );
/* extended delay data */ SetLastError(0xdeadbeef); @@ -4336,7 +4336,7 @@ static void test_ResolveDelayLoadedAPI(void) ret = WriteFile(hfile, test_func, sizeof(test_func), &dummy, NULL); ok(ret, "WriteFile error %ld\n", GetLastError());
- SetFilePointer( hfile, idd.ImportAddressTableRVA, NULL, SEEK_SET ); + SetFilePointer( hfile, idd.ImportAddressTableRVA, NULL, FILE_BEGIN );
for (i = 0; i < ARRAY_SIZE(td); i++) { @@ -4369,7 +4369,7 @@ static void test_ResolveDelayLoadedAPI(void) ok(ret, "WriteFile error %ld\n", GetLastError());
/* fill up to eof */ - SetFilePointer( hfile, section.VirtualAddress + section.Misc.VirtualSize, NULL, SEEK_SET ); + SetFilePointer( hfile, section.VirtualAddress + section.Misc.VirtualSize, NULL, FILE_BEGIN ); SetEndOfFile( hfile ); CloseHandle(hfile);
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/wintrust/crypt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c index 3666127ed5b..ad6f264cffb 100644 --- a/dlls/wintrust/crypt.c +++ b/dlls/wintrust/crypt.c @@ -1448,17 +1448,17 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo, pcbSignedDataMsg, pbSignedDataMsg);
/* get basic offset & size info */ - base_offset = SetFilePointer(pSubjectInfo->hFile, 0L, NULL, SEEK_CUR); + base_offset = SetFilePointer(pSubjectInfo->hFile, 0L, NULL, FILE_CURRENT);
- if (SetFilePointer(pSubjectInfo->hFile, 0, NULL, SEEK_END) == INVALID_SET_FILE_POINTER) + if (SetFilePointer(pSubjectInfo->hFile, 0, NULL, FILE_END) == INVALID_SET_FILE_POINTER) { TRACE("seek error\n"); return FALSE; }
- cabsize = SetFilePointer(pSubjectInfo->hFile, 0L, NULL, SEEK_CUR); + cabsize = SetFilePointer(pSubjectInfo->hFile, 0L, NULL, FILE_CURRENT); if ((cabsize == -1) || (base_offset == -1) || - (SetFilePointer(pSubjectInfo->hFile, 0, NULL, SEEK_SET) == INVALID_SET_FILE_POINTER)) + (SetFilePointer(pSubjectInfo->hFile, 0, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)) { TRACE("seek error\n"); return FALSE; @@ -1542,7 +1542,7 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo, return FALSE; }
- SetFilePointer(pSubjectInfo->hFile, base_offset, NULL, SEEK_SET); + SetFilePointer(pSubjectInfo->hFile, base_offset, NULL, FILE_BEGIN); if (!pbSignedDataMsg) { *pcbSignedDataMsg = cert_size; @@ -1554,7 +1554,7 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo, SetLastError(ERROR_INSUFFICIENT_BUFFER); return FALSE; } - if (SetFilePointer(pSubjectInfo->hFile, cert_offset, NULL, SEEK_SET) == INVALID_SET_FILE_POINTER) + if (SetFilePointer(pSubjectInfo->hFile, cert_offset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { ERR("couldn't seek to cert location\n"); return FALSE; @@ -1563,7 +1563,7 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo, NULL) || dwRead != cert_size) { ERR("couldn't read cert\n"); - SetFilePointer(pSubjectInfo->hFile, base_offset, NULL, SEEK_SET); + SetFilePointer(pSubjectInfo->hFile, base_offset, NULL, FILE_BEGIN); return FALSE; } /* The encoding of the files I've seen appears to be in ASN.1 @@ -1572,7 +1572,7 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo, */ *pdwEncodingType = X509_ASN_ENCODING | PKCS_7_ASN_ENCODING; /* Restore base offset */ - SetFilePointer(pSubjectInfo->hFile, base_offset, NULL, SEEK_SET); + SetFilePointer(pSubjectInfo->hFile, base_offset, NULL, FILE_BEGIN); return TRUE; }
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/storage.dll16/storage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/storage.dll16/storage.c b/dlls/storage.dll16/storage.c index 3eb6f228c80..9f1c2f02ebe 100644 --- a/dlls/storage.dll16/storage.c +++ b/dlls/storage.dll16/storage.c @@ -341,7 +341,7 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block) assert(n>=-1); if (str->hf) { if ((SetFilePointer( str->hf, (n+1)*BIGSIZE, NULL, - SEEK_SET ) == INVALID_SET_FILE_POINTER) && GetLastError()) + FILE_BEGIN ) == INVALID_SET_FILE_POINTER) && GetLastError()) { WARN("(%p,%d,%p), seek failed (%ld)\n",str->hf, n, block, GetLastError()); return FALSE; @@ -422,7 +422,7 @@ STORAGE_put_big_block(stream_access16 *str,int n,BYTE *block) assert(n>=-1); if (str->hf) { if ((SetFilePointer( str->hf, (n+1)*BIGSIZE, NULL, - SEEK_SET ) == INVALID_SET_FILE_POINTER) && GetLastError()) + FILE_BEGIN ) == INVALID_SET_FILE_POINTER) && GetLastError()) { WARN("seek failed (%ld)\n",GetLastError()); return FALSE; @@ -738,7 +738,7 @@ STORAGE_init_storage(stream_access16 *str) { DWORD result;
if (str->hf) - SetFilePointer( str->hf, 0, NULL, SEEK_SET ); + SetFilePointer( str->hf, 0, NULL, FILE_BEGIN ); /* block -1 is the storage header */ sth = (struct storage_header*)block; memcpy(sth->magic,STORAGE_magic,8);
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/krnl386.exe16/int25.c | 2 +- dlls/krnl386.exe16/int26.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/krnl386.exe16/int25.c b/dlls/krnl386.exe16/int25.c index d414f27b8e9..f53fd085f5c 100644 --- a/dlls/krnl386.exe16/int25.c +++ b/dlls/krnl386.exe16/int25.c @@ -49,7 +49,7 @@ BOOL DOSVM_RawRead(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL f if (h != INVALID_HANDLE_VALUE) { DWORD r; - SetFilePointer(h, begin * 512, NULL, SEEK_SET ); + SetFilePointer(h, begin * 512, NULL, FILE_BEGIN ); /* FIXME: check errors */ ReadFile(h, dataptr, nr_sect * 512, &r, NULL ); CloseHandle(h); diff --git a/dlls/krnl386.exe16/int26.c b/dlls/krnl386.exe16/int26.c index 9d08c1aeb46..43474ee6006 100644 --- a/dlls/krnl386.exe16/int26.c +++ b/dlls/krnl386.exe16/int26.c @@ -48,7 +48,7 @@ BOOL DOSVM_RawWrite(BYTE drive, DWORD begin, DWORD nr_sect, BYTE *dataptr, BOOL 0, NULL); if (h != INVALID_HANDLE_VALUE) { - SetFilePointer(h, begin * 512, NULL, SEEK_SET ); + SetFilePointer(h, begin * 512, NULL, FILE_BEGIN ); /* FIXME: check errors */ WriteFile( h, dataptr, nr_sect * 512, &w, NULL ); CloseHandle( h );
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/shell32/shell32_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index c739e1723f7..db35a593597 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -80,14 +80,14 @@ static DWORD shgfi_get_exe_type(LPCWSTR szFullPath) * Seek to the start of the file and read the header information. */
- SetFilePointer( hfile, 0, NULL, SEEK_SET ); + SetFilePointer( hfile, 0, NULL, FILE_BEGIN ); ReadFile( hfile, &mz_header, sizeof(mz_header), &len, NULL );
- SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + SetFilePointer( hfile, mz_header.e_lfanew, NULL, FILE_BEGIN ); ReadFile( hfile, magic, sizeof(magic), &len, NULL ); if ( *(DWORD*)magic == IMAGE_NT_SIGNATURE ) { - SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + SetFilePointer( hfile, mz_header.e_lfanew, NULL, FILE_BEGIN ); ReadFile( hfile, &nt, sizeof(nt), &len, NULL ); CloseHandle( hfile ); /* DLL files are not executable and should return 0 */ @@ -104,7 +104,7 @@ static DWORD shgfi_get_exe_type(LPCWSTR szFullPath) else if ( *(WORD*)magic == IMAGE_OS2_SIGNATURE ) { IMAGE_OS2_HEADER ne; - SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + SetFilePointer( hfile, mz_header.e_lfanew, NULL, FILE_BEGIN ); ReadFile( hfile, &ne, sizeof(ne), &len, NULL ); CloseHandle( hfile ); if (ne.ne_exetyp == 2)
From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dmloader/loaderstream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dmloader/loaderstream.c b/dlls/dmloader/loaderstream.c index ac926126d4a..3bfd0b33d58 100644 --- a/dlls/dmloader/loaderstream.c +++ b/dlls/dmloader/loaderstream.c @@ -407,7 +407,7 @@ static HRESULT WINAPI file_stream_Clone(IStream *iface, IStream **ret_iface) if (SUCCEEDED(hr = file_stream_create(This->path, ret_iface))) { LARGE_INTEGER position = {0}; - position.LowPart = SetFilePointer(This->file, 0, NULL, SEEK_CUR); + position.LowPart = SetFilePointer(This->file, 0, NULL, FILE_CURRENT); hr = IStream_Seek(*ret_iface, position, STREAM_SEEK_SET, NULL); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150322
Your paranoid android.
=== w10pro64_en_AE_u8 (32 bit report) ===
kernel32: loader.c:2025: Test failed: CreateProcess() error 1455 loader.c:2028: Test failed: ProcessBasicInformation got c0000008 loader.c:2030: Test failed: ReadProcessMemory failed err 6 loader.c:2035: Test failed: 21: VirtualQuery error 6 loader.c:2037: Test failed: 21: got 74C91000 != expected 10001000 loader.c:2040: Test failed: 21: 74C90000 != 10000000 loader.c:2048: Test failed: ReadProcessMemory() error 6 loader.c:2054: Test failed: Got unexpected status 0xc0000008. loader.c:2058: Test failed: Got unexpected status 0xc0000008. loader.c:2061: Test failed: Got unexpected status 0xc0000008. loader.c:2067: Test failed: TerminateProcess() error 6 loader.c:2069: Test failed: WaitForSingleObject failed: ffffffff loader.c:2025: Test failed: CreateProcess() error 1455 loader.c:2028: Test failed: ProcessBasicInformation got c0000008 loader.c:2030: Test failed: ReadProcessMemory failed err 6 loader.c:2035: Test failed: 22: VirtualQuery error 6 loader.c:2037: Test failed: 22: got 74C91000 != expected 10001000 loader.c:2039: Test failed: 22: got 0x40 != expected 0x80 loader.c:2040: Test failed: 22: 74C90000 != 10000000 loader.c:2048: Test failed: ReadProcessMemory() error 6 loader.c:2054: Test failed: Got unexpected status 0xc0000008. loader.c:2058: Test failed: Got unexpected status 0xc0000008. loader.c:2061: Test failed: Got unexpected status 0xc0000008. loader.c:2067: Test failed: TerminateProcess() error 6 loader.c:2069: Test failed: WaitForSingleObject failed: ffffffff loader.c:2342: Test failed: 3: tls init function didn't run or got wrong reason: 9999 instead of 3 loader.c:2382: Test failed: 4: NtMapViewOfSection failed c000012d 235c:loader: unhandled exception c0000005 at 002E4D88
=== debian11b (64 bit WoW report) ===
user32: win.c:4070: Test failed: Expected active window 00000000028A014C, got 000000000042015C. win.c:4071: Test failed: Expected focus window 00000000028A014C, got 000000000042015C.
This merge request was approved by Esme Povirk.
This merge request was approved by Michael Stefaniuc.