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
November 2019
----- 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
895 discussions
Start a n
N
ew thread
Zebediah Figura : ntoskrnl.exe: Trace the call to AddDevice().
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: 781fc47f361953f7411a84e32b066d5011473bd4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=781fc47f361953f7411a84e3…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 6 00:13:17 2019 -0600 ntoskrnl.exe: Trace the call to AddDevice(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/pnp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 89676a06ad..a3dbe772ae 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -226,10 +226,12 @@ static void load_function_driver( DEVICE_OBJECT *device, HDEVINFO set, SP_DEVINF return; } + TRACE("Calling AddDevice routine %p.\n", driver_obj->DriverExtension->AddDevice); if (driver_obj->DriverExtension->AddDevice) status = driver_obj->DriverExtension->AddDevice( driver_obj, device ); else status = STATUS_NOT_IMPLEMENTED; + TRACE("AddDevice routine %p returned %#x.\n", driver_obj->DriverExtension->AddDevice, status); ObDereferenceObject( driver_obj );
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Implement IRP_MN_QUERY_DEVICE_RELATIONS for root-enumerated devices.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: 74b98dc82b66e0bf4db50a0c4ccb376a2bc441ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74b98dc82b66e0bf4db50a0c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 6 00:13:16 2019 -0600 ntoskrnl.exe: Implement IRP_MN_QUERY_DEVICE_RELATIONS for root-enumerated devices. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/pnp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index b5c4e6878e..89676a06ad 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -821,6 +821,9 @@ static NTSTATUS WINAPI pnp_manager_device_pnp( DEVICE_OBJECT *device, IRP *irp ) switch (stack->MinorFunction) { + case IRP_MN_QUERY_DEVICE_RELATIONS: + /* The FDO above already handled this, so return the same status. */ + break; case IRP_MN_START_DEVICE: case IRP_MN_SURPRISE_REMOVAL: case IRP_MN_REMOVE_DEVICE:
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Stub IRP_MN_QUERY_CAPABILITIES for root-enumerated devices.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: 481b099345b8afa074a21c34f6b020c5e58de0d0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=481b099345b8afa074a21c34…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 6 00:13:15 2019 -0600 ntoskrnl.exe: Stub IRP_MN_QUERY_CAPABILITIES for root-enumerated devices. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/pnp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 5b5acd2b34..b5c4e6878e 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -827,6 +827,9 @@ static NTSTATUS WINAPI pnp_manager_device_pnp( DEVICE_OBJECT *device, IRP *irp ) /* Nothing to do. */ irp->IoStatus.u.Status = STATUS_SUCCESS; break; + case IRP_MN_QUERY_CAPABILITIES: + irp->IoStatus.u.Status = STATUS_SUCCESS; + break; case IRP_MN_QUERY_ID: { BUS_QUERY_ID_TYPE type = stack->Parameters.QueryId.IdType;
1
0
0
0
Zebediah Figura : ntoskrnl.exe: Implement many more properties in IoGetDeviceProperty().
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: c4ec69adceb6ea60d91d3f723d3a2ad959fb0761 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c4ec69adceb6ea60d91d3f72…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 6 00:13:14 2019 -0600 ntoskrnl.exe: Implement many more properties in IoGetDeviceProperty(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/pnp.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 17d61a096a..5b5acd2b34 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -402,7 +402,12 @@ void WINAPI IoInvalidateDeviceRelations( DEVICE_OBJECT *device_object, DEVICE_RE NTSTATUS WINAPI IoGetDeviceProperty( DEVICE_OBJECT *device, DEVICE_REGISTRY_PROPERTY property, ULONG length, void *buffer, ULONG *needed ) { - NTSTATUS status = STATUS_NOT_IMPLEMENTED; + SP_DEVINFO_DATA sp_device = {sizeof(sp_device)}; + WCHAR device_instance_id[MAX_DEVICE_ID_LEN]; + DWORD sp_property = -1; + NTSTATUS status; + HDEVINFO set; + TRACE("device %p, property %u, length %u, buffer %p, needed %p.\n", device, property, length, buffer, needed); @@ -430,7 +435,7 @@ NTSTATUS WINAPI IoGetDeviceProperty( DEVICE_OBJECT *device, DEVICE_REGISTRY_PROP status = STATUS_BUFFER_TOO_SMALL; ExFreePool( id ); - break; + return status; } case DevicePropertyPhysicalDeviceObjectName: { @@ -465,11 +470,81 @@ NTSTATUS WINAPI IoGetDeviceProperty( DEVICE_OBJECT *device, DEVICE_REGISTRY_PROP *needed = 0; } HeapFree(GetProcessHeap(), 0, name); - break; + return status; } + case DevicePropertyDeviceDescription: + sp_property = SPDRP_DEVICEDESC; + break; + case DevicePropertyHardwareID: + sp_property = SPDRP_HARDWAREID; + break; + case DevicePropertyCompatibleIDs: + sp_property = SPDRP_COMPATIBLEIDS; + break; + case DevicePropertyClassName: + sp_property = SPDRP_CLASS; + break; + case DevicePropertyClassGuid: + sp_property = SPDRP_CLASSGUID; + break; + case DevicePropertyManufacturer: + sp_property = SPDRP_MFG; + break; + case DevicePropertyFriendlyName: + sp_property = SPDRP_FRIENDLYNAME; + break; + case DevicePropertyLocationInformation: + sp_property = SPDRP_LOCATION_INFORMATION; + break; + case DevicePropertyBusTypeGuid: + sp_property = SPDRP_BUSTYPEGUID; + break; + case DevicePropertyLegacyBusType: + sp_property = SPDRP_LEGACYBUSTYPE; + break; + case DevicePropertyBusNumber: + sp_property = SPDRP_BUSNUMBER; + break; + case DevicePropertyAddress: + sp_property = SPDRP_ADDRESS; + break; + case DevicePropertyUINumber: + sp_property = SPDRP_UI_NUMBER; + break; + case DevicePropertyInstallState: + sp_property = SPDRP_INSTALL_STATE; + break; + case DevicePropertyRemovalPolicy: + sp_property = SPDRP_REMOVAL_POLICY; + break; default: FIXME("Unhandled property %u.\n", property); + return STATUS_NOT_IMPLEMENTED; + } + + if ((status = get_device_instance_id( device, device_instance_id ))) + return status; + + if ((set = SetupDiCreateDeviceInfoList( &GUID_NULL, NULL )) == INVALID_HANDLE_VALUE) + { + ERR("Failed to create device list, error %#x.\n", GetLastError()); + return GetLastError(); } + + if (!SetupDiOpenDeviceInfoW( set, device_instance_id, NULL, 0, &sp_device)) + { + ERR("Failed to open device, error %#x.\n", GetLastError()); + SetupDiDestroyDeviceInfoList( set ); + return GetLastError(); + } + + if (SetupDiGetDeviceRegistryPropertyW( set, &sp_device, sp_property, NULL, buffer, length, needed )) + status = STATUS_SUCCESS; + else + status = GetLastError(); + + SetupDiDestroyDeviceInfoList( set ); + return status; }
1
0
0
0
Zebediah Figura : ntdll: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: 87307de2173ee813daca9bd93ec750f17d3eda94 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=87307de2173ee813daca9bd9…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Nov 5 21:48:59 2019 -0600 ntdll: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=40950
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/env.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c index 87ab9bef62..03c0a20624 100644 --- a/dlls/ntdll/env.c +++ b/dlls/ntdll/env.c @@ -367,10 +367,12 @@ static void set_wow64_environment( WCHAR **env ) static const WCHAR progdirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',0}; static const WCHAR progdir86W[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r',' ','(','x','8','6',')',0}; static const WCHAR progfilesW[] = {'P','r','o','g','r','a','m','F','i','l','e','s',0}; + static const WCHAR progfiles86W[] = {'P','r','o','g','r','a','m','F','i','l','e','s','(','x','8','6',')',0}; static const WCHAR progw6432W[] = {'P','r','o','g','r','a','m','W','6','4','3','2',0}; static const WCHAR commondirW[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r',0}; static const WCHAR commondir86W[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r',' ','(','x','8','6',')',0}; static const WCHAR commonfilesW[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s',0}; + static const WCHAR commonfiles86W[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','F','i','l','e','s','(','8','6',')',0}; static const WCHAR commonw6432W[] = {'C','o','m','m','o','n','P','r','o','g','r','a','m','W','6','4','3','2',0}; static const WCHAR winedlldirW[] = {'W','I','N','E','D','L','L','D','I','R','%','u',0}; static const WCHAR winehomedirW[] = {'W','I','N','E','H','O','M','E','D','I','R',0}; @@ -435,9 +437,10 @@ static void set_wow64_environment( WCHAR **env ) if (is_win64 || !is_wow64) set_env_var( env, progfilesW, val ); RtlFreeHeap( GetProcessHeap(), 0, val ); } - if (is_wow64 && (val = get_registry_value( *env, hkey, progdir86W ))) + if ((val = get_registry_value( *env, hkey, progdir86W ))) { - set_env_var( env, progfilesW, val ); + if (is_win64 || is_wow64) set_env_var( env, progfiles86W, val ); + if (is_wow64) set_env_var( env, progfilesW, val ); RtlFreeHeap( GetProcessHeap(), 0, val ); } @@ -449,9 +452,10 @@ static void set_wow64_environment( WCHAR **env ) if (is_win64 || !is_wow64) set_env_var( env, commonfilesW, val ); RtlFreeHeap( GetProcessHeap(), 0, val ); } - if (is_wow64 && (val = get_registry_value( *env, hkey, commondir86W ))) + if ((val = get_registry_value( *env, hkey, commondir86W ))) { - set_env_var( env, commonfilesW, val ); + if (is_win64 || is_wow64) set_env_var( env, commonfiles86W, val ); + if (is_wow64) set_env_var( env, commonfilesW, val ); RtlFreeHeap( GetProcessHeap(), 0, val ); } NtClose( hkey );
1
0
0
0
Zebediah Figura : userenv: Add a set_env_var() helper.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: b8cf78641295c0b3a7ae1fc8ff6652649e3cccf1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b8cf78641295c0b3a7ae1fc8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Nov 5 21:48:58 2019 -0600 userenv: Add a set_env_var() helper. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/userenv/userenv_main.c | 116 +++++++++++--------------------------------- 1 file changed, 27 insertions(+), 89 deletions(-) diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c index 9f10cfa1d7..045bac0cfe 100644 --- a/dlls/userenv/userenv_main.c +++ b/dlls/userenv/userenv_main.c @@ -93,6 +93,15 @@ static BOOL get_reg_value(WCHAR *env, HKEY hkey, const WCHAR *name, WCHAR *val, return FALSE; } +static void set_env_var( WCHAR **env, const WCHAR *name, const WCHAR *val ) +{ + UNICODE_STRING nameW, valW; + + RtlInitUnicodeString( &nameW, name ); + RtlInitUnicodeString( &valW, val ); + RtlSetEnvironmentVariable( env, &nameW, &valW ); +} + static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_path) { UNICODE_STRING us_name, us_value; @@ -124,25 +133,17 @@ static void set_registry_variables(WCHAR **env, HKEY hkey, DWORD type, BOOL set_ continue; value[size] = ';'; - RtlInitUnicodeString(&us_value, value); - RtlSetEnvironmentVariable(env, &us_name, &us_value); + set_env_var(env, name, value); continue; } - if (!get_reg_value(*env, hkey, name, value, sizeof(value))) - continue; - - if(!value[0]) - continue; - - RtlInitUnicodeString(&us_value, value); - RtlSetEnvironmentVariable(env, &us_name, &us_value); + if (get_reg_value(*env, hkey, name, value, sizeof(value)) && value[0]) + set_env_var(env, name, value); } } static void set_wow64_environment(WCHAR **env) { - UNICODE_STRING nameW, valueW; WCHAR buf[64]; HKEY hkey; BOOL is_win64 = (sizeof(void *) > sizeof(int)); @@ -158,66 +159,26 @@ static void set_wow64_environment(WCHAR **env) if (get_reg_value(*env, hkey, L"ProgramFilesDir", buf, sizeof(buf))) { - if (is_win64 || is_wow64) - { - RtlInitUnicodeString(&nameW, L"ProgramW6432"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } - if (is_win64 || !is_wow64) - { - RtlInitUnicodeString(&nameW, L"ProgramFiles"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } + if (is_win64 || is_wow64) set_env_var(env, L"ProgramW6432", buf); + if (is_win64 || !is_wow64) set_env_var(env, L"ProgramFiles", buf); } if (get_reg_value(*env, hkey, L"ProgramFilesDir (x86)", buf, sizeof(buf))) { - if (is_win64 || is_wow64) - { - RtlInitUnicodeString(&nameW, L"ProgramFiles(x86)"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } - if (is_wow64) - { - RtlInitUnicodeString(&nameW, L"ProgramFiles"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } + if (is_win64 || is_wow64) set_env_var(env, L"ProgramFiles(x86)", buf); + if (is_wow64) set_env_var(env, L"ProgramFiles", buf); } /* set the CommonProgramFiles variables */ if (get_reg_value(*env, hkey, L"CommonFilesDir", buf, sizeof(buf))) { - if (is_win64 || is_wow64) - { - RtlInitUnicodeString(&nameW, L"CommonProgramW6432"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } - if (is_win64 || !is_wow64) - { - RtlInitUnicodeString(&nameW, L"CommonProgramFiles"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } + if (is_win64 || is_wow64) set_env_var(env, L"CommonProgramW6432", buf); + if (is_win64 || !is_wow64) set_env_var(env, L"CommonProgramFiles", buf); } if (get_reg_value(*env, hkey, L"CommonFilesDir (x86)", buf, sizeof(buf))) { - if (is_win64 || is_wow64) - { - RtlInitUnicodeString(&nameW, L"CommonProgramFiles(x86)"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } - if (is_wow64) - { - RtlInitUnicodeString(&nameW, L"CommonProgramFiles"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); - } + if (is_win64 || is_wow64) set_env_var(env, L"CommonProgramFiles(x86)", buf); + if (is_wow64) set_env_var(env, L"CommonProgramFiles", buf); } RegCloseKey(hkey); @@ -230,7 +191,6 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, static const WCHAR profile_keyW[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList"; WCHAR *env, buf[UNICODE_STRING_MAX_CHARS], profiles_dir[MAX_PATH]; - UNICODE_STRING us_name, us_val; DWORD len; HKEY hkey, hsubkey; @@ -256,9 +216,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, WARN("SystemRoot variable not set\n"); } } - RtlInitUnicodeString(&us_name, L"SystemRoot"); - RtlInitUnicodeString(&us_val, buf); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); + set_env_var(&env, L"SystemRoot", buf); if (!GetEnvironmentVariableW(L"SystemDrive", buf, UNICODE_STRING_MAX_CHARS)) { @@ -268,9 +226,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, WARN("SystemDrive variable not set\n"); } } - RtlInitUnicodeString(&us_name, L"SystemDrive"); - RtlInitUnicodeString(&us_val, buf); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); + set_env_var(&env, L"SystemDrive", buf); set_registry_variables(&env, hkey, REG_SZ, !bInherit); set_registry_variables(&env, hkey, REG_EXPAND_SZ, !bInherit); @@ -302,11 +258,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, } if (get_reg_value(env, hkey, L"Public", buf, UNICODE_STRING_MAX_CHARS)) - { - RtlInitUnicodeString(&us_name, L"ALLUSERSPROFILE"); - RtlInitUnicodeString(&us_val, buf); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); - } + set_env_var(&env, L"ALLUSERSPROFILE", buf); } else { @@ -318,11 +270,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, len = ARRAY_SIZE(buf); if (GetComputerNameW(buf, &len)) - { - RtlInitUnicodeString(&us_name, L"COMPUTERNAME"); - RtlInitUnicodeString(&us_val, buf); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); - } + set_env_var(&env, L"COMPUTERNAME", buf); set_wow64_environment(&env); @@ -335,9 +283,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, { wcscpy(buf, profiles_dir); wcscat(buf, L"Default"); - RtlInitUnicodeString(&us_name, L"USERPROFILE"); - RtlInitUnicodeString(&us_val, buf); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); + set_env_var(&env, L"USERPROFILE", buf); } } @@ -368,16 +314,8 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, if (LookupAccountSidW(NULL, token_user->User.Sid, buf+len, &size, NULL, &tmp, &use)) { - RtlInitUnicodeString(&us_name, L"USERNAME"); - RtlInitUnicodeString(&us_val, buf+len); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); - - if (len) - { - RtlInitUnicodeString(&us_name, L"USERPROFILE"); - RtlInitUnicodeString(&us_val, buf); - RtlSetEnvironmentVariable(&env, &us_name, &us_val); - } + set_env_var(&env, L"USERNAME", buf+len); + if (len) set_env_var(&env, L"USERPROFILE", buf); } HeapFree(GetProcessHeap(), 0, token_user);
1
0
0
0
Zebediah Figura : userenv: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: 99dc0e0eeb6ff99d253921055af1ca7d95d0d6dd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=99dc0e0eeb6ff99d25392105…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Nov 5 21:48:57 2019 -0600 userenv: Set the ProgramFiles(x86) and CommonProgramFiles(x86) environment variables. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/userenv/tests/userenv.c | 2 ++ dlls/userenv/userenv_main.c | 34 ++++++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/dlls/userenv/tests/userenv.c b/dlls/userenv/tests/userenv.c index 79b4d59a61..f6cfcc79ec 100644 --- a/dlls/userenv/tests/userenv.c +++ b/dlls/userenv/tests/userenv.c @@ -104,6 +104,8 @@ static void test_create_env(void) { "USERPROFILE" } }; static const struct profile_item common_win64_vars[] = { + { "ProgramFiles(x86)" }, + { "CommonProgramFiles(x86)" }, { "ProgramW6432" }, { "CommonProgramW6432" } }; diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c index 9317c82735..9f10cfa1d7 100644 --- a/dlls/userenv/userenv_main.c +++ b/dlls/userenv/userenv_main.c @@ -171,11 +171,20 @@ static void set_wow64_environment(WCHAR **env) RtlSetEnvironmentVariable(env, &nameW, &valueW); } } - if (is_wow64 && get_reg_value(*env, hkey, L"ProgramFilesDir (x86)", buf, sizeof(buf))) + if (get_reg_value(*env, hkey, L"ProgramFilesDir (x86)", buf, sizeof(buf))) { - RtlInitUnicodeString(&nameW, L"ProgramFiles"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); + if (is_win64 || is_wow64) + { + RtlInitUnicodeString(&nameW, L"ProgramFiles(x86)"); + RtlInitUnicodeString(&valueW, buf); + RtlSetEnvironmentVariable(env, &nameW, &valueW); + } + if (is_wow64) + { + RtlInitUnicodeString(&nameW, L"ProgramFiles"); + RtlInitUnicodeString(&valueW, buf); + RtlSetEnvironmentVariable(env, &nameW, &valueW); + } } /* set the CommonProgramFiles variables */ @@ -195,11 +204,20 @@ static void set_wow64_environment(WCHAR **env) RtlSetEnvironmentVariable(env, &nameW, &valueW); } } - if (is_wow64 && get_reg_value(*env, hkey, L"CommonFilesDir (x86)", buf, sizeof(buf))) + if (get_reg_value(*env, hkey, L"CommonFilesDir (x86)", buf, sizeof(buf))) { - RtlInitUnicodeString(&nameW, L"CommonProgramFiles"); - RtlInitUnicodeString(&valueW, buf); - RtlSetEnvironmentVariable(env, &nameW, &valueW); + if (is_win64 || is_wow64) + { + RtlInitUnicodeString(&nameW, L"CommonProgramFiles(x86)"); + RtlInitUnicodeString(&valueW, buf); + RtlSetEnvironmentVariable(env, &nameW, &valueW); + } + if (is_wow64) + { + RtlInitUnicodeString(&nameW, L"CommonProgramFiles"); + RtlInitUnicodeString(&valueW, buf); + RtlSetEnvironmentVariable(env, &nameW, &valueW); + } } RegCloseKey(hkey);
1
0
0
0
Zebediah Figura : userenv: Fix a copy-paste error.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: c31049b885a968524397c1bf8d39b3a523ca93a4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c31049b885a968524397c1bf…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Nov 5 21:48:55 2019 -0600 userenv: Fix a copy-paste error. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/userenv/userenv_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/userenv/userenv_main.c b/dlls/userenv/userenv_main.c index b811c8315f..005166e5f4 100644 --- a/dlls/userenv/userenv_main.c +++ b/dlls/userenv/userenv_main.c @@ -281,7 +281,7 @@ BOOL WINAPI CreateEnvironmentBlock( LPVOID* lpEnvironment, if (!GetEnvironmentVariableW(SystemDriveW, buf, UNICODE_STRING_MAX_CHARS)) { - if (!get_reg_value(env, hkey, SystemRootW, buf, UNICODE_STRING_MAX_CHARS)) + if (!get_reg_value(env, hkey, SystemDriveW, buf, UNICODE_STRING_MAX_CHARS)) { buf[0] = 0; WARN("SystemDrive variable not set\n");
1
0
0
0
Zebediah Figura : userenv: Use wide character string literals.
by Alexandre Julliard
06 Nov '19
06 Nov '19
Module: wine Branch: master Commit: 6a079faf70d5fcb0dce14f6355fe5f0f590b217f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6a079faf70d5fcb0dce14f63…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Nov 5 21:48:56 2019 -0600 userenv: Use wide character string literals. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/userenv/userenv_main.c | 114 +++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 76 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6a079faf70d5fcb0dce1…
1
0
0
0
Alistair Leslie-Hughes : dmstyle: IDirectMusicTrack GetParam add pointer check.
by Alexandre Julliard
05 Nov '19
05 Nov '19
Module: wine Branch: master Commit: 7f469b689a2dccc0863952cd73e592df391dc607 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7f469b689a2dccc0863952cd…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Nov 5 22:18:21 2019 +0100 dmstyle: IDirectMusicTrack GetParam add pointer check. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmstyle/auditiontrack.c | 10 +++++++--- dlls/dmstyle/chordtrack.c | 10 +++++++--- dlls/dmstyle/commandtrack.c | 10 +++++++--- dlls/dmstyle/motiftrack.c | 10 +++++++--- dlls/dmstyle/mutetrack.c | 10 +++++++--- dlls/dmstyle/styletrack.c | 10 +++++++--- dlls/dmstyle/tests/dmstyle.c | 6 +++--- 7 files changed, 45 insertions(+), 21 deletions(-) diff --git a/dlls/dmstyle/auditiontrack.c b/dlls/dmstyle/auditiontrack.c index 3c304ca574..ca975093fb 100644 --- a/dlls/dmstyle/auditiontrack.c +++ b/dlls/dmstyle/auditiontrack.c @@ -121,9 +121,13 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_Play(IDirectMusicTrack8 *iface, voi static HRESULT WINAPI IDirectMusicTrack8Impl_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) { - IDirectMusicAuditionTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicAuditionTrack *This = impl_from_IDirectMusicTrack8(iface); + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + + if (!rguidType) + return E_POINTER; + + return S_OK; } static HRESULT WINAPI IDirectMusicTrack8Impl_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c index fd290bf7a9..70056e5677 100644 --- a/dlls/dmstyle/chordtrack.c +++ b/dlls/dmstyle/chordtrack.c @@ -124,9 +124,13 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_Play(IDirectMusicTrack8 *iface, voi static HRESULT WINAPI IDirectMusicTrack8Impl_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) { - IDirectMusicChordTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicChordTrack *This = impl_from_IDirectMusicTrack8(iface); + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + + if (!rguidType) + return E_POINTER; + + return S_OK; } static HRESULT WINAPI IDirectMusicTrack8Impl_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, diff --git a/dlls/dmstyle/commandtrack.c b/dlls/dmstyle/commandtrack.c index e326241c4b..0afac074c7 100644 --- a/dlls/dmstyle/commandtrack.c +++ b/dlls/dmstyle/commandtrack.c @@ -123,9 +123,13 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_Play(IDirectMusicTrack8 *iface, voi static HRESULT WINAPI IDirectMusicTrack8Impl_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) { - IDirectMusicCommandTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicCommandTrack *This = impl_from_IDirectMusicTrack8(iface); + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + + if (!rguidType) + return E_POINTER; + + return S_OK; } static HRESULT WINAPI IDirectMusicTrack8Impl_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, diff --git a/dlls/dmstyle/motiftrack.c b/dlls/dmstyle/motiftrack.c index d4a4effec7..526a28111d 100644 --- a/dlls/dmstyle/motiftrack.c +++ b/dlls/dmstyle/motiftrack.c @@ -121,9 +121,13 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_Play(IDirectMusicTrack8 *iface, voi static HRESULT WINAPI IDirectMusicTrack8Impl_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) { - IDirectMusicMotifTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicMotifTrack *This = impl_from_IDirectMusicTrack8(iface); + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + + if (!rguidType) + return E_POINTER; + + return S_OK; } static HRESULT WINAPI IDirectMusicTrack8Impl_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, diff --git a/dlls/dmstyle/mutetrack.c b/dlls/dmstyle/mutetrack.c index 67bfbc30dc..5d85a1b61e 100644 --- a/dlls/dmstyle/mutetrack.c +++ b/dlls/dmstyle/mutetrack.c @@ -121,9 +121,13 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_Play(IDirectMusicTrack8 *iface, voi static HRESULT WINAPI IDirectMusicTrack8Impl_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) { - IDirectMusicMuteTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicMuteTrack *This = impl_from_IDirectMusicTrack8(iface); + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + + if (!rguidType) + return E_POINTER; + + return S_OK; } static HRESULT WINAPI IDirectMusicTrack8Impl_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, diff --git a/dlls/dmstyle/styletrack.c b/dlls/dmstyle/styletrack.c index 79b4787ca0..a75853bf16 100644 --- a/dlls/dmstyle/styletrack.c +++ b/dlls/dmstyle/styletrack.c @@ -123,9 +123,13 @@ static HRESULT WINAPI IDirectMusicTrack8Impl_Play(IDirectMusicTrack8 *iface, voi static HRESULT WINAPI IDirectMusicTrack8Impl_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) { - IDirectMusicStyleTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); - return S_OK; + IDirectMusicStyleTrack *This = impl_from_IDirectMusicTrack8(iface); + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + + if (!rguidType) + return E_POINTER; + + return S_OK; } static HRESULT WINAPI IDirectMusicTrack8Impl_SetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c index a94640d13d..6b2275866c 100644 --- a/dlls/dmstyle/tests/dmstyle.c +++ b/dlls/dmstyle/tests/dmstyle.c @@ -279,12 +279,12 @@ static void test_track(void) else todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr); } - todo_wine { + hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL); ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %08x\n", hr); hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL); - ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr); - } + todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr); + hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL); ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr); if (class[i].clsid == &CLSID_DirectMusicMuteTrack) {
1
0
0
0
← Newer
1
...
75
76
77
78
79
80
81
...
90
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
Results per page:
10
25
50
100
200