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 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
1 participants
996 discussions
Start a n
N
ew thread
Jacek Caban : ntdll: Use module path as assembly path for manifests embedded in resources.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 2d764e90dd2c624f7a2d863ab29bd418ed33d252 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d764e90dd2c624f7a2d863a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Mar 6 14:48:25 2020 +0100 ntdll: Use module path as assembly path for manifests embedded in resources. Fixes Office 2016 installer, which removes its .exe directory from load path, but expects to be able to load files listed in manifest. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/actctx.c | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 9e7782c1ee..c513419828 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -818,6 +818,29 @@ static inline const char* debugstr_version(const struct assembly_version *ver) return wine_dbg_sprintf("%u.%u.%u.%u", ver->major, ver->minor, ver->build, ver->revision); } +static NTSTATUS get_module_filename( HMODULE module, UNICODE_STRING *str, unsigned int extra_len ) +{ + NTSTATUS status; + ULONG_PTR magic; + LDR_MODULE *pldr; + + LdrLockLoaderLock(0, NULL, &magic); + status = LdrFindEntryForAddress( module, &pldr ); + if (status == STATUS_SUCCESS) + { + if ((str->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, + pldr->FullDllName.Length + extra_len + sizeof(WCHAR) ))) + { + memcpy( str->Buffer, pldr->FullDllName.Buffer, pldr->FullDllName.Length + sizeof(WCHAR) ); + str->Length = pldr->FullDllName.Length; + str->MaximumLength = pldr->FullDllName.Length + extra_len + sizeof(WCHAR); + } + else status = STATUS_NO_MEMORY; + } + LdrUnlockLoaderLock(0, magic); + return status; +} + static struct assembly *add_assembly(ACTIVATION_CONTEXT *actctx, enum assembly_type at) { struct assembly *assembly; @@ -2790,7 +2813,7 @@ static NTSTATUS parse_manifest_buffer( struct actctx_loader* acl, struct assembl } static NTSTATUS parse_manifest( struct actctx_loader* acl, struct assembly_identity* ai, - LPCWSTR filename, LPCWSTR directory, BOOL shared, + LPCWSTR filename, HANDLE module, LPCWSTR directory, BOOL shared, const void *buffer, SIZE_T size ) { xmlbuf_t xmlbuf; @@ -2806,7 +2829,14 @@ static NTSTATUS parse_manifest( struct actctx_loader* acl, struct assembly_ident if (directory && !(assembly->directory = strdupW(directory))) return STATUS_NO_MEMORY; - if (filename) assembly->manifest.info = strdupW( filename + 4 /* skip \??\ prefix */ ); + if (!filename) + { + UNICODE_STRING module_path; + if ((status = get_module_filename( module, &module_path, 0 ))) return status; + assembly->manifest.info = module_path.Buffer; + } + else if(!(assembly->manifest.info = strdupW( filename + 4 /* skip \??\ prefix */ ))) return STATUS_NO_MEMORY; + assembly->manifest.type = assembly->manifest.info ? ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE : ACTIVATION_CONTEXT_PATH_TYPE_NONE; @@ -2863,29 +2893,6 @@ static NTSTATUS open_nt_file( HANDLE *handle, UNICODE_STRING *name ) return NtOpenFile( handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ, FILE_SYNCHRONOUS_IO_ALERT ); } -static NTSTATUS get_module_filename( HMODULE module, UNICODE_STRING *str, unsigned int extra_len ) -{ - NTSTATUS status; - ULONG_PTR magic; - LDR_MODULE *pldr; - - LdrLockLoaderLock(0, NULL, &magic); - status = LdrFindEntryForAddress( module, &pldr ); - if (status == STATUS_SUCCESS) - { - if ((str->Buffer = RtlAllocateHeap( GetProcessHeap(), 0, - pldr->FullDllName.Length + extra_len + sizeof(WCHAR) ))) - { - memcpy( str->Buffer, pldr->FullDllName.Buffer, pldr->FullDllName.Length + sizeof(WCHAR) ); - str->Length = pldr->FullDllName.Length; - str->MaximumLength = pldr->FullDllName.Length + extra_len + sizeof(WCHAR); - } - else status = STATUS_NO_MEMORY; - } - LdrUnlockLoaderLock(0, magic); - return status; -} - static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assembly_identity* ai, LPCWSTR filename, LPCWSTR directory, BOOL shared, HANDLE hModule, LPCWSTR resname, ULONG lang ) @@ -2937,7 +2944,7 @@ static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assemb if (status == STATUS_SUCCESS) status = LdrAccessResource(hModule, entry, &ptr, NULL); if (status == STATUS_SUCCESS) - status = parse_manifest(acl, ai, filename, directory, shared, ptr, entry->Size); + status = parse_manifest(acl, ai, filename, hModule, directory, shared, ptr, entry->Size); return status; } @@ -3024,7 +3031,7 @@ static NTSTATUS get_manifest_in_manifest_file( struct actctx_loader* acl, struct status = NtQueryInformationFile( file, &io, &info, sizeof(info), FileEndOfFileInformation ); if (status == STATUS_SUCCESS) - status = parse_manifest(acl, ai, filename, directory, shared, base, info.EndOfFile.QuadPart); + status = parse_manifest(acl, ai, filename, NULL, directory, shared, base, info.EndOfFile.QuadPart); NtUnmapViewOfSection( GetCurrentProcess(), base ); return status;
1
0
0
0
Zebediah Figura : setupapi: Use the "section" and "description" fields directly in more places.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: dd74b9c8e659398f64be0084337adef99e14a754 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dd74b9c8e659398f64be0084…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:13:16 2020 -0500 setupapi: Use the "section" and "description" fields directly in more places. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/devinst.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index a812545aa9..a21959a262 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -4333,7 +4333,7 @@ CONFIGRET WINAPI CM_Get_DevNode_PropertyW(DEVINST dev, const DEVPROPKEY *key, DE */ BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) { - WCHAR section[LINE_LEN], section_ext[LINE_LEN], iface_section[LINE_LEN], refstr[LINE_LEN], guidstr[39]; + WCHAR section_ext[LINE_LEN], iface_section[LINE_LEN], refstr[LINE_LEN], guidstr[39]; UINT install_flags = SPINST_ALL; struct device_iface *iface; struct device *device; @@ -4360,9 +4360,7 @@ BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO devinfo, SP_DEVINFO_DATA *de if ((hinf = SetupOpenInfFileW(driver->inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) return FALSE; - SetupFindFirstLineW(hinf, driver->mfg_key, driver->description, &ctx); - SetupGetStringFieldW(&ctx, 1, section, ARRAY_SIZE(section), NULL); - SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL); + SetupDiGetActualSectionToInstallW(hinf, driver->section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL); if (device->params.Flags & DI_NOFILECOPY) install_flags &= ~SPINST_FILES; @@ -4410,12 +4408,11 @@ BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO devinfo, SP_DEVINFO_DATA *de BOOL WINAPI SetupDiRegisterCoDeviceInstallers(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) { static const WCHAR coinstallersW[] = {'.','C','o','I','n','s','t','a','l','l','e','r','s',0}; - WCHAR coinst_key[LINE_LEN], coinst_key_ext[LINE_LEN]; + WCHAR coinst_key_ext[LINE_LEN]; struct device *device; struct driver *driver; void *callback_ctx; HKEY driver_key; - INFCONTEXT ctx; HINF hinf; LONG l; @@ -4434,9 +4431,7 @@ BOOL WINAPI SetupDiRegisterCoDeviceInstallers(HDEVINFO devinfo, SP_DEVINFO_DATA if ((hinf = SetupOpenInfFileW(driver->inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) return FALSE; - SetupFindFirstLineW(hinf, driver->mfg_key, driver->description, &ctx); - SetupGetStringFieldW(&ctx, 1, coinst_key, ARRAY_SIZE(coinst_key), NULL); - SetupDiGetActualSectionToInstallW(hinf, coinst_key, coinst_key_ext, ARRAY_SIZE(coinst_key_ext), NULL, NULL); + SetupDiGetActualSectionToInstallW(hinf, driver->section, coinst_key_ext, ARRAY_SIZE(coinst_key_ext), NULL, NULL); lstrcatW(coinst_key_ext, coinstallersW); if ((l = create_driver_key(device, &driver_key))) @@ -4998,10 +4993,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) static const WCHAR addserviceW[] = {'A','d','d','S','e','r','v','i','c','e',0}; static const WCHAR rootW[] = {'r','o','o','t','\\',0}; WCHAR section[LINE_LEN], section_ext[LINE_LEN], subsection[LINE_LEN], inf_path[MAX_PATH], *extptr, *filepart; - WCHAR svc_name[LINE_LEN], field[LINE_LEN]; UINT install_flags = SPINST_ALL; HKEY driver_key, device_key; SC_HANDLE manager, service; + WCHAR svc_name[LINE_LEN]; struct device *device; struct driver *driver; void *callback_ctx; @@ -5024,13 +5019,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) if ((hinf = SetupOpenInfFileW(driver->inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) return FALSE; - SetupFindFirstLineW(hinf, driver->mfg_key, driver->description, &ctx); - - SetupGetStringFieldW(&ctx, 0, field, ARRAY_SIZE(field), NULL); - RegSetValueExW(device->key, L"DeviceDesc", 0, REG_SZ, (BYTE *)field, wcslen(field) * sizeof(WCHAR)); + RegSetValueExW(device->key, L"DeviceDesc", 0, REG_SZ, (BYTE *)driver->description, + wcslen(driver->description) * sizeof(WCHAR)); - SetupGetStringFieldW(&ctx, 1, section, ARRAY_SIZE(section), NULL); - SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, &extptr); + SetupDiGetActualSectionToInstallW(hinf, driver->section, section_ext, ARRAY_SIZE(section_ext), NULL, &extptr); if ((l = create_driver_key(device, &driver_key))) {
1
0
0
0
Zebediah Figura : setupapi: Implement SetupDiGetDriverInfoDetail().
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 5cff8c9e2e926edcc74202fa3354c2a4bb5ebef3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5cff8c9e2e926edcc74202fa…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:13:15 2020 -0500 setupapi: Implement SetupDiGetDriverInfoDetail(). Needed by the Windows Device Framework co-installer. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/devinst.c | 153 ++++++++++++++++++++++++++++++++++++++++++ dlls/setupapi/setupapi.spec | 4 +- dlls/setupapi/tests/devinst.c | 98 +++++++++++++++++++++++++-- 3 files changed, 249 insertions(+), 6 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=5cff8c9e2e926edcc742…
1
0
0
0
Zebediah Figura : setupapi: Implement SetupDiGetSelectedDriver().
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 6971dfcfc21e887e4b5724d4f32e29d012e1b5be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6971dfcfc21e887e4b5724d4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:13:14 2020 -0500 setupapi: Implement SetupDiGetSelectedDriver(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48639
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/devinst.c | 90 +++++++++++++++++++++++++++++++------------ dlls/setupapi/setupapi.spec | 4 +- dlls/setupapi/tests/devinst.c | 14 +++++++ 3 files changed, 82 insertions(+), 26 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 268965f0fe..ce7268a5e8 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -4645,16 +4645,42 @@ BOOL WINAPI SetupDiBuildDriverInfoList(HDEVINFO devinfo, SP_DEVINFO_DATA *device return TRUE; } +static BOOL copy_driver_data(SP_DRVINFO_DATA_W *data, const struct driver *driver) +{ + INFCONTEXT ctx; + HINF hinf; + + if ((hinf = SetupOpenInfFileW(driver->inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) + return FALSE; + + data->ProviderName[0] = 0; + if (SetupFindFirstLineW(hinf, L"Version", L"Provider", &ctx)) + SetupGetStringFieldW(&ctx, 1, data->ProviderName, ARRAY_SIZE(data->ProviderName), NULL); + wcscpy(data->Description, driver->description); + wcscpy(data->MfgName, driver->manufacturer); + data->DriverType = SPDIT_COMPATDRIVER; + + SetupCloseInfFile(hinf); + + return TRUE; +} + +static void driver_data_wtoa(SP_DRVINFO_DATA_A *a, const SP_DRVINFO_DATA_W *w) +{ + a->DriverType = w->DriverType; + a->Reserved = w->Reserved; + WideCharToMultiByte(CP_ACP, 0, w->Description, -1, a->Description, sizeof(a->Description), NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, w->MfgName, -1, a->MfgName, sizeof(a->MfgName), NULL, NULL); + WideCharToMultiByte(CP_ACP, 0, w->ProviderName, -1, a->ProviderName, sizeof(a->ProviderName), NULL, NULL); +} + /*********************************************************************** * SetupDiEnumDriverInfoW (SETUPAPI.@) */ BOOL WINAPI SetupDiEnumDriverInfoW(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data, DWORD type, DWORD index, SP_DRVINFO_DATA_W *driver_data) { - static const WCHAR providerW[] = {'P','r','o','v','i','d','e','r',0}; struct device *device; - INFCONTEXT ctx; - HINF hinf; TRACE("devinfo %p, device_data %p, type %#x, index %u, driver_data %p.\n", devinfo, device_data, type, index, driver_data); @@ -4675,19 +4701,7 @@ BOOL WINAPI SetupDiEnumDriverInfoW(HDEVINFO devinfo, SP_DEVINFO_DATA *device_dat return FALSE; } - if ((hinf = SetupOpenInfFileW(device->drivers[index].inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) - return FALSE; - - driver_data->ProviderName[0] = 0; - if (SetupFindFirstLineW(hinf, Version, providerW, &ctx)) - SetupGetStringFieldW(&ctx, 1, driver_data->ProviderName, ARRAY_SIZE(driver_data->ProviderName), NULL); - lstrcpyW(driver_data->Description, device->drivers[index].description); - lstrcpyW(driver_data->MfgName, device->drivers[index].manufacturer); - driver_data->DriverType = SPDIT_COMPATDRIVER; - - SetupCloseInfFile(hinf); - - return TRUE; + return copy_driver_data(driver_data, &device->drivers[index]); } /*********************************************************************** @@ -4701,14 +4715,7 @@ BOOL WINAPI SetupDiEnumDriverInfoA(HDEVINFO devinfo, SP_DEVINFO_DATA *device_dat driver_dataW.cbSize = sizeof(driver_dataW); ret = SetupDiEnumDriverInfoW(devinfo, device_data, type, index, &driver_dataW); - driver_data->DriverType = driver_dataW.DriverType; - driver_data->Reserved = driver_dataW.Reserved; - WideCharToMultiByte(CP_ACP, 0, driver_dataW.Description, -1, driver_data->Description, - sizeof(driver_data->Description), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, driver_dataW.MfgName, -1, driver_data->MfgName, - sizeof(driver_data->MfgName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, driver_dataW.ProviderName, -1, driver_data->ProviderName, - sizeof(driver_data->ProviderName), NULL, NULL); + driver_data_wtoa(driver_data, &driver_dataW); return ret; } @@ -4738,6 +4745,41 @@ BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO devinfo, SP_DEVINFO_DATA *device return TRUE; } +/*********************************************************************** + * SetupDiGetSelectedDriverW (SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetSelectedDriverW(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data, SP_DRVINFO_DATA_W *driver_data) +{ + struct device *device; + + TRACE("devinfo %p, device_data %p, driver_data %p.\n", devinfo, device_data, driver_data); + + if (!(device = get_device(devinfo, device_data))) + return FALSE; + + if (!device->selected_driver) + { + SetLastError(ERROR_NO_DRIVER_SELECTED); + return FALSE; + } + + return copy_driver_data(driver_data, device->selected_driver); +} + +/*********************************************************************** + * SetupDiGetSelectedDriverA (SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetSelectedDriverA(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data, SP_DRVINFO_DATA_A *driver_data) +{ + SP_DRVINFO_DATA_W driver_dataW; + BOOL ret; + + driver_dataW.cbSize = sizeof(driver_dataW); + if ((ret = SetupDiGetSelectedDriverW(devinfo, device_data, &driver_dataW))) + driver_data_wtoa(driver_data, &driver_dataW); + return ret; +} + /*********************************************************************** * SetupDiInstallDriverFiles (SETUPAPI.@) */ diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 33ccc48097..233a02e550 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -361,8 +361,8 @@ @ stdcall SetupDiGetINFClassA(str ptr ptr long ptr) @ stdcall SetupDiGetINFClassW(wstr ptr ptr long ptr) @ stub SetupDiGetSelectedDevice -@ stub SetupDiGetSelectedDriverA -@ stub SetupDiGetSelectedDriverW +@ stdcall SetupDiGetSelectedDriverA(ptr ptr ptr) +@ stdcall SetupDiGetSelectedDriverW(ptr ptr ptr) @ stub SetupDiGetWizardPage @ stdcall SetupDiInstallClassA(long str long ptr) @ stub SetupDiInstallClassExA diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index a9ac0d849f..0b1a1fa381 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -2434,6 +2434,20 @@ static void test_driver_list(void) ok(!ret, "Expected failure.\n"); ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#x.\n", GetLastError()); + ret = SetupDiGetSelectedDriverA(set, &device, &driver); + ok(ret /* Win10 1809 */ || GetLastError() == ERROR_NO_DRIVER_SELECTED, + "Got unexpected error %#x.\n", GetLastError()); + + ret = SetupDiSelectBestCompatDrv(set, &device); + ok(ret, "Failed to select driver, error %#x.\n", GetLastError()); + + ret = SetupDiGetSelectedDriverA(set, &device, &driver); + ok(ret, "Failed to get selected driver, error %#x.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(!strcmp(driver.Description, "desc1"), "Got wrong description '%s'.\n", driver.Description); + ok(!strcmp(driver.MfgName, wow64 ? "mfg1_wow" : "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); + ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName); + SetupDiDestroyDeviceInfoList(set); ret = DeleteFileA(inf_path); ok(ret, "Failed to delete %s, error %u.\n", inf_path, GetLastError());
1
0
0
0
Zebediah Figura : strmbase: Remove no longer used DLL registration and vending framework.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 7e788741d1aaf975d6486e2b7f7c4e6098176208 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7e788741d1aaf975d6486e2b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:05:11 2020 -0500 strmbase: Remove no longer used DLL registration and vending framework. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/Makefile.in | 1 - dlls/strmbase/dllfunc.c | 375 ---------------------------------------------- include/wine/strmbase.h | 32 ---- 3 files changed, 408 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7e788741d1aaf975d648…
1
0
0
0
Zebediah Figura : wineqtdecoder: Reimplement COM registration and vending locally.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: dd3d68e5d9e54b204168216da2da6bf6d1d8d296 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dd3d68e5d9e54b204168216d…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:05:10 2020 -0500 wineqtdecoder: Reimplement COM registration and vending locally. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineqtdecoder/Makefile.in | 4 +- dlls/wineqtdecoder/main.c | 292 ++++++++++++++++----------- dlls/wineqtdecoder/qtsplitter.c | 16 +- dlls/wineqtdecoder/qtvdecoder.c | 20 +- dlls/wineqtdecoder/wineqtdecoder_classes.idl | 37 ++++ 5 files changed, 234 insertions(+), 135 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=dd3d68e5d9e54b204168…
1
0
0
0
Zebediah Figura : winegstreamer: Reimplement COM registration and vending locally.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 74dc0c5df9c3094352caedda8ebe14ed2dfd615e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74dc0c5df9c3094352caedda…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:05:09 2020 -0500 winegstreamer: Reimplement COM registration and vending locally. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/Makefile.in | 4 +- dlls/winegstreamer/gst_private.h | 17 +- dlls/winegstreamer/gstdemux.c | 69 +-- dlls/winegstreamer/main.c | 484 +++++++++++---------- dlls/winegstreamer/mfplat.c | 11 +- .../{mfplat.idl => winegstreamer_classes.idl} | 36 +- 6 files changed, 320 insertions(+), 301 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=74dc0c5df9c3094352ca…
1
0
0
0
Zebediah Figura : qcap: Reimplement COM registration and vending locally.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 7bcb8e74ce4b3428ac25db624349949caef69dda URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7bcb8e74ce4b3428ac25db62…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:05:08 2020 -0500 qcap: Reimplement COM registration and vending locally. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/Makefile.in | 4 +- dlls/qcap/audiorecord.c | 24 ++-- dlls/qcap/avico.c | 25 ++-- dlls/qcap/avimux.c | 17 +-- dlls/qcap/capturegraph.c | 40 +++--- dlls/qcap/qcap_classes.idl | 70 ++++++++++ dlls/qcap/qcap_main.c | 321 +++++++++++++++++++++++++++++---------------- dlls/qcap/qcap_main.h | 19 +-- dlls/qcap/smartteefilter.c | 16 +-- dlls/qcap/vfwcapture.c | 11 +- 10 files changed, 340 insertions(+), 207 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7bcb8e74ce4b3428ac25…
1
0
0
0
Zebediah Figura : qedit: Register the sample grabber and null renderer.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: cf376c96e8d7ac8308f37217400de251d13299cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cf376c96e8d7ac8308f37217…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun Mar 8 14:05:07 2020 -0500 qedit: Register the sample grabber and null renderer. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/main.c | 77 ++++++++++++++++++++++++++++++++++++++++++++-- dlls/qedit/qedit_private.h | 3 +- dlls/quartz/regsvr.c | 12 -------- 3 files changed, 77 insertions(+), 15 deletions(-) diff --git a/dlls/qedit/main.c b/dlls/qedit/main.c index a271f9adb7..3797d96dcf 100644 --- a/dlls/qedit/main.c +++ b/dlls/qedit/main.c @@ -192,12 +192,71 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) return S_OK; } +static const REGPINTYPES reg_null_mt = {&GUID_NULL, &GUID_NULL}; + +static const REGFILTERPINS2 reg_sample_grabber_pins[2] = +{ + { + .cInstances = 1, + .nMediaTypes = 1, + .lpMediaType = ®_null_mt, + }, + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .cInstances = 1, + .nMediaTypes = 1, + .lpMediaType = ®_null_mt, + }, +}; + +static const REGFILTER2 reg_sample_grabber = +{ + .dwVersion = 2, + .dwMerit = MERIT_DO_NOT_USE, + .u.s2.cPins2 = 2, + .u.s2.rgPins2 = reg_sample_grabber_pins, +}; + +static const REGFILTERPINS2 reg_null_renderer_pins[1] = +{ + { + .dwFlags = REG_PINFLAG_B_OUTPUT, + .cInstances = 1, + .nMediaTypes = 1, + .lpMediaType = ®_null_mt, + }, +}; + +static const REGFILTER2 reg_null_renderer = +{ + .dwVersion = 2, + .dwMerit = MERIT_DO_NOT_USE, + .u.s2.cPins2 = 1, + .u.s2.rgPins2 = reg_null_renderer_pins, +}; + /*********************************************************************** * DllRegisterServer (QEDIT.@) */ HRESULT WINAPI DllRegisterServer(void) { - return __wine_register_resources( instance ); + IFilterMapper2 *mapper; + HRESULT hr; + + if (FAILED(hr = __wine_register_resources( instance ))) + return hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterMapper2, (void **)&mapper))) + return hr; + + IFilterMapper2_RegisterFilter(mapper, &CLSID_SampleGrabber, L"SampleGrabber", + NULL, NULL, NULL, ®_sample_grabber); + IFilterMapper2_RegisterFilter(mapper, &CLSID_NullRenderer, L"Null Renderer", + NULL, NULL, NULL, ®_null_renderer); + + IFilterMapper2_Release(mapper); + return S_OK; } /*********************************************************************** @@ -205,5 +264,19 @@ HRESULT WINAPI DllRegisterServer(void) */ HRESULT WINAPI DllUnregisterServer(void) { - return __wine_unregister_resources( instance ); + IFilterMapper2 *mapper; + HRESULT hr; + + if (FAILED(hr = __wine_unregister_resources( instance ))) + return hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, + &IID_IFilterMapper2, (void **)&mapper))) + return hr; + + IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_SampleGrabber); + IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &CLSID_NullRenderer); + + IFilterMapper2_Release(mapper); + return S_OK; } diff --git a/dlls/qedit/qedit_private.h b/dlls/qedit/qedit_private.h index 344656d7d8..96f21bcb3b 100644 --- a/dlls/qedit/qedit_private.h +++ b/dlls/qedit/qedit_private.h @@ -23,7 +23,8 @@ #include <stdarg.h> #define COBJMACROS - +#define NONAMELESSSTRUCT +#define NONAMELESSUNION #include "windef.h" #include "winbase.h" #include "wtypes.h" diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index ff5db662f0..7196f79a54 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -174,18 +174,6 @@ static HRESULT unregister_filters(struct regsvr_filter const *list) */ static struct regsvr_filter const filter_list[] = { - { &CLSID_NullRenderer, - &CLSID_LegacyAmFilterCategory, - L"Null Renderer", - 0x200000, - { { REG_PINFLAG_B_RENDERER, - { { &MEDIATYPE_NULL, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, { &CLSID_VideoRenderer, &CLSID_LegacyAmFilterCategory, L"Video Renderer",
1
0
0
0
Zebediah Figura : d3dcompiler: Pass a struct source_location to create_loop().
by Alexandre Julliard
06 Mar '20
06 Mar '20
Module: wine Branch: master Commit: eb63713f606d81dee75d7fdbc5685cc3862bc63f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb63713f606d81dee75d7fdb…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 3 20:29:51 2020 -0600 d3dcompiler: Pass a struct source_location to create_loop(). Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/hlsl.y | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index 8f66deb90d..e46bdbade3 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -301,7 +301,7 @@ enum loop_type }; static struct list *create_loop(enum loop_type type, struct list *init, struct list *cond, - struct list *iter, struct list *body, struct source_location *loc) + struct list *iter, struct list *body, struct source_location loc) { struct list *list = NULL; struct hlsl_ir_loop *loop = NULL; @@ -319,7 +319,7 @@ static struct list *create_loop(enum loop_type type, struct list *init, struct l if (!loop) goto oom; loop->node.type = HLSL_IR_LOOP; - loop->node.loc = *loc; + loop->node.loc = loc; list_add_tail(list, &loop->node.entry); loop->body = d3dcompiler_alloc(sizeof(*loop->body)); if (!loop->body) @@ -1826,33 +1826,23 @@ if_body: statement loop_statement: KW_WHILE '(' expr ')' statement { - struct source_location loc; - loc = get_location(&@1); - $$ = create_loop(LOOP_WHILE, NULL, $3, NULL, $5, &loc); + $$ = create_loop(LOOP_WHILE, NULL, $3, NULL, $5, get_location(&@1)); } | KW_DO statement KW_WHILE '(' expr ')' ';' { - struct source_location loc; - loc = get_location(&@1); - $$ = create_loop(LOOP_DO_WHILE, NULL, $5, NULL, $2, &loc); + $$ = create_loop(LOOP_DO_WHILE, NULL, $5, NULL, $2, get_location(&@1)); } | KW_FOR '(' scope_start expr_statement expr_statement expr ')' statement { - struct source_location loc; - - loc = get_location(&@1); - $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, &loc); + $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, get_location(&@1)); pop_scope(&hlsl_ctx); } | KW_FOR '(' scope_start declaration expr_statement expr ')' statement { - struct source_location loc; - - loc = get_location(&@1); if (!$4) - hlsl_report_message(loc, HLSL_LEVEL_WARNING, + hlsl_report_message(get_location(&@4), HLSL_LEVEL_WARNING, "no expressions in for loop initializer"); - $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, &loc); + $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, get_location(&@1)); pop_scope(&hlsl_ctx); }
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
84
...
100
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
Results per page:
10
25
50
100
200