winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
811 discussions
Start a n
N
ew thread
Bernhard Reiter : imagehlp: Partially implement BindImageEx().
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: f40379a9d1762de99f6b6f624c6f57a90be648d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f40379a9d1762de99f6b6f62…
Author: Bernhard Reiter <ockham(a)raz.or.at> Date: Sat Feb 13 11:30:11 2021 -0600 imagehlp: Partially implement BindImageEx(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=3591
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d129a89d228190baeb8983ecfc18e093255148b9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/imagehlp/modify.c | 91 +++++++++++++++++++++++++++++++++++++++++---- dlls/imagehlp/tests/image.c | 10 ++--- 2 files changed, 88 insertions(+), 13 deletions(-) diff --git a/dlls/imagehlp/modify.c b/dlls/imagehlp/modify.c index 434a666ae94..d740d221bfc 100644 --- a/dlls/imagehlp/modify.c +++ b/dlls/imagehlp/modify.c @@ -44,15 +44,90 @@ BOOL WINAPI BindImage( /*********************************************************************** * BindImageEx (IMAGEHLP.@) */ -BOOL WINAPI BindImageEx( - DWORD Flags, PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath, - PIMAGEHLP_STATUS_ROUTINE StatusRoutine) +BOOL WINAPI BindImageEx(DWORD flags, const char *module, const char *dll_path, + const char *symbol_path, PIMAGEHLP_STATUS_ROUTINE cb) { - FIXME("(%d, %s, %s, %s, %p): stub\n", - Flags, debugstr_a(ImageName), debugstr_a(DllPath), - debugstr_a(SymbolPath), StatusRoutine - ); - return TRUE; + const IMAGE_IMPORT_DESCRIPTOR *import; + LOADED_IMAGE image; + ULONG size; + + TRACE("flags %#x, module %s, dll_path %s, symbol_path %s, cb %p.\n", + flags, debugstr_a(module), debugstr_a(dll_path), debugstr_a(symbol_path), cb); + + if (!(flags & BIND_NO_UPDATE)) + FIXME("Image modification is not implemented.\n"); + if (flags & ~BIND_NO_UPDATE) + FIXME("Ignoring flags %#x.\n", flags); + + if (!MapAndLoad(module, dll_path, &image, TRUE, TRUE)) + return FALSE; + + if (!(import = ImageDirectoryEntryToData(image.MappedAddress, FALSE, IMAGE_DIRECTORY_ENTRY_IMPORT, &size))) + { + UnMapAndLoad(&image); + return TRUE; /* no imports */ + } + + if (image.FileHeader->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR_MAGIC) + { + FIXME("Unhandled architecture %#x.\n", image.FileHeader->OptionalHeader.Magic); + UnMapAndLoad(&image); + return TRUE; + } + + for (; import->Name && import->FirstThunk; ++import) + { + char full_path[MAX_PATH]; + IMAGE_THUNK_DATA *thunk; + const char *dll_name; + DWORD thunk_rva; + + if (!(dll_name = ImageRvaToVa(image.FileHeader, image.MappedAddress, import->Name, 0))) + { + ERR("Failed to get VA for import name RVA %#x.\n", import->Name); + continue; + } + + if (cb) cb(BindImportModule, module, dll_name, 0, 0); + + if (!SearchPathA(dll_path, dll_name, 0, sizeof(full_path), full_path, 0)) + { + ERR("Import %s was not found.\n", debugstr_a(dll_path)); + continue; + } + + thunk_rva = import->OriginalFirstThunk ? import->OriginalFirstThunk : import->FirstThunk; + if (!(thunk = ImageRvaToVa(image.FileHeader, image.MappedAddress, thunk_rva, 0))) + { + ERR("Failed to get VA for import thunk RVA %#x.\n", thunk_rva); + continue; + } + + for (; thunk->u1.Ordinal; ++thunk) + { + if (IMAGE_SNAP_BY_ORDINAL(thunk->u1.Ordinal)) + { + /* FIXME: We apparently need to subtract the actual module's + * ordinal base. */ + FIXME("Ordinal imports are not implemented.\n"); + } + else + { + IMAGE_IMPORT_BY_NAME *name; + + if (!(name = ImageRvaToVa(image.FileHeader, image.MappedAddress, thunk->u1.AddressOfData, 0))) + { + ERR("Failed to get VA for name RVA %#x.\n", thunk->u1.AddressOfData); + continue; + } + + if (cb) cb(BindImportProcedure, module, full_path, 0, (ULONG_PTR)name->Name); + } + } + } + + UnMapAndLoad(&image); + return TRUE; } diff --git a/dlls/imagehlp/tests/image.c b/dlls/imagehlp/tests/image.c index 888744ac203..e2aa9485510 100644 --- a/dlls/imagehlp/tests/image.c +++ b/dlls/imagehlp/tests/image.c @@ -372,7 +372,7 @@ static BOOL WINAPI bind_image_cb(IMAGEHLP_STATUS_REASON reason, const char *file char full_path[MAX_PATH]; BOOL ret; - ok(!!va, "expected nonzero VA\n"); + todo_wine ok(!!va, "expected nonzero VA\n"); ret = SearchPathA(NULL, last_module, ".dll", sizeof(full_path), full_path, NULL); ok(ret, "got error %u\n", GetLastError()); ok(!strcmp(module, full_path), "expected %s, got %s\n", debugstr_a(full_path), debugstr_a(module)); @@ -408,15 +408,15 @@ static void test_bind_image_ex(void) SetLastError(0xdeadbeef); ret = BindImageEx(BIND_ALL_IMAGES | BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE, "nonexistent.dll", 0, 0, bind_image_cb); - todo_wine ok(!ret, "expected failure\n"); - todo_wine ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, + ok(!ret, "expected failure\n"); + ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); ret = BindImageEx(BIND_ALL_IMAGES | BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE, filename, NULL, NULL, bind_image_cb); ok(ret, "got error %u\n", GetLastError()); - todo_wine ok(got_SysAllocString == 1, "got %u imports of SysAllocString\n", got_SysAllocString); - todo_wine ok(got_GetOpenFileNameA == 1, "got %u imports of GetOpenFileNameA\n", got_GetOpenFileNameA); + ok(got_SysAllocString == 1, "got %u imports of SysAllocString\n", got_SysAllocString); + ok(got_GetOpenFileNameA == 1, "got %u imports of GetOpenFileNameA\n", got_GetOpenFileNameA); todo_wine ok(got_SHRegGetIntW == 1, "got %u imports of SHRegGetIntW\n", got_SHRegGetIntW); ret = DeleteFileA(filename);
1
0
0
0
Zebediah Figura : imagehlp/tests: Rewrite test_bind_image_ex() using a DLL resource.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: fd59214adff7b4bfa0b4e35105cba333fb37d153 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fd59214adff7b4bfa0b4e351…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Feb 13 11:30:10 2021 -0600 imagehlp/tests: Rewrite test_bind_image_ex() using a DLL resource. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 4782b08f31d967243014cff14dd41611edabcea6) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/imagehlp/tests/Makefile.in | 8 +- dlls/imagehlp/tests/image.c | 163 +++++++++++++++++++++------------------ dlls/imagehlp/tests/testdll.c | 30 +++++++ dlls/imagehlp/tests/testdll.spec | 2 + 4 files changed, 127 insertions(+), 76 deletions(-) diff --git a/dlls/imagehlp/tests/Makefile.in b/dlls/imagehlp/tests/Makefile.in index 43b434f690a..1a5c393add5 100644 --- a/dlls/imagehlp/tests/Makefile.in +++ b/dlls/imagehlp/tests/Makefile.in @@ -1,6 +1,10 @@ TESTDLL = imagehlp.dll IMPORTS = imagehlp psapi -C_SRCS = \ +testdll_IMPORTS = oleaut32 comdlg32 shlwapi + +SOURCES = \ image.c \ - integrity.c + integrity.c \ + testdll.c \ + testdll.spec diff --git a/dlls/imagehlp/tests/image.c b/dlls/imagehlp/tests/image.c index c8d1a520c96..888744ac203 100644 --- a/dlls/imagehlp/tests/image.c +++ b/dlls/imagehlp/tests/image.c @@ -24,10 +24,36 @@ #include <winbase.h> #include <winver.h> #include <winnt.h> +#include <winuser.h> #include <imagehlp.h> #include "wine/test.h" +static char *load_resource(const char *name) +{ + static char path[MAX_PATH]; + DWORD written; + HANDLE file; + HRSRC res; + void *ptr; + + GetTempPathA(ARRAY_SIZE(path), path); + strcat(path, name); + + file = CreateFileA(path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", + debugstr_a(path), GetLastError()); + + res = FindResourceA(NULL, name, "TESTDLL"); + ok(!!res, "Failed to load resource, error %u.\n", GetLastError()); + ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); + WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL); + ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n"); + CloseHandle(file); + + return path; +} + /* minimal PE file image */ #define VA_START 0x400000 #define FILE_PE_START 0x50 @@ -145,9 +171,6 @@ struct expected_update_accum BOOL todo; }; -static int status_routine_called[BindSymbolsNotUpdated+1]; - - static BOOL WINAPI accumulating_stream_output(DIGEST_HANDLE handle, BYTE *pb, DWORD cb) { @@ -270,40 +293,6 @@ static void update_checksum(void) bin.nt_headers.OptionalHeader.CheckSum = sum; } -static BOOL CALLBACK testing_status_routine(IMAGEHLP_STATUS_REASON reason, const char *ImageName, - const char *DllName, ULONG_PTR Va, ULONG_PTR Parameter) -{ - char kernel32_path[MAX_PATH]; - - if (0 <= (int)reason && reason <= BindSymbolsNotUpdated) - status_routine_called[reason]++; - else - ok(0, "expected reason between 0 and %d, got %d\n", BindSymbolsNotUpdated+1, reason); - - switch(reason) - { - case BindImportModule: - ok(!strcmp(DllName, "KERNEL32.DLL"), "expected DllName to be KERNEL32.DLL, got %s\n", - DllName); - break; - - case BindImportProcedure: - case BindForwarderNOT: - GetSystemDirectoryA(kernel32_path, MAX_PATH); - strcat(kernel32_path, "\\KERNEL32.DLL"); - ok(!lstrcmpiA(DllName, kernel32_path), "expected DllName to be %s, got %s\n", - kernel32_path, DllName); - ok(!strcmp((char *)Parameter, "ExitProcess"), - "expected Parameter to be ExitProcess, got %s\n", (char *)Parameter); - break; - - default: - ok(0, "got unexpected reason %d\n", reason); - break; - } - return TRUE; -} - static void test_get_digest_stream(void) { BOOL ret; @@ -360,52 +349,78 @@ static void test_get_digest_stream(void) DeleteFileA(temp_file); } -static void test_bind_image_ex(void) +static unsigned int got_SysAllocString, got_GetOpenFileNameA, got_SHRegGetIntW; + +static BOOL WINAPI bind_image_cb(IMAGEHLP_STATUS_REASON reason, const char *file, + const char *module, ULONG_PTR va, ULONG_PTR param) { - BOOL ret; - HANDLE file; - char temp_file[MAX_PATH]; - DWORD count; + static char last_module[MAX_PATH]; - /* call with a non-existent file */ - SetLastError(0xdeadbeef); - ret = BindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, "nonexistent.dll", 0, 0, - testing_status_routine); - todo_wine ok(!ret && ((GetLastError() == ERROR_FILE_NOT_FOUND) || - (GetLastError() == ERROR_INVALID_PARAMETER)), - "expected ERROR_FILE_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", - GetLastError()); + if (winetest_debug > 1) + trace("reason %u, file %s, module %s, va %#Ix, param %#Ix\n", + reason, debugstr_a(file), debugstr_a(module), va, param); - file = create_temp_file(temp_file); - if (file == INVALID_HANDLE_VALUE) + if (reason == BindImportModule) { - skip("couldn't create temp file\n"); - return; + ok(!strchr(module, '\\'), "got module name %s\n", debugstr_a(module)); + strcpy(last_module, module); + ok(!va, "got VA %#Ix\n", va); + ok(!param, "got param %#Ix\n", param); } + else if (reason == BindImportProcedure) + { + char full_path[MAX_PATH]; + BOOL ret; - WriteFile(file, &bin, sizeof(bin), &count, NULL); - CloseHandle(file); - - /* call with a proper PE file, but with StatusRoutine set to NULL */ - ret = BindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, temp_file, 0, 0, - NULL); - ok(ret, "BindImageEx failed: %d\n", GetLastError()); - - /* call with a proper PE file and StatusRoutine */ - ret = BindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, temp_file, 0, 0, - testing_status_routine); - ok(ret, "BindImageEx failed: %d\n", GetLastError()); + ok(!!va, "expected nonzero VA\n"); + ret = SearchPathA(NULL, last_module, ".dll", sizeof(full_path), full_path, NULL); + ok(ret, "got error %u\n", GetLastError()); + ok(!strcmp(module, full_path), "expected %s, got %s\n", debugstr_a(full_path), debugstr_a(module)); - todo_wine ok(status_routine_called[BindImportModule] == 1, - "StatusRoutine was called %d times\n", status_routine_called[BindImportModule]); + if (!strcmp((const char *)param, "SysAllocString")) + { + ok(!strcmp(last_module, "oleaut32.dll"), "got wrong module %s\n", debugstr_a(module)); + ++got_SysAllocString; + } + else if (!strcmp((const char *)param, "GetOpenFileNameA")) + { + ok(!strcmp(last_module, "comdlg32.dll"), "got wrong module %s\n", debugstr_a(module)); + ++got_GetOpenFileNameA; + } + else if (!strcmp((const char *)param, "Ordinal117")) + { + ok(!strcmp(last_module, "shlwapi.dll"), "got wrong module %s\n", debugstr_a(module)); + ++got_SHRegGetIntW; + } + } + else + { + ok(0, "got unexpected reason %#x\n", reason); + } + return TRUE; +} - todo_wine ok((status_routine_called[BindImportProcedure] == 1) -#if defined(_WIN64) - || broken(status_routine_called[BindImportProcedure] == 0) /* < Win8 */ -#endif - , "StatusRoutine was called %d times\n", status_routine_called[BindImportProcedure]); +static void test_bind_image_ex(void) +{ + const char *filename = load_resource("testdll.dll"); + BOOL ret; - DeleteFileA(temp_file); + SetLastError(0xdeadbeef); + ret = BindImageEx(BIND_ALL_IMAGES | BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE, + "nonexistent.dll", 0, 0, bind_image_cb); + todo_wine ok(!ret, "expected failure\n"); + todo_wine ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, + "got error %u\n", GetLastError()); + + ret = BindImageEx(BIND_ALL_IMAGES | BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE, + filename, NULL, NULL, bind_image_cb); + ok(ret, "got error %u\n", GetLastError()); + todo_wine ok(got_SysAllocString == 1, "got %u imports of SysAllocString\n", got_SysAllocString); + todo_wine ok(got_GetOpenFileNameA == 1, "got %u imports of GetOpenFileNameA\n", got_GetOpenFileNameA); + todo_wine ok(got_SHRegGetIntW == 1, "got %u imports of SHRegGetIntW\n", got_SHRegGetIntW); + + ret = DeleteFileA(filename); + ok(ret, "got error %u\n", GetLastError()); } static void test_image_load(void) diff --git a/dlls/imagehlp/tests/testdll.c b/dlls/imagehlp/tests/testdll.c new file mode 100644 index 00000000000..3c079bfffd3 --- /dev/null +++ b/dlls/imagehlp/tests/testdll.c @@ -0,0 +1,30 @@ +/* + * Copyright 2021 Zebediah Figura + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <oaidl.h> +#include <commdlg.h> +#include <shlwapi.h> + +extern DWORD WINAPI StrCmpCA(const char *, const char *); + +void export(void) +{ + SysAllocString(NULL); + GetOpenFileNameA(NULL); + SHRegGetIntW(NULL, NULL, 0); +} diff --git a/dlls/imagehlp/tests/testdll.spec b/dlls/imagehlp/tests/testdll.spec new file mode 100644 index 00000000000..7d5774e346b --- /dev/null +++ b/dlls/imagehlp/tests/testdll.spec @@ -0,0 +1,2 @@ +@ cdecl export() +@ stdcall VariantInit(ptr) oleaut32.VariantInit
1
0
0
0
Zebediah Figura : imagehlp/tests: Link directly to imagehlp and psapi.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: a0452ee0bc2fb54f5b369f8b37aded0d175f9c33 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a0452ee0bc2fb54f5b369f8b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Feb 13 11:30:08 2021 -0600 imagehlp/tests: Link directly to imagehlp and psapi. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 670913af218ce8229eea646534261a33a9ff1b1a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/imagehlp/tests/Makefile.in | 1 + dlls/imagehlp/tests/image.c | 67 ++++++------------------------- dlls/imagehlp/tests/integrity.c | 88 +++++++++++------------------------------ 3 files changed, 35 insertions(+), 121 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a0452ee0bc2fb54f5b36…
1
0
0
0
Hans Leidekker : wbemprox: Fix Windows 8/8.1 caption.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: f7c5cb04ba8218160b254339269b727cf897805b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f7c5cb04ba8218160b254339…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Feb 3 10:32:32 2021 +0100 wbemprox: Fix Windows 8/8.1 caption. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50610
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit bdba6037d01acce3cd1ea299a8859f3b99d4f520) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wbemprox/builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index f1cf75ab380..b86326327fb 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -3436,8 +3436,8 @@ static WCHAR *get_oscaption( OSVERSIONINFOEXW *ver ) if (!(ret = heap_alloc( len * sizeof(WCHAR) + sizeof(win2003W) ))) return NULL; memcpy( ret, windowsW, sizeof(windowsW) ); if (ver->dwMajorVersion == 10 && ver->dwMinorVersion == 0) memcpy( ret + len, win10W, sizeof(win10W) ); - else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 3) memcpy( ret + len, win8W, sizeof(win8W) ); - else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 2) memcpy( ret + len, win81W, sizeof(win81W) ); + else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 3) memcpy( ret + len, win81W, sizeof(win81W) ); + else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 2) memcpy( ret + len, win8W, sizeof(win8W) ); else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 1) { if (ver->wProductType == VER_NT_WORKSTATION) memcpy( ret + len, win7W, sizeof(win7W) );
1
0
0
0
Roman Pišl : conhost: Improve notification when resizing window.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: 88a189f96403db4687d7ff191cbeccc86cc294ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=88a189f96403db4687d7ff19…
Author: Roman Pišl <rpisl(a)seznam.cz> Date: Mon Feb 1 18:29:16 2021 +0100 conhost: Improve notification when resizing window. Signed-off-by: Roman Pišl <rpisl(a)seznam.cz> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2ca86d3b597c6a16988468ee83ff9f2abf0c2571) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/conhost/conhost.c | 21 +++++++++++++-------- programs/conhost/conhost.h | 2 ++ programs/conhost/window.c | 2 ++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index 0ac1c5f507b..dd22636be6a 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -1735,6 +1735,18 @@ static NTSTATUS get_output_info( struct screen_buffer *screen_buffer, size_t *ou return STATUS_SUCCESS; } +void notify_screen_buffer_size( struct screen_buffer *screen_buffer ) +{ + if (is_active( screen_buffer ) && screen_buffer->console->mode & ENABLE_WINDOW_INPUT) + { + INPUT_RECORD ir; + ir.EventType = WINDOW_BUFFER_SIZE_EVENT; + ir.Event.WindowBufferSizeEvent.dwSize.X = screen_buffer->width; + ir.Event.WindowBufferSizeEvent.dwSize.Y = screen_buffer->height; + write_console_input( screen_buffer->console, &ir, 1, TRUE ); + } +} + NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height ) { int i, old_width, old_height, copy_width, copy_height; @@ -1839,14 +1851,7 @@ static NTSTATUS set_output_info( struct screen_buffer *screen_buffer, if (screen_buffer->cursor_x >= info->width) screen_buffer->cursor_x = info->width - 1; if (screen_buffer->cursor_y >= info->height) screen_buffer->cursor_y = info->height - 1; - if (is_active( screen_buffer ) && screen_buffer->console->mode & ENABLE_WINDOW_INPUT) - { - INPUT_RECORD ir; - ir.EventType = WINDOW_BUFFER_SIZE_EVENT; - ir.Event.WindowBufferSizeEvent.dwSize.X = info->width; - ir.Event.WindowBufferSizeEvent.dwSize.Y = info->height; - write_console_input( screen_buffer->console, &ir, 1, TRUE ); - } + notify_screen_buffer_size( screen_buffer ); } if (params->mask & SET_CONSOLE_OUTPUT_INFO_ATTR) { diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h index 3094fd6e5f0..6f3985352e2 100644 --- a/programs/conhost/conhost.h +++ b/programs/conhost/conhost.h @@ -136,6 +136,8 @@ void update_window_config( struct console *console ); NTSTATUS write_console_input( struct console *console, const INPUT_RECORD *records, unsigned int count, BOOL flush ); + +void notify_screen_buffer_size( struct screen_buffer *screen_buffer ); NTSTATUS change_screen_buffer_size( struct screen_buffer *screen_buffer, int new_width, int new_height ); static inline void empty_update_rect( struct screen_buffer *screen_buffer, RECT *rect ) diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 5e94a1d454e..01917ee8b67 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -1901,6 +1901,8 @@ static void apply_config( struct console *console, const struct console_config * } update_window( console ); + + notify_screen_buffer_size( console->active ); } static void current_config( struct console *console, struct console_config *config )
1
0
0
0
Roman Pišl : conhost: Fix copy-paste error when setting windows size.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: 9dff1027d550783186dcfa027bfb6c08faad2a97 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9dff1027d550783186dcfa02…
Author: Roman Pišl <rpisl(a)seznam.cz> Date: Mon Feb 1 18:29:15 2021 +0100 conhost: Fix copy-paste error when setting windows size. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50602
Signed-off-by: Roman Pišl <rpisl(a)seznam.cz> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 361b4c381e7a94e5a2ef25e7dca77440dd983444) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- programs/conhost/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 55690377a7e..5e94a1d454e 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -1885,7 +1885,7 @@ static void apply_config( struct console *console, const struct console_config * console->active->attr = config->attr; console->active->popup_attr = config->popup_attr; console->active->win.left = config->win_pos.X; - console->active->win.right = config->win_pos.Y; + console->active->win.top = config->win_pos.Y; console->active->win.right = config->win_pos.X + config->win_width - 1; console->active->win.bottom = config->win_pos.Y + config->win_height - 1; memcpy( console->active->color_map, config->color_map, sizeof(config->color_map) );
1
0
0
0
Austin English : ntoskrnl.exe: Add KdDisableDebugger/KdEnableDebugger stubs.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: d81c2f2fa7d9d326a43db6ee76637cd2c404532d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d81c2f2fa7d9d326a43db6ee…
Author: Austin English <austinenglish(a)gmail.com> Date: Mon Feb 1 15:25:41 2021 -0600 ntoskrnl.exe: Add KdDisableDebugger/KdEnableDebugger stubs. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50599
Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit e8cb99466b053e4fb2c720cb56bf7ba1d4e4a4d1) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 12 ++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 2e6131c32c7..9dc5809614a 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -4256,6 +4256,18 @@ void WINAPI KeUnstackDetachProcess(KAPC_STATE *apc_state) FIXME("apc_state %p stub.\n", apc_state); } +NTSTATUS WINAPI KdDisableDebugger(void) +{ + FIXME(": stub.\n"); + return STATUS_DEBUGGER_INACTIVE; +} + +NTSTATUS WINAPI KdEnableDebugger(void) +{ + FIXME(": stub.\n"); + return STATUS_DEBUGGER_INACTIVE; +} + /***************************************************** * DllMain */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index d57a2f81df6..22968913300 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -515,8 +515,8 @@ @ stub IoWriteTransferCount @ extern KdDebuggerEnabled @ stub KdDebuggerNotPresent -@ stub KdDisableDebugger -@ stub KdEnableDebugger +@ stdcall KdDisableDebugger() +@ stdcall KdEnableDebugger() @ stub KdEnteredDebugger @ stub KdPollBreakIn @ stub KdPowerTransition
1
0
0
0
Hans Leidekker : wbemprox: Report the real OS version.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: 18ab8254e98dc05cb60396c381ae383373bb808e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18ab8254e98dc05cb60396c3…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Feb 2 14:25:20 2021 +0100 wbemprox: Report the real OS version. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50580
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit ba06f7a541c44343a9751cc6105211c1ef058c49) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/wbemprox/builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 9ae34a50c0d..f1cf75ab380 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -3514,13 +3514,13 @@ static enum fill_status fill_operatingsystem( struct table *table, const struct { struct record_operatingsystem *rec; enum fill_status status = FILL_STATUS_UNFILTERED; - OSVERSIONINFOEXW ver; + RTL_OSVERSIONINFOEXW ver; UINT row = 0; if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; ver.dwOSVersionInfoSize = sizeof(ver); - GetVersionExW( (OSVERSIONINFOW *)&ver ); + RtlGetVersion( &ver ); rec = (struct record_operatingsystem *)table->data; rec->buildnumber = get_osbuildnumber( &ver );
1
0
0
0
Henri Verbeet : wined3d: Allow resource copies between block-compatible formats.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: dff027f211f1df5010fef3edf622b43c4720de94 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dff027f211f1df5010fef3ed…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Feb 10 00:24:02 2021 +0100 wined3d: Allow resource copies between block-compatible formats. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 02385a4042daf096a6ca693e74e6bc9043e3ae5e) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 10 ++--- dlls/wined3d/device.c | 24 ++++++++++-- dlls/wined3d/utils.c | 83 ++++++++++++++++++++++++++---------------- dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 76 insertions(+), 42 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=dff027f211f1df5010fe…
1
0
0
0
Henri Verbeet : d3d11/tests: Add format compatibility tests for DXGI_FORMAT_R9G9B9E5_SHAREDEXP.
by Alexandre Julliard
07 Jun '21
07 Jun '21
Module: wine Branch: stable Commit: c760f6b9de0224e0ca778cd29dd3e4e926880023 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c760f6b9de0224e0ca778cd2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Feb 10 00:23:58 2021 +0100 d3d11/tests: Add format compatibility tests for DXGI_FORMAT_R9G9B9E5_SHAREDEXP. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 70c09cd89d7b6c181dcef4ad35f49f13ee429ac6) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 9fc09a5ec83..1fbc91bb5e1 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -26557,6 +26557,13 @@ static void test_format_compatibility(void) {DXGI_FORMAT_R16G16_SNORM, DXGI_FORMAT_R16G16_SINT, 4, TRUE}, {DXGI_FORMAT_R16G16_SINT, DXGI_FORMAT_R16G16_TYPELESS, 4, TRUE}, {DXGI_FORMAT_R16G16_TYPELESS, DXGI_FORMAT_R32_TYPELESS, 4, FALSE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_R32_TYPELESS, 4, TRUE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_R32_FLOAT, 4, TRUE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_R32_UINT, 4, TRUE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_R32_SINT, 4, TRUE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_R8G8B8A8_TYPELESS, 4, FALSE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_B8G8R8A8_TYPELESS, 4, FALSE}, + {DXGI_FORMAT_R9G9B9E5_SHAREDEXP, DXGI_FORMAT_R16G16_TYPELESS, 4, FALSE}, {DXGI_FORMAT_R32G32_TYPELESS, DXGI_FORMAT_R32G32_FLOAT, 8, TRUE}, {DXGI_FORMAT_R32G32_FLOAT, DXGI_FORMAT_R32G32_UINT, 8, TRUE}, {DXGI_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_SINT, 8, TRUE}, @@ -26590,6 +26597,7 @@ static void test_format_compatibility(void) for (i = 0; i < ARRAY_SIZE(test_data); ++i) { unsigned int x, y, texel_dwords; + BOOL broken = FALSE; D3D11_BOX box; texture_desc.Width = sizeof(bitmap_data) / (texture_desc.Height * test_data[i].texel_size); @@ -26617,15 +26625,23 @@ static void test_format_compatibility(void) texel_dwords = test_data[i].texel_size / sizeof(DWORD); get_texture_readback(dst_texture, 0, &rb); - for (j = 0; j < ARRAY_SIZE(bitmap_data); ++j) + colour = get_readback_color(&rb, 0, 0, 0); + if (test_data[i].src_format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP && colour == bitmap_data[0]) + { + win_skip("Broken destination offset for %#x -> %#x copy.\n", + test_data[i].src_format, test_data[i].dst_format); + broken = TRUE; + } + for (j = 0; j < ARRAY_SIZE(bitmap_data) && !broken; ++j) { x = j % 4; y = j / 4; colour = get_readback_color(&rb, x, y, 0); expected = test_data[i].success && x >= texel_dwords && y ? bitmap_data[j - (4 + texel_dwords)] : initial_data[j]; - ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", - i, colour, x, y, expected); + todo_wine_if(test_data[i].src_format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP && expected) + ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", + i, colour, x, y, expected); } release_resource_readback(&rb); @@ -26638,8 +26654,9 @@ static void test_format_compatibility(void) y = j / 4; colour = get_readback_color(&rb, x, y, 0); expected = test_data[i].success ? bitmap_data[j] : initial_data[j]; - ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", - i, colour, x, y, expected); + todo_wine_if(test_data[i].src_format == DXGI_FORMAT_R9G9B9E5_SHAREDEXP && expected) + ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", + i, colour, x, y, expected); } release_resource_readback(&rb);
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
82
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Results per page:
10
25
50
100
200