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
March 2024
----- 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
775 discussions
Start a n
N
ew thread
Eric Pouech : dbghelp: Don't fail in SymAddSymbol for modules without debug information.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: 6ab88cafaaaa24482454ce856d4039f47a6b5fc1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6ab88cafaaaa24482454ce856d4039…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Fri Mar 1 13:14:06 2024 +0100 dbghelp: Don't fail in SymAddSymbol for modules without debug information. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/module.c | 4 ++-- dlls/dbghelp/tests/path.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 70a57edf3f9..d06c4417be6 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -404,8 +404,9 @@ BOOL module_load_debug(struct module* module) if (!ret) module->module.SymType = SymNone; assert(module->module.SymType != SymDeferred); module->module.NumSyms = module->ht_symbols.num_elts; + return ret; } - return module->module.SymType != SymNone; + return TRUE; } /****************************************************************** @@ -416,7 +417,6 @@ BOOL module_load_debug(struct module* module) * the module itself) * - if the module has no debug info and has an ELF container, then return the ELF * container (and also force the ELF container's debug info loading if deferred) - * - otherwise return the module itself if it has some debug info */ BOOL module_get_debug(struct module_pair* pair) { diff --git a/dlls/dbghelp/tests/path.c b/dlls/dbghelp/tests/path.c index bf3f20faf2f..e27539643be 100644 --- a/dlls/dbghelp/tests/path.c +++ b/dlls/dbghelp/tests/path.c @@ -1884,7 +1884,6 @@ static void test_load_modules_details(void) SymFromNameW(dummy, L"foo", sym); } ret = SymAddSymbol(dummy, base, "winetest_symbol_virtual", base + 4242, 13, 0); - todo_wine_if(i == 8 || i == 9 || (i >= 12 && i <= 15)) { /* temp */ ok(ret, "Failed to add symbol\n"); memset(sym, 0, sizeof(*sym)); sym->SizeOfStruct = sizeof(*sym); @@ -1899,7 +1898,6 @@ static void test_load_modules_details(void) ret = SymFromNameW(dummy, sym_name, (void*)sym); ok(ret, "Couldn't find symbol %ls\n", sym_name); } - } /* temp */ ret = SymCleanup(dummy); ok(ret, "SymCleanup failed: %lu\n", GetLastError()); for (ptr = test->test_files; *ptr; ptr++)
1
0
0
0
Eric Pouech : dbghelp: Support SLMFLAG_NO_SYMBOLS in SymLoadModuleEx*().
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: 61f9f5a05f6d61c9504688a08ab486957737786f URL:
https://gitlab.winehq.org/wine/wine/-/commit/61f9f5a05f6d61c9504688a08ab486…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed Jan 17 14:29:36 2024 +0100 dbghelp: Support SLMFLAG_NO_SYMBOLS in SymLoadModuleEx*(). Also correctly handling ImageName (the passed image name in SymLoadModule) and LoadedImageName, which is only set when debug info have been loaded (and is always an absolute path, contrary to ImageName which can be relative). Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/dbghelp_private.h | 1 + dlls/dbghelp/module.c | 17 +++++++++++++---- dlls/dbghelp/msc.c | 11 +++++++---- dlls/dbghelp/path.c | 1 + dlls/dbghelp/pe_module.c | 9 ++++++--- dlls/dbghelp/tests/path.c | 9 +++------ 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 628cb1e6442..5677f6bfdb3 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -442,6 +442,7 @@ struct module struct module* next; enum dhext_module_type type : 16; unsigned short is_virtual : 1, + dont_load_symbols : 1, is_wine_builtin : 1, has_file_image : 1; struct cpu* cpu; diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 5021d54c93e..70a57edf3f9 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -376,8 +376,12 @@ BOOL module_load_debug(struct module* module) if (module->module.SymType == SymDeferred) { BOOL ret; - - if (module->is_virtual) ret = FALSE; + + if (module->is_virtual) + { + module->module.SymType = SymVirtual; + ret = TRUE; + } else if (module->type == DMT_PE) { idslW64.SizeOfStruct = sizeof(idslW64); @@ -942,7 +946,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam if (!(pcs = process_find_by_handle(hProcess))) return 0; - if (Flags & ~(SLMFLAG_VIRTUAL)) + if (Flags & ~(SLMFLAG_VIRTUAL | SLMFLAG_NO_SYMBOLS)) FIXME("Unsupported Flags %08lx for %s\n", Flags, debugstr_w(wImageName)); /* Trying to load a new module at the same address of an existing one, @@ -970,7 +974,6 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam if (!wImageName) wImageName = L""; module = module_new(pcs, wImageName, DMT_PE, FALSE, TRUE, BaseOfDll, SizeOfDll, 0, 0, IMAGE_FILE_MACHINE_UNKNOWN); if (!module) return 0; - module->module.SymType = SymVirtual; } else { @@ -996,6 +999,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam return 0; } } + if (Flags & SLMFLAG_NO_SYMBOLS) module->dont_load_symbols = 1; /* Store alternate name for module when provided. */ if (wModuleName) @@ -1531,6 +1535,11 @@ BOOL WINAPI SymGetModuleInfoW64(HANDLE hProcess, DWORD64 dwAddr, if (dbghelp_opt_real_path && module->real_path) lstrcpynW(miw64.LoadedImageName, module->real_path, ARRAY_SIZE(miw64.LoadedImageName)); + else if (miw64.SymType == SymDeferred) + { + miw64.LoadedImageName[0] = '\0'; + miw64.TimeDateStamp = 0; + } /* update debug information from container if any */ if (module->module.SymType == SymNone) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index aeaa55cc713..035bc2d7295 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -3889,16 +3889,18 @@ static BOOL pdb_process_file(const struct process *pcs, const struct msc_debug_info *msc_dbg, const char *filename, const GUID *guid, DWORD timestamp, DWORD age) { - BOOL ret; struct module_format* modfmt; struct pdb_module_info* pdb_module_info; SYMSRV_INDEX_INFOW info; BOOL unmatched; - if (path_find_symbol_file(pcs, msc_dbg->module, filename, TRUE, guid, timestamp, age, &info, &unmatched) && + if (!msc_dbg->module->dont_load_symbols && + path_find_symbol_file(pcs, msc_dbg->module, filename, TRUE, guid, timestamp, age, &info, &unmatched) && (modfmt = HeapAlloc(GetProcessHeap(), 0, - sizeof(struct module_format) + sizeof(struct pdb_module_info)))) + sizeof(struct module_format) + sizeof(struct pdb_module_info)))) { + BOOL ret; + pdb_module_info = (void*)(modfmt + 1); msc_dbg->module->format_info[DFI_PDB] = modfmt; modfmt->module = msc_dbg->module; @@ -3926,6 +3928,7 @@ static BOOL pdb_process_file(const struct process *pcs, msc_dbg->module->module.TypeInfo = TRUE; msc_dbg->module->module.SourceIndexed = TRUE; msc_dbg->module->module.Publics = TRUE; + return TRUE; } msc_dbg->module->format_info[DFI_PDB] = NULL; @@ -3936,7 +3939,7 @@ static BOOL pdb_process_file(const struct process *pcs, msc_dbg->module->module.PdbSig70 = *guid; else memset(&msc_dbg->module->module.PdbSig70, 0, sizeof(GUID)); - msc_dbg->module->module.PdbSig = timestamp; + msc_dbg->module->module.PdbSig = 0; msc_dbg->module->module.PdbAge = age; return FALSE; } diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c index db0873f133c..0f52bca3684 100644 --- a/dlls/dbghelp/path.c +++ b/dlls/dbghelp/path.c @@ -498,6 +498,7 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user) mf->info->guid = info.guid; mf->info->timestamp = info.timestamp; mf->info->age = info.age; + mf->info->sig = info.sig; } /* yes, EnumDirTree/do_search and SymFindFileInPath callbacks use the opposite * convention to stop/continue enumeration. sigh. diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 8d713450386..1a6efc99392 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -721,9 +721,12 @@ BOOL pe_load_debug_info(const struct process* pcs, struct module* module) if (!(dbghelp_options & SYMOPT_PUBLICS_ONLY)) { - ret = image_check_alternate(&module->format_info[DFI_PE]->u.pe_info->fmap, module); - ret = pe_load_stabs(pcs, module) || ret; - ret = pe_load_dwarf(module) || ret; + if (!module->dont_load_symbols) + { + ret = image_check_alternate(&module->format_info[DFI_PE]->u.pe_info->fmap, module); + ret = pe_load_stabs(pcs, module) || ret; + ret = pe_load_dwarf(module) || ret; + } ret = pe_load_msc_debug_info(pcs, module) || ret; ret = ret || pe_load_coff_symbol_table(module); /* FIXME */ /* if we still have no debug info (we could only get SymExport at this diff --git a/dlls/dbghelp/tests/path.c b/dlls/dbghelp/tests/path.c index b57a6644d45..bf3f20faf2f 100644 --- a/dlls/dbghelp/tests/path.c +++ b/dlls/dbghelp/tests/path.c @@ -1803,10 +1803,9 @@ static void test_load_modules_details(void) } else loaded_img_name = test->in_image_name; - todo_wine_if(i == 3 || i == 5 || i == 7 || i == 9 || i == 11 || i == 13 || i == 15 || i == 17) ok(!wcsicmp(im.LoadedImageName, (test->options & SYMOPT_DEFERRED_LOADS) ? L"" : loaded_img_name), "Unexpected loaded image name '%ls' (%ls)\n", im.LoadedImageName, loaded_img_name); - todo_wine_if(i == 3 || i == 4 || i == 6 || i == 8 || i == 16) + todo_wine_if(i == 4 || i == 6 || i == 16) ok(im.SymType == test->sym_type, "Unexpected module type %u\n", im.SymType); if (test->mismatch_in) { @@ -1842,7 +1841,6 @@ static void test_load_modules_details(void) { ok(val < ARRAY_SIZE(test_files), "Incorrect index\n"); if (test->flags & SLMFLAG_NO_SYMBOLS) - todo_wine_if(i == 8) ok(!im.LoadedPdbName[0], "Unexpected value\n"); else { @@ -1853,7 +1851,6 @@ static void test_load_modules_details(void) ok(!im.DbgUnmatched, "Unexpected value\n"); ok(IsEqualGUID(&im.PdbSig70, test_files[val].guid), "Unexpected value %s %s\n", wine_dbgstr_guid(&im.PdbSig70), wine_dbgstr_guid(test_files[val].guid)); - todo_wine_if(i == 10) ok(im.PdbSig == 0, "Unexpected value\n"); ok(im.PdbAge == test_files[val].age_or_timestamp, "Unexpected value\n"); } @@ -1868,7 +1865,7 @@ static void test_load_modules_details(void) ok(im.PdbSig == 0, "Unexpected value\n"); ok(!im.PdbAge, "Unexpected value\n"); /* native returns either 0 or the actual timestamp depending on test case */ - todo_wine_if(i == 4 || i == 5 || i == 7 || i == 9 || i == 11 || i == 13 || (i >= 15 && i <= 17)) + todo_wine_if(i == 4 || i == 16) ok(!im.TimeDateStamp || broken(im.TimeDateStamp == 12324), "Unexpected value\n"); } ok(im.ImageSize == 0x6666, "Unexpected image size\n"); @@ -1887,7 +1884,7 @@ static void test_load_modules_details(void) SymFromNameW(dummy, L"foo", sym); } ret = SymAddSymbol(dummy, base, "winetest_symbol_virtual", base + 4242, 13, 0); - todo_wine_if(i >= 12 && i <= 15) { /* temp */ + todo_wine_if(i == 8 || i == 9 || (i >= 12 && i <= 15)) { /* temp */ ok(ret, "Failed to add symbol\n"); memset(sym, 0, sizeof(*sym)); sym->SizeOfStruct = sizeof(*sym);
1
0
0
0
Eric Pouech : dbghelp/tests: Extend the tests for SymLoadModule().
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: 51a0aaeff43444e81a8698cb85f6b1dbf095326f URL:
https://gitlab.winehq.org/wine/wine/-/commit/51a0aaeff43444e81a8698cb85f6b1…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Thu Mar 7 10:11:18 2024 +0100 dbghelp/tests: Extend the tests for SymLoadModule(). Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/tests/path.c | 53 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/dlls/dbghelp/tests/path.c b/dlls/dbghelp/tests/path.c index 9afefd2d12a..b57a6644d45 100644 --- a/dlls/dbghelp/tests/path.c +++ b/dlls/dbghelp/tests/path.c @@ -1639,7 +1639,7 @@ static BOOL has_mismatch(const char *str, char ch, unsigned *val) { if (str && *str == ch) { - if (val && (ch == 'D' || ch == 'P' || ch == '!')) + if (val && (ch == 'F' || ch == 'P' || ch == '!')) *val = char2index(str[1]); return TRUE; } @@ -1671,7 +1671,9 @@ static void test_load_modules_details(void) const char *test_files; /* various test_files to be created */ /* output parameters */ SYM_TYPE sym_type; - const char *mismatch_in; /* 'PN'=PDB, 'DN'=DBG, NULL (N index of expected found file) */ + const char *mismatch_in; /* format if CN, where + C={'F' for full match of PDB, 'P' for partial match of PDB, '!' found pdb without info} + N index of expected file */ } module_details_tests[] = { @@ -1686,10 +1688,10 @@ static void test_load_modules_details(void) {0, 0, L"bar.dll", L"foo_bar", -1, "0", SymPdb, "!0"}, {0, SYMOPT_DEFERRED_LOADS, L"bar.dll", L"foo_bar", -1, "0", SymDeferred}, - {SLMFLAG_NO_SYMBOLS, 0, L"bar.dll", L"foo_bar", 0, "0", SymNone}, + {SLMFLAG_NO_SYMBOLS, 0, L"bar.dll", L"foo_bar", 0, "0", SymNone, "F0"}, {SLMFLAG_NO_SYMBOLS, SYMOPT_DEFERRED_LOADS, L"bar.dll", L"foo_bar", 0, "0", SymDeferred}, -/*10*/ {0, 0, L"bar.dll", L"foo_bar", 0, "0", SymPdb}, +/*10*/ {0, 0, L"bar.dll", L"foo_bar", 0, "0", SymPdb, "F0"}, {0, SYMOPT_DEFERRED_LOADS, L"bar.dll", L"foo_bar", 0, "0", SymDeferred}, {SLMFLAG_NO_SYMBOLS, 0, L"bar.dll", L"foo_bar", 1, "0", SymNone, "P0"}, @@ -1698,6 +1700,9 @@ static void test_load_modules_details(void) {0, 0, L"bar.dll", L"foo_bar", 1, "0", SymNone, "P0"}, /*15*/ {0, SYMOPT_DEFERRED_LOADS, L"bar.dll", L"foo_bar", 1, "0", SymDeferred}, + {SLMFLAG_NO_SYMBOLS, 0, L"bar.dll", L"foo_bar", -1, "", SymNone}, + {SLMFLAG_NO_SYMBOLS, SYMOPT_DEFERRED_LOADS, L"bar.dll", L"foo_bar", -1, "", SymDeferred}, + /* FIXME add lookup path, exact symbol, .DBG files */ }; @@ -1721,7 +1726,6 @@ static void test_load_modules_details(void) struct debug_directory_blob* blob_refs[2]; old_options = SymGetOptions(); - im.SizeOfStruct = sizeof(im); len = GetTempPathW(ARRAY_SIZE(topdir), topdir); ok(len && len < ARRAY_SIZE(topdir), "Unexpected length\n"); @@ -1731,7 +1735,7 @@ static void test_load_modules_details(void) init_headers64(&h.nt_header64, 12324, 3242, 0); blob_refs[0] = make_pdb_ds_blob(12324, &guid1, 0x0030cafe, "bar.pdb"); - blob_refs[1] = make_pdb_ds_blob(12324, &guid1, 0x0030caff, "bar.pdb"); /* shall generate a mismatch */ + blob_refs[1] = make_pdb_ds_blob(12325, &guid1, 0x0030caff, "bar.pdb"); /* shall generate a mismatch */ for (i = 0; i < ARRAY_SIZE(module_details_tests); i++) { @@ -1775,6 +1779,8 @@ static void test_load_modules_details(void) test->in_image_name, test->in_module_name, 0x4000, 0x6666, NULL, test->flags); ok(base == 0x4000, "SymLoadModuleExW failed: %lu\n", GetLastError()); + memset(&im, 0xA5, sizeof(im)); + im.SizeOfStruct = sizeof(im); ret = SymGetModuleInfoW64(dummy, base, &im); ok(ret, "SymGetModuleInfow64 failed: %lu\n", GetLastError()); if (test->in_image_name) @@ -1797,52 +1803,73 @@ static void test_load_modules_details(void) } else loaded_img_name = test->in_image_name; - todo_wine_if(test->options & SYMOPT_DEFERRED_LOADS) + todo_wine_if(i == 3 || i == 5 || i == 7 || i == 9 || i == 11 || i == 13 || i == 15 || i == 17) ok(!wcsicmp(im.LoadedImageName, (test->options & SYMOPT_DEFERRED_LOADS) ? L"" : loaded_img_name), "Unexpected loaded image name '%ls' (%ls)\n", im.LoadedImageName, loaded_img_name); - todo_wine_if(i == 3 || i == 4 || i == 6 || i == 8) + todo_wine_if(i == 3 || i == 4 || i == 6 || i == 8 || i == 16) ok(im.SymType == test->sym_type, "Unexpected module type %u\n", im.SymType); - todo_wine_if(i == 8 || i == 10) - ok(!im.TypeInfo, "No type info present\n"); if (test->mismatch_in) { unsigned val; if (has_mismatch(test->mismatch_in, '!', &val)) { + ok(val < ARRAY_SIZE(test_files), "Incorrect index\n"); make_path(filename, topdir, NULL, L"bar.pdb"); todo_wine ok(!wcscmp(filename, im.LoadedPdbName), "Unexpected value '%ls\n", im.LoadedPdbName); todo_wine ok(im.PdbUnmatched, "Unexpected value\n"); - todo_wine - ok(im.PdbUnmatched, "Unexpected value\n"); ok(!im.DbgUnmatched, "Unexpected value\n"); todo_wine ok(IsEqualGUID(&im.PdbSig70, test_files[val].guid), "Unexpected value %s %s\n", wine_dbgstr_guid(&im.PdbSig70), wine_dbgstr_guid(test_files[val].guid)); + ok(im.PdbSig == 0, "Unexpected value\n"); todo_wine ok(im.PdbAge == test_files[val].age_or_timestamp, "Unexpected value\n"); } else if (has_mismatch(test->mismatch_in, 'P', &val)) { ok(val < ARRAY_SIZE(test_files), "Incorrect index\n"); + ok(!im.LoadedPdbName[0], "Unexpected value\n"); ok(!im.PdbUnmatched, "Unexpected value\n"); ok(!im.DbgUnmatched, "Unexpected value\n"); ok(IsEqualGUID(&im.PdbSig70, test_files[val].guid), "Unexpected value %s %s\n", wine_dbgstr_guid(&im.PdbSig70), wine_dbgstr_guid(test_files[val].guid)); + ok(im.PdbSig == 0, "Unexpected value\n"); ok(im.PdbAge == test_files[val].age_or_timestamp + 1, "Unexpected value\n"); } - else if (has_mismatch(test->mismatch_in, 'D', &val)) + else if (has_mismatch(test->mismatch_in, 'F', &val)) { ok(val < ARRAY_SIZE(test_files), "Incorrect index\n"); + if (test->flags & SLMFLAG_NO_SYMBOLS) + todo_wine_if(i == 8) + ok(!im.LoadedPdbName[0], "Unexpected value\n"); + else + { + make_path(filename, topdir, NULL, L"bar.pdb"); + ok(!wcscmp(im.LoadedPdbName, filename), "Unexpected value\n"); + } ok(!im.PdbUnmatched, "Unexpected value\n"); ok(!im.DbgUnmatched, "Unexpected value\n"); + ok(IsEqualGUID(&im.PdbSig70, test_files[val].guid), "Unexpected value %s %s\n", + wine_dbgstr_guid(&im.PdbSig70), wine_dbgstr_guid(test_files[val].guid)); + todo_wine_if(i == 10) + ok(im.PdbSig == 0, "Unexpected value\n"); + ok(im.PdbAge == test_files[val].age_or_timestamp, "Unexpected value\n"); } + ok(im.TimeDateStamp == 12324, "Unexpected value\n"); } else { + ok(!im.LoadedPdbName[0], "Unexpected value3 %ls\n", im.LoadedPdbName); ok(!im.PdbUnmatched, "Unexpected value\n"); ok(!im.DbgUnmatched, "Unexpected value\n"); + ok(IsEqualGUID(&im.PdbSig70, &null_guid), "Unexpected value %s\n", wine_dbgstr_guid(&im.PdbSig70)); + ok(im.PdbSig == 0, "Unexpected value\n"); + ok(!im.PdbAge, "Unexpected value\n"); + /* native returns either 0 or the actual timestamp depending on test case */ + todo_wine_if(i == 4 || i == 5 || i == 7 || i == 9 || i == 11 || i == 13 || (i >= 15 && i <= 17)) + ok(!im.TimeDateStamp || broken(im.TimeDateStamp == 12324), "Unexpected value\n"); } ok(im.ImageSize == 0x6666, "Unexpected image size\n"); memset(&md, 0, sizeof(md));
1
0
0
0
David McFarland : mmdevapi: Add stub for IDeviceTopology.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: 1496ce16147dfee4048dfa3ad6f8d758b0f9f691 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1496ce16147dfee4048dfa3ad6f8d7…
Author: David McFarland <corngood(a)gmail.com> Date: Sat Aug 12 00:50:24 2023 -0300 mmdevapi: Add stub for IDeviceTopology. --- dlls/mmdevapi/devenum.c | 298 +++++++++++++++++++++++++++++++++++++++- dlls/mmdevapi/tests/mmdevenum.c | 1 - 2 files changed, 297 insertions(+), 2 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index 3c2085339ed..66f954fad44 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -87,6 +87,16 @@ typedef struct IPropertyBagImpl { static const IPropertyBagVtbl PB_Vtbl; +typedef struct IConnectorImpl { + IConnector IConnector_iface; + LONG ref; +} IConnectorImpl; + +typedef struct IDeviceTopologyImpl { + IDeviceTopology IDeviceTopology_iface; + LONG ref; +} IDeviceTopologyImpl; + static HRESULT MMDevPropStore_Create(MMDevice *This, DWORD access, IPropertyStore **ppv); static inline MMDevPropStore *impl_from_IPropertyStore(IPropertyStore *iface) @@ -109,6 +119,18 @@ static inline IPropertyBagImpl *impl_from_IPropertyBag(IPropertyBag *iface) return CONTAINING_RECORD(iface, IPropertyBagImpl, IPropertyBag_iface); } +static HRESULT DeviceTopology_Create(IMMDevice *device, IDeviceTopology **ppv); + +static inline IConnectorImpl *impl_from_IConnector(IConnector *iface) +{ + return CONTAINING_RECORD(iface, IConnectorImpl, IConnector_iface); +} + +static inline IDeviceTopologyImpl *impl_from_IDeviceTopology(IDeviceTopology *iface) +{ + return CONTAINING_RECORD(iface, IDeviceTopologyImpl, IDeviceTopology_iface); +} + static const WCHAR propkey_formatW[] = L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X},%d"; static HRESULT MMDevPropStore_OpenPropKey(const GUID *guid, DWORD flow, HKEY *propkey) @@ -667,7 +689,7 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls } else if (IsEqualIID(riid, &IID_IDeviceTopology)) { - FIXME("IID_IDeviceTopology unsupported\n"); + hr = DeviceTopology_Create(iface, (IDeviceTopology**)ppv); } else if (IsEqualIID(riid, &IID_IDirectSound) || IsEqualIID(riid, &IID_IDirectSound8)) @@ -1660,3 +1682,277 @@ static const IMMDeviceVtbl info_device_Vtbl = static IMMDevice info_device = { &info_device_Vtbl }; + +static HRESULT WINAPI Connector_QueryInterface(IConnector *iface, REFIID riid, void **ppv) +{ + IConnectorImpl *This = impl_from_IConnector(iface); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); + + if (!ppv) + return E_POINTER; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IConnector)) + *ppv = &This->IConnector_iface; + else { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown *)*ppv); + + return S_OK; +} + +static ULONG WINAPI Connector_AddRef(IConnector *iface) +{ + IConnectorImpl *This = impl_from_IConnector(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p) new ref %lu\n", This, ref); + return ref; +} + +static ULONG WINAPI Connector_Release(IConnector *iface) +{ + IConnectorImpl *This = impl_from_IConnector(iface); + ULONG ref = InterlockedDecrement(&This->ref); + TRACE("(%p) new ref %lu\n", This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI Connector_GetType( + IConnector *This, + ConnectorType *pType) +{ + FIXME("(%p) - partial stub\n", This); + *pType = Physical_Internal; + return S_OK; +} + +static HRESULT WINAPI Connector_GetDataFlow( + IConnector *This, + DataFlow *pFlow) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI Connector_ConnectTo( + IConnector *This, + IConnector *pConnectTo) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI Connector_Disconnect( + IConnector *This) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI Connector_IsConnected( + IConnector *This, + BOOL *pbConnected) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI Connector_GetConnectedTo( + IConnector *This, + IConnector **ppConTo) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI Connector_GetConnectorIdConnectedTo( + IConnector *This, + LPWSTR *ppwstrConnectorId) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI Connector_GetDeviceIdConnectedTo( + IConnector *This, + LPWSTR *ppwstrDeviceId) +{ + FIXME("(%p) - stub\n", This); + return E_NOTIMPL; +} + +static const IConnectorVtbl Connector_Vtbl = +{ + Connector_QueryInterface, + Connector_AddRef, + Connector_Release, + Connector_GetType, + Connector_GetDataFlow, + Connector_ConnectTo, + Connector_Disconnect, + Connector_IsConnected, + Connector_GetConnectedTo, + Connector_GetConnectorIdConnectedTo, + Connector_GetDeviceIdConnectedTo, +}; + +HRESULT Connector_Create(IConnector **ppv) +{ + IConnectorImpl *This; + + This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + + This->IConnector_iface.lpVtbl = &Connector_Vtbl; + This->ref = 1; + + *ppv = &This->IConnector_iface; + + return S_OK; +} + +static HRESULT WINAPI DT_QueryInterface(IDeviceTopology *iface, REFIID riid, void **ppv) +{ + IDeviceTopologyImpl *This = impl_from_IDeviceTopology(iface); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); + + if (!ppv) + return E_POINTER; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IDeviceTopology)) + *ppv = &This->IDeviceTopology_iface; + else { + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown *)*ppv); + + return S_OK; +} + +static ULONG WINAPI DT_AddRef(IDeviceTopology *iface) +{ + IDeviceTopologyImpl *This = impl_from_IDeviceTopology(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("(%p) new ref %lu\n", This, ref); + return ref; +} + +static ULONG WINAPI DT_Release(IDeviceTopology *iface) +{ + IDeviceTopologyImpl *This = impl_from_IDeviceTopology(iface); + ULONG ref = InterlockedDecrement(&This->ref); + TRACE("(%p) new ref %lu\n", This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI DT_GetConnectorCount(IDeviceTopology *This, + UINT *pCount) +{ + FIXME("(%p)->(%p) - partial stub\n", This, pCount); + + if (!pCount) + return E_POINTER; + + *pCount = 1; + return S_OK; +} + +static HRESULT WINAPI DT_GetConnector(IDeviceTopology *This, + UINT nIndex, + IConnector **ppConnector) +{ + FIXME("(%p)->(%u, %p) - partial stub\n", This, nIndex, ppConnector); + + if (nIndex == 0) + { + return Connector_Create(ppConnector); + } + + return E_INVALIDARG; +} + +static HRESULT WINAPI DT_GetSubunitCount(IDeviceTopology *This, + UINT *pCount) +{ + FIXME("(%p)->(%p) - stub\n", This, pCount); + return E_NOTIMPL; +} + +static HRESULT WINAPI DT_GetSubunit(IDeviceTopology *This, + UINT nIndex, + ISubUnit **ppConnector) +{ + FIXME("(%p)->(%u, %p) - stub\n", This, nIndex, ppConnector); + return E_NOTIMPL; +} + +static HRESULT WINAPI DT_GetPartById(IDeviceTopology *This, + UINT nId, + IPart **ppPart) +{ + FIXME("(%p)->(%u, %p) - stub\n", This, nId, ppPart); + return E_NOTIMPL; +} + +static HRESULT WINAPI DT_GetDeviceId(IDeviceTopology *This, + LPWSTR *ppwstrDeviceId) +{ + FIXME("(%p)->(%p) - stub\n", This, ppwstrDeviceId); + return E_NOTIMPL; +} + +static HRESULT WINAPI DT_GetSignalPath(IDeviceTopology *This, + IPart *pIPartFrom, + IPart *pIPartTo, + BOOL bRejectMixedPaths, + IPartsList **ppParts) +{ + FIXME("(%p)->(%p, %p, %s, %p) - stub\n", + This, pIPartFrom, pIPartTo, bRejectMixedPaths ? "TRUE" : "FALSE", ppParts); + return E_NOTIMPL; +} + +static const IDeviceTopologyVtbl DeviceTopology_Vtbl = +{ + DT_QueryInterface, + DT_AddRef, + DT_Release, + DT_GetConnectorCount, + DT_GetConnector, + DT_GetSubunitCount, + DT_GetSubunit, + DT_GetPartById, + DT_GetDeviceId, + DT_GetSignalPath, +}; + +static HRESULT DeviceTopology_Create(IMMDevice *device, IDeviceTopology **ppv) +{ + IDeviceTopologyImpl *This; + + This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + + This->IDeviceTopology_iface.lpVtbl = &DeviceTopology_Vtbl; + This->ref = 1; + + *ppv = &This->IDeviceTopology_iface; + + return S_OK; +} diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index f34386a575a..3bceefb91a3 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -432,7 +432,6 @@ static void test_DeviceTopology(IMMDeviceEnumerator *mme) if (hr != S_OK || !dev) { if (hr == E_NOINTERFACE) - todo_wine win_skip("IDeviceTopology interface not found\n"); else skip("IDeviceTopology Activation returns 0x%08lx\n", hr);
1
0
0
0
David McFarland : mmdevapi/tests: Add test for IDeviceTopology.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: ec2db2ff754055515b1485496cb9415e9a7d2afd URL:
https://gitlab.winehq.org/wine/wine/-/commit/ec2db2ff754055515b1485496cb941…
Author: David McFarland <corngood(a)gmail.com> Date: Sat Aug 12 00:50:44 2023 -0300 mmdevapi/tests: Add test for IDeviceTopology. --- dlls/mmdevapi/tests/mmdevenum.c | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index a5b692a53ee..f34386a575a 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -29,6 +29,7 @@ #include "dshow.h" #include "dsound.h" #include "devpkey.h" +#include "devicetopology.h" DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); @@ -382,6 +383,71 @@ static IMMNotificationClientVtbl notif_vtbl = { static IMMNotificationClient notif = { ¬if_vtbl }; +static void test_connectors(IDeviceTopology *dt) +{ + HRESULT hr; + UINT connector_count; + + hr = IDeviceTopology_GetConnectorCount(dt, &connector_count); + ok(hr == S_OK, "GetConnectorCount returns 0x%08lx\n", hr); + trace("connector count: %u\n", connector_count); + + if (hr == S_OK && connector_count > 0) + { + IConnector *connector; + + hr = IDeviceTopology_GetConnector(dt, 0, &connector); + ok(hr == S_OK, "GetConnector returns 0x%08lx\n", hr); + + if (hr == S_OK) + { + ConnectorType type; + + hr = IConnector_GetType(connector, &type); + ok(hr == S_OK, "GetConnector returns 0x%08lx\n", hr); + trace("connector 0 type: %u\n", connector_count); + } + } +} + +static void test_DeviceTopology(IMMDeviceEnumerator *mme) +{ + IMMDevice *dev = NULL; + IDeviceTopology *dt = NULL; + HRESULT hr; + + hr = IMMDeviceEnumerator_GetDefaultAudioEndpoint(mme, eRender, eMultimedia, &dev); + ok(hr == S_OK || hr == E_NOTFOUND, "GetDefaultAudioEndpoint failed: 0x%08lx\n", hr); + if (hr != S_OK || !dev) + { + if (hr == E_NOTFOUND) + win_skip("No sound card available\n"); + else + skip("GetDefaultAudioEndpoint returns 0x%08lx\n", hr); + goto cleanup; + } + + hr = IMMDevice_Activate(dev, &IID_IDeviceTopology, CLSCTX_INPROC_SERVER, NULL, (void**)&dt); + ok(hr == S_OK || hr == E_NOINTERFACE, "IDeviceTopology Activation failed: 0x%08lx\n", hr); + if (hr != S_OK || !dev) + { + if (hr == E_NOINTERFACE) + todo_wine + win_skip("IDeviceTopology interface not found\n"); + else + skip("IDeviceTopology Activation returns 0x%08lx\n", hr); + goto cleanup; + } + + test_connectors(dt); + + IDeviceTopology_Release(dt); + +cleanup: + if (dev) + IMMDevice_Release(dev); +} + /* Only do parameter tests here, the actual MMDevice testing should be a separate test */ START_TEST(mmdevenum) { @@ -478,6 +544,8 @@ START_TEST(mmdevenum) hr = IMMDeviceEnumerator_UnregisterEndpointNotificationCallback(mme, ¬if); ok(hr == E_NOTFOUND, "UnregisterEndpointNotificationCallback failed: %08lx\n", hr); + test_DeviceTopology(mme); + IMMDeviceEnumerator_Release(mme); test_ActivateAudioInterfaceAsync();
1
0
0
0
David McFarland : mmdevapi: Implement IAudioClient3_GetSharedModeEnginePeriod.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: a30a617212788e92a7684cd861634c6bc4a8e0e0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a30a617212788e92a7684cd861634c…
Author: David McFarland <corngood(a)gmail.com> Date: Sat Aug 12 00:11:49 2023 -0300 mmdevapi: Implement IAudioClient3_GetSharedModeEnginePeriod. For now min/max/default are all hard-coded to ~10ms. --- dlls/mmdevapi/client.c | 15 +++++++++++---- dlls/mmdevapi/tests/render.c | 1 - 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/mmdevapi/client.c b/dlls/mmdevapi/client.c index 5d71f079483..e0c12b8e534 100644 --- a/dlls/mmdevapi/client.c +++ b/dlls/mmdevapi/client.c @@ -929,10 +929,17 @@ static HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface, UINT32 *max_period_frames) { struct audio_client *This = impl_from_IAudioClient3(iface); - FIXME("(%p)->(%p, %p, %p, %p, %p) - stub\n", This, format, default_period_frames, - unit_period_frames, min_period_frames, - max_period_frames); - return E_NOTIMPL; + FIXME("(%p)->(%p, %p, %p, %p, %p) - partial stub\n", + This, format, default_period_frames, + unit_period_frames, min_period_frames, + max_period_frames); + + *default_period_frames = + *min_period_frames = + *max_period_frames = + format->nSamplesPerSec / 100; /* ~10ms */ + *unit_period_frames = 1; + return S_OK; } static HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface, diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 14442036763..a7da68ec3f1 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -346,7 +346,6 @@ static void test_audioclient(void) hr = IAudioClient3_GetSharedModeEnginePeriod( ac3, pwfx, &default_period, &unit_period, &min_period, &max_period); - todo_wine ok(hr == S_OK, "GetSharedModeEnginePeriod returns %08lx\n", hr); hr = IAudioClient3_InitializeSharedAudioStream(
1
0
0
0
David McFarland : mmdevapi: Implement IAudioClient3_InitializeSharedAudioStream.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: 73a6f764d08e24ad06433816408f9bb39fdaa4f1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/73a6f764d08e24ad06433816408f9b…
Author: David McFarland <corngood(a)gmail.com> Date: Sat Aug 12 00:11:49 2023 -0300 mmdevapi: Implement IAudioClient3_InitializeSharedAudioStream. --- dlls/mmdevapi/client.c | 10 ++++++++-- dlls/mmdevapi/tests/render.c | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/mmdevapi/client.c b/dlls/mmdevapi/client.c index 3e0c70a44f4..5d71f079483 100644 --- a/dlls/mmdevapi/client.c +++ b/dlls/mmdevapi/client.c @@ -950,8 +950,14 @@ static HRESULT WINAPI client_InitializeSharedAudioStream(IAudioClient3 *iface, D const GUID *session_guid) { struct audio_client *This = impl_from_IAudioClient3(iface); - FIXME("(%p)->(0x%lx, %u, %p, %s) - stub\n", This, flags, period_frames, format, debugstr_guid(session_guid)); - return E_NOTIMPL; + REFERENCE_TIME duration; + FIXME("(%p)->(0x%lx, %u, %p, %s) - partial stub\n", This, flags, period_frames, format, debugstr_guid(session_guid)); + + if (!format) + return E_POINTER; + + duration = period_frames * (REFERENCE_TIME)10000000 / format->nSamplesPerSec; + return client_Initialize(iface, AUDCLNT_SHAREMODE_SHARED, flags, duration, 0, format, session_guid); } const IAudioClient3Vtbl AudioClient3_Vtbl = diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index fac88e211e4..14442036763 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -351,7 +351,6 @@ static void test_audioclient(void) hr = IAudioClient3_InitializeSharedAudioStream( ac3, AUDCLNT_SHAREMODE_SHARED, default_period, pwfx, NULL); - todo_wine ok(hr == S_OK, "InitializeSharedAudioStream returns %08lx\n", hr); IAudioClient3_Release(ac3);
1
0
0
0
David McFarland : mmdevapi/tests: Add test for AudioClient3_InitializeSharedAudioStream.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: eef4a25d0cfe4ffbb703a07692360e7a8d2e07cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/eef4a25d0cfe4ffbb703a07692360e…
Author: David McFarland <corngood(a)gmail.com> Date: Fri Aug 11 23:13:11 2023 -0300 mmdevapi/tests: Add test for AudioClient3_InitializeSharedAudioStream. --- dlls/mmdevapi/tests/render.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 3e24ac45944..fac88e211e4 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -341,8 +341,28 @@ static void test_audioclient(void) broken(hr == E_NOINTERFACE) /* win8 */, "Failed to query IAudioClient3 interface: %08lx\n", hr); - if(hr == S_OK) + if(hr == S_OK){ + UINT32 default_period = 0, unit_period, min_period, max_period; + + hr = IAudioClient3_GetSharedModeEnginePeriod( + ac3, pwfx, &default_period, &unit_period, &min_period, &max_period); + todo_wine + ok(hr == S_OK, "GetSharedModeEnginePeriod returns %08lx\n", hr); + + hr = IAudioClient3_InitializeSharedAudioStream( + ac3, AUDCLNT_SHAREMODE_SHARED, default_period, pwfx, NULL); + todo_wine + ok(hr == S_OK, "InitializeSharedAudioStream returns %08lx\n", hr); + IAudioClient3_Release(ac3); + IAudioClient_Release(ac); + + hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, + NULL, (void**)&ac); + ok(hr == S_OK, "Activation failed with %08lx\n", hr); + } + else + win_skip("IAudioClient3 is not present\n"); test_uninitialized(ac);
1
0
0
0
Rémi Bernon : win32u: Keep the vulkan GUID on the gpu structure.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: 0d8bdf392f011101d911e7e8b17e5d3fc513b83f URL:
https://gitlab.winehq.org/wine/wine/-/commit/0d8bdf392f011101d911e7e8b17e5d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Feb 28 14:27:15 2024 +0100 win32u: Keep the vulkan GUID on the gpu structure. --- dlls/win32u/sysparams.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index c615b0b37bc..6c4223f0cdb 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -113,6 +113,7 @@ struct gpu char guid[39]; LUID luid; UINT index; + GUID vulkan_uuid; UINT adapter_count; }; @@ -1059,13 +1060,20 @@ static BOOL read_gpu_from_registry( struct gpu *gpu ) NtClose( subkey ); } + if ((subkey = reg_open_ascii_key( hkey, devpropkey_gpu_vulkan_uuidA ))) + { + if (query_reg_value( subkey, NULL, value, sizeof(buffer) ) == sizeof(GUID)) + gpu->vulkan_uuid = *(const GUID *)value->Data; + NtClose( subkey ); + } + NtClose( hkey ); return TRUE; } static BOOL write_gpu_to_registry( const struct gpu *gpu, const struct pci_id *pci, - const GUID *vulkan_uuid, ULONGLONG memory_size ) + ULONGLONG memory_size ) { const WCHAR *desc; char buffer[4096], *tmp; @@ -1158,7 +1166,7 @@ static BOOL write_gpu_to_registry( const struct gpu *gpu, const struct pci_id *p if ((subkey = reg_create_ascii_key( hkey, devpropkey_gpu_vulkan_uuidA, 0, NULL ))) { set_reg_value( subkey, NULL, 0xffff0000 | DEVPROP_TYPE_GUID, - &vulkan_uuid, sizeof(vulkan_uuid) ); + &gpu->vulkan_uuid, sizeof(gpu->vulkan_uuid) ); NtClose( subkey ); } @@ -1266,6 +1274,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) memset( &ctx->gpu, 0, sizeof(ctx->gpu) ); ctx->gpu.index = ctx->gpu_count; lstrcpyW( ctx->gpu.name, gpu->name ); + ctx->gpu.vulkan_uuid = gpu->vulkan_uuid; ctx->monitor_count = 0; ctx->mode_count = 0; @@ -1311,7 +1320,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) NtClose( hkey ); - if (!write_gpu_to_registry( &ctx->gpu, &pci_id, &gpu->vulkan_uuid, gpu->memory_size )) + if (!write_gpu_to_registry( &ctx->gpu, &pci_id, gpu->memory_size )) WARN( "Failed to write gpu to registry\n" ); else ctx->gpu_count++;
1
0
0
0
Rémi Bernon : win32u: Split read / write of gpu to registry to separate helpers.
by Alexandre Julliard
07 Mar '24
07 Mar '24
Module: wine Branch: master Commit: c8d2955cdc4baa9858a302a37ccf09f6b2a3b72a URL:
https://gitlab.winehq.org/wine/wine/-/commit/c8d2955cdc4baa9858a302a37ccf09…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Feb 27 14:32:00 2024 +0100 win32u: Split read / write of gpu to registry to separate helpers. --- dlls/win32u/sysparams.c | 261 ++++++++++++++++++++++++++++++------------------ 1 file changed, 163 insertions(+), 98 deletions(-)
1
0
0
0
← Newer
1
...
56
57
58
59
60
61
62
...
78
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
Results per page:
10
25
50
100
200