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
April 2020
----- 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
2 participants
1016 discussions
Start a n
N
ew thread
Jacek Caban : makefiles: Remove no longer needed explicit ucrtbase imports.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: af12270ac679315f45a39fe3d70f539fe716055a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af12270ac679315f45a39fe3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 20:05:17 2020 +0200 makefiles: Remove no longer needed explicit ucrtbase imports. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_24/Makefile.in | 2 +- dlls/d3dx9_25/Makefile.in | 2 +- dlls/d3dx9_26/Makefile.in | 2 +- dlls/d3dx9_27/Makefile.in | 2 +- dlls/d3dx9_28/Makefile.in | 2 +- dlls/d3dx9_29/Makefile.in | 2 +- dlls/d3dx9_30/Makefile.in | 2 +- dlls/d3dx9_31/Makefile.in | 2 +- dlls/d3dx9_32/Makefile.in | 2 +- dlls/d3dx9_33/Makefile.in | 2 +- dlls/d3dx9_34/Makefile.in | 2 +- dlls/d3dx9_35/Makefile.in | 2 +- dlls/d3dx9_36/Makefile.in | 2 +- dlls/d3dx9_37/Makefile.in | 2 +- dlls/d3dx9_38/Makefile.in | 2 +- dlls/d3dx9_39/Makefile.in | 2 +- dlls/d3dx9_40/Makefile.in | 2 +- dlls/d3dx9_41/Makefile.in | 2 +- dlls/d3dx9_42/Makefile.in | 2 +- dlls/d3dx9_43/Makefile.in | 2 +- dlls/dsound/Makefile.in | 2 +- dlls/gdiplus/Makefile.in | 2 +- dlls/msvcp140/Makefile.in | 1 - dlls/vbscript/Makefile.in | 2 +- dlls/vcruntime140/Makefile.in | 1 - 25 files changed, 23 insertions(+), 25 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=af12270ac679315f45a3…
1
0
0
0
Jacek Caban : dbghelp: Build with ucrtbase.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: cf6bbb96d0417b0a86d06c4b000592e4c870b5ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cf6bbb96d0417b0a86d06c4b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:43:35 2020 +0200 dbghelp: Build with ucrtbase. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/Makefile.in | 2 ++ dlls/dbghelp/dbghelp_private.h | 1 - dlls/dbghelp/dwarf.c | 4 +-- dlls/dbghelp/elf_module.c | 14 ++++----- dlls/dbghelp/macho_module.c | 20 ++++++------- dlls/dbghelp/module.c | 62 ++++++++++++++++++++-------------------- dlls/dbghelp/path.c | 64 +++++++++++++++++++++--------------------- dlls/dbghelp/pe_module.c | 2 +- dlls/dbghelp/symbol.c | 8 +++--- 9 files changed, 89 insertions(+), 88 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=cf6bbb96d0417b0a86d0…
1
0
0
0
Jacek Caban : dbghelp: Don't use PATH to search for libraries.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 5bc58410f28aefea3c3f41e056a372aff4dceac7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5bc58410f28aefea3c3f41e0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:43:12 2020 +0200 dbghelp: Don't use PATH to search for libraries. It should be used only for the main executable, for which we get full path anyway. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/elf_module.c | 3 +-- dlls/dbghelp/macho_module.c | 10 ++-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 72e9d2124a..a77b034f42 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -1435,8 +1435,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename, load_elf.dyn_addr = dyn_addr; load_elf.elf_info = elf_info; - ret = search_unix_path(filename, getenv("PATH"), elf_load_file_cb, &load_elf) - || search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf) + ret = search_unix_path(filename, getenv("LD_LIBRARY_PATH"), elf_load_file_cb, &load_elf) || search_dll_path(filename, elf_load_file_cb, &load_elf); } diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 4baf444f9e..3249a7ab2a 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1572,15 +1572,9 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam load_params.load_addr = load_addr; load_params.macho_info = macho_info; - /* If has no directories, try PATH first. */ + /* Try DYLD_LIBRARY_PATH first. */ p = file_name(filename); - if (p == filename) - { - ret = search_unix_path(filename, getenv("PATH"), macho_load_file_cb, &load_params); - } - /* Try DYLD_LIBRARY_PATH, with just the filename (no directories). */ - if (!ret) - ret = search_unix_path(p, getenv("DYLD_LIBRARY_PATH"), macho_load_file_cb, &load_params); + ret = search_unix_path(p, getenv("DYLD_LIBRARY_PATH"), macho_load_file_cb, &load_params); /* Try the path as given. */ if (!ret)
1
0
0
0
Jacek Caban : dbghelp: Remove unneeded includes.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: ceae3f0207fb8f174d0a762ef7fe4f405316541f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ceae3f0207fb8f174d0a762e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:42:57 2020 +0200 dbghelp: Remove unneeded includes. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/coff.c | 7 ------- dlls/dbghelp/dbghelp.c | 1 - dlls/dbghelp/image.c | 1 - dlls/dbghelp/minidump.c | 1 - dlls/dbghelp/module.c | 1 - dlls/dbghelp/msc.c | 7 ------- dlls/dbghelp/path.c | 1 - dlls/dbghelp/pe_module.c | 3 --- dlls/dbghelp/source.c | 1 - dlls/dbghelp/stabs.c | 3 --- dlls/dbghelp/stack.c | 1 - dlls/dbghelp/storage.c | 1 - dlls/dbghelp/symbol.c | 2 -- dlls/dbghelp/type.c | 1 - 14 files changed, 31 deletions(-) diff --git a/dlls/dbghelp/coff.c b/dlls/dbghelp/coff.c index 01c5826c7f..285182f682 100644 --- a/dlls/dbghelp/coff.c +++ b/dlls/dbghelp/coff.c @@ -32,16 +32,9 @@ * Add symbol size to internal symbol table. */ -#include "config.h" -#include "wine/port.h" - #include <assert.h> #include <stdlib.h> - #include <string.h> -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif #include <stdarg.h> #include "windef.h" diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 369e098381..c3e4b2991b 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <unistd.h> #include "dbghelp_private.h" diff --git a/dlls/dbghelp/image.c b/dlls/dbghelp/image.c index ef94ef6638..59622180dc 100644 --- a/dlls/dbghelp/image.c +++ b/dlls/dbghelp/image.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c index cdee1a8b2e..be155c67ce 100644 --- a/dlls/dbghelp/minidump.c +++ b/dlls/dbghelp/minidump.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <time.h> #define NONAMELESSUNION diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index bf7f105bf0..3255ac7a24 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 82fc44965a..0f0aa25e76 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -34,17 +34,10 @@ #define NONAMELESSUNION -#include "config.h" -#include "wine/port.h" - #include <assert.h> #include <stdio.h> #include <stdlib.h> - #include <string.h> -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif #include <stdarg.h> #include "windef.h" diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c index 24649cf280..b706cd1d31 100644 --- a/dlls/dbghelp/path.c +++ b/dlls/dbghelp/path.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 0560f3ef05..b69085368b 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -21,9 +21,6 @@ * */ -#include "config.h" -#include "wine/port.h" - #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/source.c b/dlls/dbghelp/source.c index 60784f1f0d..1844eec783 100644 --- a/dlls/dbghelp/source.c +++ b/dlls/dbghelp/source.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c index a723865527..e14e154cba 100644 --- a/dlls/dbghelp/stabs.c +++ b/dlls/dbghelp/stabs.c @@ -29,9 +29,6 @@ * available (hopefully) from
http://sources.redhat.com/gdb/onlinedocs
*/ -#include "config.h" -#include "wine/port.h" - #include <sys/types.h> #include <fcntl.h> #include <limits.h> diff --git a/dlls/dbghelp/stack.c b/dlls/dbghelp/stack.c index b3845db23a..d04c0163c9 100644 --- a/dlls/dbghelp/stack.c +++ b/dlls/dbghelp/stack.c @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/storage.c b/dlls/dbghelp/storage.c index f1aad08d2a..48a43e6bc3 100644 --- a/dlls/dbghelp/storage.c +++ b/dlls/dbghelp/storage.c @@ -20,7 +20,6 @@ */ -#include "config.h" #include <assert.h> #include <stdlib.h> #include "wine/debug.h" diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index c3451fb51a..7ba1049c07 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -21,8 +21,6 @@ #define NONAMELESSUNION -#include "config.h" - #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c index f00b7c68f4..4b332b9106 100644 --- a/dlls/dbghelp/type.c +++ b/dlls/dbghelp/type.c @@ -24,7 +24,6 @@ #define NONAMELESSUNION -#include "config.h" #include <stdlib.h> #include <stdarg.h> #include <assert.h>
1
0
0
0
Jacek Caban : dbghelp: Import zlib inflate code.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: d483eb21cff1f2b44f048195106d87a414dd66b8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d483eb21cff1f2b44f048195…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:42:40 2020 +0200 dbghelp: Import zlib inflate code. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/Makefile.in | 3 +- dlls/dbghelp/dwarf.c | 17 +- dlls/dbghelp/inflate.c | 1916 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/dbghelp/zlib.h | 162 ++++ 4 files changed, 2080 insertions(+), 18 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d483eb21cff1f2b44f04…
1
0
0
0
Jacek Caban : dbghelp: Always build all loader backends.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 131fb79535c74e8011ac82c279f6f4a9d971e1af URL:
https://source.winehq.org/git/wine.git/?a=commit;h=131fb79535c74e8011ac82c2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:42:26 2020 +0200 dbghelp: Always build all loader backends. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/elf_module.c | 28 ---------------------------- dlls/dbghelp/macho_module.c | 14 -------------- 2 files changed, 42 deletions(-) diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 96c7484cef..72e9d2124a 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -19,13 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - -#if defined(__svr4__) || defined(__sun) -#define __ELF__ 1 -#endif - #include <assert.h> #include <stdio.h> #include <stdlib.h> @@ -37,8 +30,6 @@ #include "wine/debug.h" #include "wine/heap.h" -#ifdef __ELF__ - #define ELF_INFO_DEBUG_HEADER 0x0001 #define ELF_INFO_MODULE 0x0002 #define ELF_INFO_NAME 0x0004 @@ -1778,22 +1769,3 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) pcs->loader = &elf_loader_ops; return TRUE; } - -#else /* !__ELF__ */ - -BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap) -{ - return FALSE; -} - -BOOL elf_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) -{ - return FALSE; -} - -int elf_is_in_thunk_area(ULONG_PTR addr, - const struct elf_thunk_area* thunks) -{ - return -1; -} -#endif /* __ELF__ */ diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 3ef65af7c9..4baf444f9e 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -21,9 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include <stdio.h> #include <assert.h> #include <stdarg.h> @@ -42,8 +39,6 @@ #include "wine/debug.h" #include "wine/heap.h" -#ifdef HAVE_MACH_O_LOADER_H - struct dyld_image_info32 { UINT32 imageLoadAddress; /* const struct mach_header* */ @@ -1933,12 +1928,3 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) TRACE("Found macho debug header %#lx\n", pcs->dbg_hdr_addr); return TRUE; } - -#else /* HAVE_MACH_O_LOADER_H */ - -BOOL macho_read_wine_loader_dbg_info(struct process* pcs, ULONG_PTR addr) -{ - return FALSE; -} - -#endif /* HAVE_MACH_O_LOADER_H */
1
0
0
0
Jacek Caban : dbghelp: Fix GCC warnings in macho_module.c.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 9896f1ce33561771989d3117c1536fb472df8558 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9896f1ce33561771989d3117…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:42:12 2020 +0200 dbghelp: Fix GCC warnings in macho_module.c. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/image_private.h | 2 +- dlls/dbghelp/macho_module.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/dbghelp/image_private.h b/dlls/dbghelp/image_private.h index 4171b38923..870f530057 100644 --- a/dlls/dbghelp/image_private.h +++ b/dlls/dbghelp/image_private.h @@ -130,7 +130,7 @@ struct image_file_map struct image_file_map* dsym; /* the debug symbols file associated with this one */ size_t header_size; /* size of real header in file */ size_t commands_size; - size_t commands_count; + unsigned int commands_count; const struct macho_load_command* load_commands; const struct macho_uuid_command* uuid; diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 8b32a190d8..3ef65af7c9 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -566,7 +566,7 @@ static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd, if ((lc = macho_map_load_commands(fmap)) == IMAGE_NO_MAP) return -1; - TRACE("%lu total commands\n", fmap->commands_count); + TRACE("%u total commands\n", fmap->commands_count); for (i = 0; i < fmap->commands_count; i++, lc = macho_next_load_command(lc)) { @@ -1639,7 +1639,7 @@ static BOOL macho_enum_modules_internal(const struct process* pcs, } if (!image_infos.infos64.infoArray) goto done; - TRACE("Process has %u image infos at %p\n", image_infos.infos64.infoArrayCount, (void*)image_infos.infos64.infoArray); + TRACE("Process has %u image infos at %s\n", image_infos.infos64.infoArrayCount, wine_dbgstr_longlong(image_infos.infos64.infoArray)); if (pcs->is_64bit) len = sizeof(info_array->info64); @@ -1751,6 +1751,7 @@ static BOOL macho_enum_modules(struct process* process, enum_modules_cb cb, void TRACE("(%p, %p, %p)\n", process->handle, cb, user); macho_info.flags = MACHO_INFO_NAME; + macho_info.module_name = NULL; ret = macho_enum_modules_internal(process, macho_info.module_name, cb, user); HeapFree(GetProcessHeap(), 0, (char*)macho_info.module_name); return ret;
1
0
0
0
Jacek Caban : dbghelp: Introduce read_process_memory helper.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: 26f5bfdd4d071a91a38b25c0064ed5ea48993249 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=26f5bfdd4d071a91a38b25c0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 6 19:41:58 2020 +0200 dbghelp: Introduce read_process_memory helper. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/cpu_x86_64.c | 4 +--- dlls/dbghelp/dbghelp_private.h | 5 +++++ dlls/dbghelp/elf_module.c | 19 ++++++------------- dlls/dbghelp/macho_module.c | 16 +++++++--------- dlls/dbghelp/minidump.c | 8 ++------ 5 files changed, 21 insertions(+), 31 deletions(-) diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c index 13de1fd0e4..c2789d0d71 100644 --- a/dlls/dbghelp/cpu_x86_64.c +++ b/dlls/dbghelp/cpu_x86_64.c @@ -949,9 +949,7 @@ static BOOL x86_64_fetch_minidump_module(struct dump_context* dc, unsigned index /* we need to read into the other process */ /* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */ } - if (ReadProcessMemory(dc->process->handle, - (void*)(dc->modules[index].base + rtf->UnwindData), - &ui, sizeof(ui), NULL)) + if (read_process_memory(dc->process, dc->modules[index].base + rtf->UnwindData, &ui, sizeof(ui))) minidump_add_memory_block(dc, dc->modules[index].base + rtf->UnwindData, FIELD_OFFSET(UNWIND_INFO, UnwindCode) + ui.CountOfCodes * sizeof(UNWIND_CODE), 0); rtf++; diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 73b9cf9c8c..cdd074709d 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -421,6 +421,11 @@ struct process BOOL is_64bit; }; +static inline BOOL read_process_memory(const struct process *process, UINT64 addr, void *buf, size_t size) +{ + return ReadProcessMemory(process->handle, (void*)(UINT_PTR)addr, buf, size, NULL); +} + struct line_info { ULONG_PTR is_first : 1, diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 23cb8a54b7..96c7484cef 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -1486,9 +1486,7 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, UINT64 l_next, l_prev; } lm; - if (!pcs->dbg_hdr_addr || - !ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, - &dbg_hdr, sizeof(dbg_hdr), NULL)) + if (!pcs->dbg_hdr_addr || !read_process_memory(pcs, pcs->dbg_hdr_addr, &dbg_hdr, sizeof(dbg_hdr))) return FALSE; /* Now walk the linked list. In all known ELF implementations, @@ -1498,12 +1496,11 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, */ for (lm_addr = dbg_hdr.r_map; lm_addr; lm_addr = lm.l_next) { - if (!ReadProcessMemory(pcs->handle, (void*)lm_addr, &lm, sizeof(lm), NULL)) + if (!read_process_memory(pcs, lm_addr, &lm, sizeof(lm))) return FALSE; if (lm.l_prev && /* skip first entry, normally debuggee itself */ - lm.l_name && - ReadProcessMemory(pcs->handle, (void*)(ULONG_PTR)lm.l_name, bufstr, sizeof(bufstr), NULL)) + lm.l_name && read_process_memory(pcs, lm.l_name, bufstr, sizeof(bufstr))) { bufstr[sizeof(bufstr) - 1] = '\0'; MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW)); @@ -1531,9 +1528,7 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, UINT32 l_next, l_prev; } lm; - if (!pcs->dbg_hdr_addr || - !ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, - &dbg_hdr, sizeof(dbg_hdr), NULL)) + if (!pcs->dbg_hdr_addr || !read_process_memory(pcs, pcs->dbg_hdr_addr, &dbg_hdr, sizeof(dbg_hdr))) return FALSE; /* Now walk the linked list. In all known ELF implementations, @@ -1543,13 +1538,11 @@ static BOOL elf_enum_modules_internal(const struct process* pcs, */ for (lm_addr = dbg_hdr.r_map; lm_addr; lm_addr = lm.l_next) { - if (!ReadProcessMemory(pcs->handle, (void*)lm_addr, &lm, sizeof(lm), NULL)) + if (!read_process_memory(pcs, lm_addr, &lm, sizeof(lm))) return FALSE; if (lm.l_prev && /* skip first entry, normally debuggee itself */ - lm.l_name && - ReadProcessMemory(pcs->handle, (void *)(DWORD_PTR)lm.l_name, - bufstr, sizeof(bufstr), NULL)) + lm.l_name && read_process_memory(pcs, lm.l_name, bufstr, sizeof(bufstr))) { bufstr[sizeof(bufstr) - 1] = '\0'; MultiByteToWideChar(CP_UNIXCP, 0, bufstr, -1, bufstrW, ARRAY_SIZE(bufstrW)); diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index ff0072d5a9..8b32a190d8 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1349,7 +1349,7 @@ static BOOL image_uses_split_segs(struct process* process, ULONG_PTR load_addr) UINT32 target_magic = (process->is_64bit) ? MACHO_MH_MAGIC_64 : MACHO_MH_MAGIC_32; struct macho_header header; - if (ReadProcessMemory(process->handle, (void*)load_addr, &header, FIELD_OFFSET(struct macho_header, reserved), NULL) && + if (read_process_memory(process, load_addr, &header, FIELD_OFFSET(struct macho_header, reserved)) && header.magic == target_magic && header.cputype == target_cpu && header.flags & MACHO_DYLD_IN_SHARED_CACHE) { @@ -1629,8 +1629,7 @@ static BOOL macho_enum_modules_internal(const struct process* pcs, else len = sizeof(image_infos.infos32); if (!pcs->dbg_hdr_addr || - !ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, - &image_infos, len, NULL)) + !read_process_memory(pcs, pcs->dbg_hdr_addr, &image_infos, len)) goto done; if (!pcs->is_64bit) { @@ -1649,8 +1648,7 @@ static BOOL macho_enum_modules_internal(const struct process* pcs, len *= image_infos.infos64.infoArrayCount; info_array = HeapAlloc(GetProcessHeap(), 0, len); if (!info_array || - !ReadProcessMemory(pcs->handle, (void*)image_infos.infos64.infoArray, - info_array, len, NULL)) + !read_process_memory(pcs, image_infos.infos64.infoArray, info_array, len)) goto done; TRACE("... read image infos\n"); @@ -1666,7 +1664,7 @@ static BOOL macho_enum_modules_internal(const struct process* pcs, info.imageFilePath = info32->imageFilePath; } if (info.imageFilePath && - ReadProcessMemory(pcs->handle, (void*)info.imageFilePath, bufstr, sizeof(bufstr), NULL)) + read_process_memory(pcs, info.imageFilePath, bufstr, sizeof(bufstr))) { bufstr[sizeof(bufstr) - 1] = '\0'; TRACE("[%d] image file %s\n", i, debugstr_a(bufstr)); @@ -1850,7 +1848,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in len = sizeof(image_infos.infos64); else len = sizeof(image_infos.infos32); - if (ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr, &image_infos, len, NULL)) + if (read_process_memory(pcs, pcs->dbg_hdr_addr, &image_infos, len)) { if (pcs->is_64bit) len = sizeof(image_info.info64); @@ -1862,7 +1860,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in len = sizeof(image_info.info32); } if (image_infos.infos64.infoArray && image_infos.infos64.infoArrayCount && - ReadProcessMemory(pcs->handle, (void*)image_infos.infos64.infoArray, &image_info, len, NULL)) + read_process_memory(pcs, image_infos.infos64.infoArray, &image_info, len)) { if (!pcs->is_64bit) { @@ -1872,7 +1870,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in } for (len = sizeof(path); image_info.info64.imageFilePath && len > 0; len /= 2) { - if (ReadProcessMemory(pcs->handle, (void*)image_info.info64.imageFilePath, path, len, NULL)) + if (read_process_memory(pcs, image_info.info64.imageFilePath, path, len)) { path[len - 1] = 0; got_path = TRUE; diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c index f934aab83c..cdee1a8b2e 100644 --- a/dlls/dbghelp/minidump.c +++ b/dlls/dbghelp/minidump.c @@ -832,9 +832,7 @@ static unsigned dump_memory_info(struct dump_context* dc) for (pos = 0; pos < dc->mem[i].size; pos += sizeof(tmp)) { len = min(dc->mem[i].size - pos, sizeof(tmp)); - if (ReadProcessMemory(dc->process->handle, - (void*)(DWORD_PTR)(dc->mem[i].base + pos), - tmp, len, NULL)) + if (read_process_memory(dc->process, dc->mem[i].base + pos, tmp, len)) WriteFile(dc->hFile, tmp, len, &written, NULL); } dc->rva += mdMem.Memory.DataSize; @@ -890,9 +888,7 @@ static unsigned dump_memory64_info(struct dump_context* dc) for (pos = 0; pos < dc->mem64[i].size; pos += sizeof(tmp)) { len = min(dc->mem64[i].size - pos, sizeof(tmp)); - if (ReadProcessMemory(dc->process->handle, - (void*)(ULONG_PTR)(dc->mem64[i].base + pos), - tmp, len, NULL)) + if (read_process_memory(dc->process, dc->mem64[i].base + pos, tmp, len)) WriteFile(dc->hFile, tmp, len, &written, NULL); } filepos.QuadPart += mdMem64.DataSize;
1
0
0
0
Jactry Zeng : qasf: Implement IFileSourceFilter_GetCurFile() for WM ASF reader.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: b38e95dcabb999c293a939ea839be93764344cdd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b38e95dcabb999c293a939ea…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Mon Apr 6 11:54:08 2020 -0500 qasf: Implement IFileSourceFilter_GetCurFile() for WM ASF reader. Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qasf/asfreader.c | 23 +++++++++++-- dlls/qasf/tests/asfreader.c | 82 +++++++++++++++++++++------------------------ 2 files changed, 59 insertions(+), 46 deletions(-) diff --git a/dlls/qasf/asfreader.c b/dlls/qasf/asfreader.c index de5c563836..372d03a390 100644 --- a/dlls/qasf/asfreader.c +++ b/dlls/qasf/asfreader.c @@ -125,9 +125,28 @@ static HRESULT WINAPI filesourcefilter_GetCurFile(IFileSourceFilter *iface, LPOL { struct asf_reader *filter = impl_from_IFileSourceFilter(iface); - FIXME("filter %p, filename %p, type %p, stub!\n", filter, filename, type); + TRACE("filter %p, filename %p, type %p.\n", filter, filename, type); - return E_NOTIMPL; + if (!filename) + return E_POINTER; + *filename = NULL; + + if (type) + { + type->majortype = filter->type.majortype; + type->subtype = filter->type.subtype; + type->lSampleSize = filter->type.lSampleSize; + type->pUnk = filter->type.pUnk; + type->cbFormat = filter->type.cbFormat; + } + + if (filter->filename) + { + *filename = CoTaskMemAlloc((wcslen(filter->filename) + 1) * sizeof(WCHAR)); + wcscpy(*filename, filter->filename); + } + + return S_OK; } static const IFileSourceFilterVtbl filesourcefilter_vtbl = diff --git a/dlls/qasf/tests/asfreader.c b/dlls/qasf/tests/asfreader.c index 35a2866f46..55d2d4404d 100644 --- a/dlls/qasf/tests/asfreader.c +++ b/dlls/qasf/tests/asfreader.c @@ -211,25 +211,25 @@ static void test_filesourcefilter(void) olepath = (void *)0xdeadbeef; memset(&type, 0x22, sizeof(type)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(!olepath, "Got %s.\n", wine_dbgstr_w(olepath)); - todo_wine ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!olepath, "Got %s.\n", wine_dbgstr_w(olepath)); + ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", wine_dbgstr_guid(&type.majortype)); - todo_wine ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", + ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", wine_dbgstr_guid(&type.subtype)); ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); - todo_wine ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); - todo_wine ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); - todo_wine ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); + ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); memset(&ptr, 0x22, sizeof(ptr)); ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); hr = IFileSourceFilter_Load(filesource, L"nonexistent.wmv", NULL); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IFileSourceFilter_GetCurFile(filesource, NULL, NULL); - todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); hr = IFileSourceFilter_Load(filesource, L"nonexistent2.wmv", NULL); ok(hr == E_FAIL, "Got hr %#x.\n", hr); @@ -237,24 +237,21 @@ static void test_filesourcefilter(void) olepath = (void *)0xdeadbeef; memset(&type, 0x22, sizeof(type)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (SUCCEEDED(hr)) - { - ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", - wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); - ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", - wine_dbgstr_guid(&type.majortype)); - ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", - wine_dbgstr_guid(&type.subtype)); - ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); - ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); - ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); - ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); - ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); - ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); - ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); - CoTaskMemFree(olepath); - } + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", + wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); + ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", + wine_dbgstr_guid(&type.majortype)); + ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", + wine_dbgstr_guid(&type.subtype)); + ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); + ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); + ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); + ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); + ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); + CoTaskMemFree(olepath); hr = IBaseFilter_EnumPins(filter, &enumpins); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -276,24 +273,21 @@ static void test_filesourcefilter(void) olepath = (void *)0xdeadbeef; memset(&type, 0x22, sizeof(type)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - if (SUCCEEDED(hr)) - { - ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", - wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); - ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", - wine_dbgstr_guid(&type.majortype)); - ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", - wine_dbgstr_guid(&type.subtype)); - ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); - ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); - ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); - ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); - ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); - ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); - ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); - CoTaskMemFree(olepath); - } + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", + wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); + ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", + wine_dbgstr_guid(&type.majortype)); + ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", + wine_dbgstr_guid(&type.subtype)); + ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); + ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); + ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); + ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); + ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); + CoTaskMemFree(olepath); ref = IFilterGraph2_Release(graph); ok(!ref, "Got outstanding refcount %d.\n", ref);
1
0
0
0
Jactry Zeng : qasf: Implement IFileSourceFilter_Load() for WM ASF reader.
by Alexandre Julliard
06 Apr '20
06 Apr '20
Module: wine Branch: master Commit: f15c23df4a281a93087b5c0d2ca421463c7b9e4a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f15c23df4a281a93087b5c0d…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Mon Apr 6 11:54:07 2020 -0500 qasf: Implement IFileSourceFilter_Load() for WM ASF reader. Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qasf/asfreader.c | 22 +++++++- dlls/qasf/tests/asfreader.c | 122 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+), 2 deletions(-) diff --git a/dlls/qasf/asfreader.c b/dlls/qasf/asfreader.c index 6d4a05a723..de5c563836 100644 --- a/dlls/qasf/asfreader.c +++ b/dlls/qasf/asfreader.c @@ -26,6 +26,9 @@ struct asf_reader { struct strmbase_filter filter; IFileSourceFilter IFileSourceFilter_iface; + + AM_MEDIA_TYPE type; + WCHAR *filename; }; static inline struct asf_reader *impl_reader_from_strmbase_filter(struct strmbase_filter *iface) @@ -42,6 +45,9 @@ static void asf_reader_destroy(struct strmbase_filter *iface) { struct asf_reader *filter = impl_reader_from_strmbase_filter(iface); + free(filter->filename); + FreeMediaType(&filter->type); + strmbase_filter_cleanup(&filter->filter); free(filter); } @@ -97,10 +103,22 @@ static HRESULT WINAPI filesourcefilter_Load(IFileSourceFilter *iface, LPCOLESTR { struct asf_reader *filter = impl_from_IFileSourceFilter(iface); - FIXME("filter %p, filename %s, type %p, stub!\n", filter, debugstr_w(filename), type); + TRACE("filter %p, filename %s, type %p.\n", filter, debugstr_w(filename), type); strmbase_dump_media_type(type); - return E_NOTIMPL; + if (!filename) + return E_POINTER; + + if (filter->filename) + return E_FAIL; + + if (!(filter->filename = wcsdup(filename))) + return E_OUTOFMEMORY; + + if (type) + CopyMediaType(&filter->type, type); + + return S_OK; } static HRESULT WINAPI filesourcefilter_GetCurFile(IFileSourceFilter *iface, LPOLESTR *filename, AM_MEDIA_TYPE *type) diff --git a/dlls/qasf/tests/asfreader.c b/dlls/qasf/tests/asfreader.c index 607b1ca597..35a2866f46 100644 --- a/dlls/qasf/tests/asfreader.c +++ b/dlls/qasf/tests/asfreader.c @@ -27,6 +27,8 @@ #include "initguid.h" +static const GUID testguid = {0x22222222, 0x2222, 0x2222, {0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22}}; + DEFINE_GUID(IID_IWMHeaderInfo, 0x96406bda, 0x2b2b, 0x11d3, 0xb3, 0x6b, 0x00, 0xc0, 0x4f, 0x61, 0x08, 0xff); DEFINE_GUID(IID_IWMReaderAdvanced, 0x96406bea, 0x2b2b, 0x11d3, 0xb3, 0x6b, 0x00, 0xc0, 0x4f, 0x61, 0x08, 0xff); DEFINE_GUID(IID_IWMReaderAdvanced2, 0xae14a945, 0xb90c, 0x4d0d, 0x91, 0x27, 0x80, 0xd6, 0x65, 0xf7, 0xd7, 0x3e); @@ -181,12 +183,132 @@ static void test_aggregation(void) ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); } +static void test_filesourcefilter(void) +{ + IBaseFilter *filter = create_asf_reader(); + IFileSourceFilter *filesource; + IFilterGraph2 *graph; + IEnumPins *enumpins; + AM_MEDIA_TYPE type; + LPOLESTR olepath; + IPin *pins[4]; + HRESULT hr; + ULONG ref; + BYTE *ptr; + + ref = get_refcount(filter); + ok(ref == 1, "Got unexpected refcount %d.\n", ref); + hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ref = get_refcount(filesource); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(filter); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); + + hr = IFileSourceFilter_Load(filesource, NULL, NULL); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + + olepath = (void *)0xdeadbeef; + memset(&type, 0x22, sizeof(type)); + hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(!olepath, "Got %s.\n", wine_dbgstr_w(olepath)); + todo_wine ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", + wine_dbgstr_guid(&type.majortype)); + todo_wine ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", + wine_dbgstr_guid(&type.subtype)); + ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); + ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); + todo_wine ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); + todo_wine ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); + todo_wine ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + memset(&ptr, 0x22, sizeof(ptr)); + ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); + + hr = IFileSourceFilter_Load(filesource, L"nonexistent.wmv", NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IFileSourceFilter_GetCurFile(filesource, NULL, NULL); + todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + + hr = IFileSourceFilter_Load(filesource, L"nonexistent2.wmv", NULL); + ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + olepath = (void *)0xdeadbeef; + memset(&type, 0x22, sizeof(type)); + hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + if (SUCCEEDED(hr)) + { + ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", + wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); + ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", + wine_dbgstr_guid(&type.majortype)); + ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", + wine_dbgstr_guid(&type.subtype)); + ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); + ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); + ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); + ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); + ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); + CoTaskMemFree(olepath); + } + + hr = IBaseFilter_EnumPins(filter, &enumpins); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IEnumPins_Next(enumpins, 1, pins, NULL); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + IEnumPins_Release(enumpins); + + hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterGraph2, (void **)&graph); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IFilterGraph2_AddFilter(graph, filter, NULL); + todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) + || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* win2008 */, + "Got hr %#x.\n", hr); + + hr = IFileSourceFilter_Load(filesource, L"nonexistent2.wmv", NULL); + ok(hr == E_FAIL, "Got hr %#x.\n", hr); + + olepath = (void *)0xdeadbeef; + memset(&type, 0x22, sizeof(type)); + hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + if (SUCCEEDED(hr)) + { + ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", + wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); + ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", + wine_dbgstr_guid(&type.majortype)); + ok(IsEqualGUID(&type.subtype, &MEDIASUBTYPE_NULL), "Got subtype %s.\n", + wine_dbgstr_guid(&type.subtype)); + ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); + ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); + ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); + ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); + ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); + CoTaskMemFree(olepath); + } + + ref = IFilterGraph2_Release(graph); + ok(!ref, "Got outstanding refcount %d.\n", ref); + IBaseFilter_Release(filter); + ref = IFileSourceFilter_Release(filesource); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + START_TEST(asfreader) { CoInitializeEx(NULL, COINIT_MULTITHREADED); test_interfaces(); test_aggregation(); + test_filesourcefilter(); CoUninitialize(); }
1
0
0
0
← Newer
1
...
80
81
82
83
84
85
86
...
102
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Results per page:
10
25
50
100
200