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
July 2023
----- 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
865 discussions
Start a n
N
ew thread
Mohamad Al-Jaf : windows.networking.hostname/tests: Check if passed HSTRING is duplicated.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 95bfbdc87f13f6f38b81e5cce84632a9eee5a207 URL:
https://gitlab.winehq.org/wine/wine/-/commit/95bfbdc87f13f6f38b81e5cce84632…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Sat Jul 8 00:40:57 2023 -0400 windows.networking.hostname/tests: Check if passed HSTRING is duplicated. --- dlls/windows.networking.hostname/tests/hostname.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/windows.networking.hostname/tests/hostname.c b/dlls/windows.networking.hostname/tests/hostname.c index 7c6cfd559ea..ad5440a9f65 100644 --- a/dlls/windows.networking.hostname/tests/hostname.c +++ b/dlls/windows.networking.hostname/tests/hostname.c @@ -51,6 +51,7 @@ static void test_HostnameStatics(void) static const WCHAR *ip = L"192.168.0.0"; IHostNameFactory *hostnamefactory; IActivationFactory *factory; + HSTRING_HEADER header; HSTRING str, rawname; IHostName *hostname; HRESULT hr; @@ -75,7 +76,7 @@ static void test_HostnameStatics(void) hr = IActivationFactory_QueryInterface( factory, &IID_IHostNameFactory, (void **)&hostnamefactory ); ok( hr == S_OK, "got hr %#lx.\n", hr ); - hr = WindowsCreateString( ip, wcslen( ip ), &str ); + hr = WindowsCreateStringReference( ip, wcslen( ip ), &header, &str ); ok( hr == S_OK, "got hr %#lx.\n", hr ); hr = IHostNameFactory_CreateHostName( hostnamefactory, NULL, &hostname ); @@ -100,6 +101,7 @@ static void test_HostnameStatics(void) hr = WindowsCompareStringOrdinal( str, rawname, &res ); ok( hr == S_OK, "got hr %#lx.\n", hr ); ok( !res, "got unexpected string %s.\n", debugstr_hstring(rawname) ); + todo_wine ok( str != rawname, "got same HSTRINGs %p, %p.\n", str, rawname ); WindowsDeleteString( str ); WindowsDeleteString( rawname );
1
0
0
0
Mohamad Al-Jaf : windows.devices.usb/tests: Add IUsbDeviceStatics::GetDeviceSelectorVidPidOnly() tests.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: fc4813ff2f9416e6a7a83171b47a2df63d9347f6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fc4813ff2f9416e6a7a83171b47a2d…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Wed Jul 5 23:05:05 2023 -0400 windows.devices.usb/tests: Add IUsbDeviceStatics::GetDeviceSelectorVidPidOnly() tests. --- dlls/windows.devices.usb/tests/usb.c | 38 +++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/dlls/windows.devices.usb/tests/usb.c b/dlls/windows.devices.usb/tests/usb.c index 5e6f3be6d31..bf6e759e14d 100644 --- a/dlls/windows.devices.usb/tests/usb.c +++ b/dlls/windows.devices.usb/tests/usb.c @@ -47,11 +47,18 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid ) static void test_UsbDevicesStatics(void) { + static const WCHAR *format = L"System.Devices.InterfaceClassGuid:=\"{DEE824EF-729B-4A0E-9C14-B7117D33A817}\"" + L" AND System.Devices.InterfaceEnabled:=System.StructuredQueryType.Boolean#True" + L" AND System.DeviceInterface.WinUsb.UsbVendorId:=%d" + L" AND System.DeviceInterface.WinUsb.UsbProductId:=%d"; static const WCHAR *usb_device_statics_name = L"Windows.Devices.Usb.UsbDevice"; IUsbDeviceStatics *usb_device_statics; IActivationFactory *factory; - HSTRING str; + UINT32 vendor, product; + WCHAR buffer[254 + 20]; + HSTRING str, wine_str; HRESULT hr; + INT32 res; LONG ref; hr = WindowsCreateString( usb_device_statics_name, wcslen( usb_device_statics_name ), &str ); @@ -73,6 +80,35 @@ static void test_UsbDevicesStatics(void) hr = IActivationFactory_QueryInterface( factory, &IID_IUsbDeviceStatics, (void **)&usb_device_statics ); ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = IUsbDeviceStatics_GetDeviceSelectorVidPidOnly( usb_device_statics, 5, 10, NULL ); + ok( hr == E_INVALIDARG, "got hr %#lx.\n", hr ); + + vendor = 20; + product = 23; + hr = IUsbDeviceStatics_GetDeviceSelectorVidPidOnly( usb_device_statics, vendor, product, &str ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + swprintf( buffer, ARRAYSIZE(buffer), format, (INT32)vendor, (INT32)product ); + hr = WindowsCreateString( buffer, wcslen(buffer), &wine_str ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = WindowsCompareStringOrdinal( str, wine_str, &res ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( !res, "got string %s.\n", debugstr_hstring(str) ); + WindowsDeleteString( str ); + WindowsDeleteString( wine_str ); + + vendor = 4294967195; /* Vendor = -101 */ + product = -1294967195; + hr = IUsbDeviceStatics_GetDeviceSelectorVidPidOnly( usb_device_statics, vendor, product, &str ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + swprintf( buffer, ARRAYSIZE(buffer), format, (INT32)vendor, (INT32)product ); + hr = WindowsCreateString( buffer, wcslen(buffer), &wine_str ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + hr = WindowsCompareStringOrdinal( str, wine_str, &res ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + ok( !res, "got string %s.\n", debugstr_hstring(str) ); + WindowsDeleteString( str ); + WindowsDeleteString( wine_str ); + ref = IUsbDeviceStatics_Release( usb_device_statics ); ok( ref == 2, "got ref %ld.\n", ref ); ref = IActivationFactory_Release( factory );
1
0
0
0
Mohamad Al-Jaf : windows.devices.usb: Implement IUsbDeviceStatics::GetDeviceSelectorVidPidOnly().
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: d78579a24b709ec438454c15201a0743cd9b5c78 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d78579a24b709ec438454c15201a07…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Wed Jul 5 23:02:16 2023 -0400 windows.devices.usb: Implement IUsbDeviceStatics::GetDeviceSelectorVidPidOnly(). Needed for Lenovo Ready for Assistant. --- dlls/windows.devices.usb/usbdevice.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/windows.devices.usb/usbdevice.c b/dlls/windows.devices.usb/usbdevice.c index 62c12d7c3e7..a42281fbe48 100644 --- a/dlls/windows.devices.usb/usbdevice.c +++ b/dlls/windows.devices.usb/usbdevice.c @@ -133,8 +133,22 @@ static HRESULT WINAPI usb_device_statics_GetDeviceSelectorGuidOnly( IUsbDeviceSt static HRESULT WINAPI usb_device_statics_GetDeviceSelectorVidPidOnly( IUsbDeviceStatics *iface, UINT32 vendor, UINT32 product, HSTRING *value ) { - FIXME( "iface %p, vendor %d, product %d, value %p stub!\n", iface, vendor, product, value ); - return E_NOTIMPL; + static const WCHAR *format = L"System.Devices.InterfaceClassGuid:=\"{DEE824EF-729B-4A0E-9C14-B7117D33A817}\"" + L" AND System.Devices.InterfaceEnabled:=System.StructuredQueryType.Boolean#True" + L" AND System.DeviceInterface.WinUsb.UsbVendorId:=%d" + L" AND System.DeviceInterface.WinUsb.UsbProductId:=%d"; + WCHAR buffer[254 + 20]; + HRESULT hr; + + TRACE( "iface %p, vendor %d, product %d, value %p.\n", iface, vendor, product, value ); + + if (!value) return E_INVALIDARG; + + swprintf( buffer, ARRAYSIZE(buffer), format, (INT32)vendor, (INT32)product ); + hr = WindowsCreateString( buffer, wcslen(buffer), value ); + + TRACE( "Returning value = %s\n", debugstr_hstring(*value) ); + return hr; } static HRESULT WINAPI usb_device_statics_GetDeviceClassSelector( IUsbDeviceStatics *iface, IUsbDeviceClass *class, HSTRING *value )
1
0
0
0
Mohamad Al-Jaf : windows.devices.usb: Add IUsbDeviceStatics stub interface.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 1450dd791e19954e3455bc67a04c619e81d165de URL:
https://gitlab.winehq.org/wine/wine/-/commit/1450dd791e19954e3455bc67a04c61…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Mon Jul 3 04:48:26 2023 -0400 windows.devices.usb: Add IUsbDeviceStatics stub interface. --- dlls/windows.devices.usb/private.h | 38 +++++++++++++++++++++++ dlls/windows.devices.usb/tests/usb.c | 6 ++++ dlls/windows.devices.usb/usbdevice.c | 60 ++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) diff --git a/dlls/windows.devices.usb/private.h b/dlls/windows.devices.usb/private.h index e650a1d138d..ad1af114737 100644 --- a/dlls/windows.devices.usb/private.h +++ b/dlls/windows.devices.usb/private.h @@ -37,4 +37,42 @@ extern IActivationFactory *usb_device_factory; +#define DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from, iface_mem, expr ) \ + static inline impl_type *impl_from( iface_type *iface ) \ + { \ + return CONTAINING_RECORD( iface, impl_type, iface_mem ); \ + } \ + static HRESULT WINAPI pfx##_QueryInterface( iface_type *iface, REFIID iid, void **out ) \ + { \ + impl_type *impl = impl_from( iface ); \ + return IInspectable_QueryInterface( (IInspectable *)(expr), iid, out ); \ + } \ + static ULONG WINAPI pfx##_AddRef( iface_type *iface ) \ + { \ + impl_type *impl = impl_from( iface ); \ + return IInspectable_AddRef( (IInspectable *)(expr) ); \ + } \ + static ULONG WINAPI pfx##_Release( iface_type *iface ) \ + { \ + impl_type *impl = impl_from( iface ); \ + return IInspectable_Release( (IInspectable *)(expr) ); \ + } \ + static HRESULT WINAPI pfx##_GetIids( iface_type *iface, ULONG *iid_count, IID **iids ) \ + { \ + impl_type *impl = impl_from( iface ); \ + return IInspectable_GetIids( (IInspectable *)(expr), iid_count, iids ); \ + } \ + static HRESULT WINAPI pfx##_GetRuntimeClassName( iface_type *iface, HSTRING *class_name ) \ + { \ + impl_type *impl = impl_from( iface ); \ + return IInspectable_GetRuntimeClassName( (IInspectable *)(expr), class_name ); \ + } \ + static HRESULT WINAPI pfx##_GetTrustLevel( iface_type *iface, TrustLevel *trust_level ) \ + { \ + impl_type *impl = impl_from( iface ); \ + return IInspectable_GetTrustLevel( (IInspectable *)(expr), trust_level ); \ + } +#define DEFINE_IINSPECTABLE( pfx, iface_type, impl_type, base_iface ) \ + DEFINE_IINSPECTABLE_( pfx, iface_type, impl_type, impl_from_##iface_type, iface_type##_iface, &impl->base_iface ) + #endif diff --git a/dlls/windows.devices.usb/tests/usb.c b/dlls/windows.devices.usb/tests/usb.c index 938014ae8fe..5e6f3be6d31 100644 --- a/dlls/windows.devices.usb/tests/usb.c +++ b/dlls/windows.devices.usb/tests/usb.c @@ -48,6 +48,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid ) static void test_UsbDevicesStatics(void) { static const WCHAR *usb_device_statics_name = L"Windows.Devices.Usb.UsbDevice"; + IUsbDeviceStatics *usb_device_statics; IActivationFactory *factory; HSTRING str; HRESULT hr; @@ -69,6 +70,11 @@ static void test_UsbDevicesStatics(void) check_interface( factory, &IID_IInspectable ); check_interface( factory, &IID_IAgileObject ); + hr = IActivationFactory_QueryInterface( factory, &IID_IUsbDeviceStatics, (void **)&usb_device_statics ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + + ref = IUsbDeviceStatics_Release( usb_device_statics ); + ok( ref == 2, "got ref %ld.\n", ref ); ref = IActivationFactory_Release( factory ); ok( ref == 1, "got ref %ld.\n", ref ); } diff --git a/dlls/windows.devices.usb/usbdevice.c b/dlls/windows.devices.usb/usbdevice.c index e137055cf9c..62c12d7c3e7 100644 --- a/dlls/windows.devices.usb/usbdevice.c +++ b/dlls/windows.devices.usb/usbdevice.c @@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(usb); struct usb_device_statics { IActivationFactory IActivationFactory_iface; + IUsbDeviceStatics IUsbDeviceStatics_iface; LONG ref; }; @@ -49,6 +50,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID return S_OK; } + if (IsEqualGUID( iid, &IID_IUsbDeviceStatics )) + { + *out = &impl->IUsbDeviceStatics_iface; + IInspectable_AddRef( *out ); + return S_OK; + } + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; @@ -107,9 +115,61 @@ static const struct IActivationFactoryVtbl factory_vtbl = factory_ActivateInstance, }; +DEFINE_IINSPECTABLE( usb_device_statics, IUsbDeviceStatics, struct usb_device_statics, IActivationFactory_iface ) + +static HRESULT WINAPI usb_device_statics_GetDeviceSelector( IUsbDeviceStatics *iface, UINT32 vendor, + UINT32 product, GUID class, HSTRING *value ) +{ + FIXME( "iface %p, vendor %d, product %d, class %s, value %p stub!\n", iface, vendor, product, debugstr_guid(&class), value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI usb_device_statics_GetDeviceSelectorGuidOnly( IUsbDeviceStatics *iface, GUID class, HSTRING *value ) +{ + FIXME( "iface %p, class %s, value %p stub!\n", iface, debugstr_guid(&class), value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI usb_device_statics_GetDeviceSelectorVidPidOnly( IUsbDeviceStatics *iface, UINT32 vendor, + UINT32 product, HSTRING *value ) +{ + FIXME( "iface %p, vendor %d, product %d, value %p stub!\n", iface, vendor, product, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI usb_device_statics_GetDeviceClassSelector( IUsbDeviceStatics *iface, IUsbDeviceClass *class, HSTRING *value ) +{ + FIXME( "iface %p, class %p, value %p stub!\n", iface, class, value ); + return E_NOTIMPL; +} + +static HRESULT WINAPI usb_device_statics_FromIdAsync( IUsbDeviceStatics *iface, HSTRING id, IAsyncOperation_UsbDevice **operation ) +{ + FIXME( "iface %p, id %s, operation %p stub!\n", iface, debugstr_hstring(id), operation ); + return E_NOTIMPL; +} + +static const struct IUsbDeviceStaticsVtbl usb_device_statics_vtbl = +{ + usb_device_statics_QueryInterface, + usb_device_statics_AddRef, + usb_device_statics_Release, + /* IInspectable methods */ + usb_device_statics_GetIids, + usb_device_statics_GetRuntimeClassName, + usb_device_statics_GetTrustLevel, + /* IUsbDeviceStatics methods */ + usb_device_statics_GetDeviceSelector, + usb_device_statics_GetDeviceSelectorGuidOnly, + usb_device_statics_GetDeviceSelectorVidPidOnly, + usb_device_statics_GetDeviceClassSelector, + usb_device_statics_FromIdAsync, +}; + static struct usb_device_statics usb_device_statics = { {&factory_vtbl}, + {&usb_device_statics_vtbl}, 1, };
1
0
0
0
Mohamad Al-Jaf : windows.devices.usb: Add stub DLL.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 701a0506411040b50cf49eda2eabd7f98dd73ffd URL:
https://gitlab.winehq.org/wine/wine/-/commit/701a0506411040b50cf49eda2eabd7…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Mon Jul 3 03:59:31 2023 -0400 windows.devices.usb: Add stub DLL. --- configure | 3 + configure.ac | 2 + dlls/windows.devices.usb/Makefile.in | 9 ++ dlls/windows.devices.usb/classes.idl | 23 +++++ dlls/windows.devices.usb/main.c | 46 +++++++++ dlls/windows.devices.usb/private.h | 40 ++++++++ dlls/windows.devices.usb/tests/Makefile.in | 5 + dlls/windows.devices.usb/tests/usb.c | 86 ++++++++++++++++ dlls/windows.devices.usb/usbdevice.c | 116 ++++++++++++++++++++++ dlls/windows.devices.usb/windows.devices.usb.spec | 3 + 10 files changed, 333 insertions(+)
1
0
0
0
Mohamad Al-Jaf : include: Add windows.devices.usb.idl file.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 08d05121130a01f6a55fb2532dea340d20de1849 URL:
https://gitlab.winehq.org/wine/wine/-/commit/08d05121130a01f6a55fb2532dea34…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Mon Jul 3 03:45:14 2023 -0400 include: Add windows.devices.usb.idl file. --- include/Makefile.in | 1 + include/windows.devices.usb.idl | 177 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 53d4d0fe3fb..b810f7e8442 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -816,6 +816,7 @@ SOURCES = \ windows.devices.haptics.idl \ windows.devices.power.idl \ windows.devices.radios.idl \ + windows.devices.usb.idl \ windows.foundation.collections.idl \ windows.foundation.idl \ windows.foundation.metadata.idl \ diff --git a/include/windows.devices.usb.idl b/include/windows.devices.usb.idl new file mode 100644 index 00000000000..40d4312d9de --- /dev/null +++ b/include/windows.devices.usb.idl @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifdef __WIDL__ +#pragma winrt ns_prefix +#endif + +import "inspectable.idl"; +import "asyncinfo.idl"; +import "eventtoken.idl"; +import "windowscontracts.idl"; +import "windows.foundation.idl"; +import "windows.storage.streams.idl"; + +namespace Windows.Devices.Usb { + interface IUsbDevice; + interface IUsbDeviceClass; + interface IUsbConfiguration; + interface IUsbDeviceDescriptor; + interface IUsbDeviceStatics; + interface IUsbInterface; + interface IUsbSetupPacket; + interface IUsbSetupPacketFactory; + + runtimeclass UsbConfiguration; + runtimeclass UsbDevice; + runtimeclass UsbDeviceClass; + runtimeclass UsbDeviceDescriptor; + runtimeclass UsbInterface; + runtimeclass UsbSetupPacket; + + declare { + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Usb.UsbDevice *>; + interface Windows.Foundation.IAsyncOperation<Windows.Devices.Usb.UsbDevice *>; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbDevice), + uuid(5249b992-c456-44d5-ad5e-24f5a089f63b) + ] + interface IUsbDevice : IInspectable + requires Windows.Foundation.IClosable + { + [overload("SendControlOutTransferAsync")] + HRESULT SendControlOutTransferAsync( + [in] Windows.Devices.Usb.UsbSetupPacket *packet, + [in] Windows.Storage.Streams.IBuffer *buffer, + [out, retval] Windows.Foundation.IAsyncOperation<UINT32> **operation + ); + [overload("SendControlOutTransferAsync")] + HRESULT SendControlOutTransferAsyncNoBuffer( + [in] Windows.Devices.Usb.UsbSetupPacket *packet, + [out, retval] Windows.Foundation.IAsyncOperation<UINT32> **operation + ); + [overload("SendControlInTransferAsync")] + HRESULT SendControlInTransferAsync( + [in] Windows.Devices.Usb.UsbSetupPacket *packet, + [in] Windows.Storage.Streams.IBuffer *buffer, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer *> **operation + ); + [overload("SendControlInTransferAsync")] + HRESULT SendControlInTransferAsyncNoBuffer( + [in] Windows.Devices.Usb.UsbSetupPacket *packet, + [out, retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer *> **operation + ); + [propget] HRESULT DefaultInterface([out, retval] Windows.Devices.Usb.UsbInterface **value); + [propget] HRESULT DeviceDescriptor([out, retval] Windows.Devices.Usb.UsbDeviceDescriptor **value); + [propget] HRESULT Configuration([out, retval] Windows.Devices.Usb.UsbConfiguration **value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbDeviceClass), + uuid(051942f9-845e-47eb-b12a-38f2f617afe7) + ] + interface IUsbDeviceClass : IInspectable + { + [propget] HRESULT ClassCode([out, retval] BYTE *value); + [propput] HRESULT ClassCode([in] BYTE value); + [propget] HRESULT SubclassCode([out, retval] Windows.Foundation.IReference<BYTE> **value); + [propput] HRESULT SubclassCode([in] Windows.Foundation.IReference<BYTE> *value); + [propget] HRESULT ProtocolCode([out, retval] Windows.Foundation.IReference<BYTE> **value); + [propput] HRESULT ProtocolCode([in] Windows.Foundation.IReference<BYTE> *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.Devices.Usb.UsbDevice), + uuid(066b85a2-09b7-4446-8502-6fe6dcaa7309) + ] + interface IUsbDeviceStatics : IInspectable + { + [overload("GetDeviceSelector")] + HRESULT GetDeviceSelector([in] UINT32 vendor, [in] UINT32 product, [in] GUID class, [out, retval] HSTRING *value); + [overload("GetDeviceSelector")] + HRESULT GetDeviceSelectorGuidOnly([in] GUID class, [out, retval] HSTRING *value); + [overload("GetDeviceSelector")] + HRESULT GetDeviceSelectorVidPidOnly([in] UINT32 vendor, [in] UINT32 product, [out, retval] HSTRING *value); + HRESULT GetDeviceClassSelector([in] Windows.Devices.Usb.UsbDeviceClass *class, [out, retval] HSTRING *value); + HRESULT FromIdAsync([in] HSTRING id, [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Usb.UsbDevice *> **operation); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbConfiguration + { + [default] interface Windows.Devices.Usb.IUsbConfiguration; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile), + static(Windows.Devices.Usb.IUsbDeviceStatics, Windows.Foundation.UniversalApiContract, 1.0) + ] + runtimeclass UsbDevice + { + [default] interface Windows.Devices.Usb.IUsbDevice; + interface Windows.Foundation.IClosable; + } + + [ + activatable(Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbDeviceClass + { + [default] interface Windows.Devices.Usb.IUsbDeviceClass; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbDeviceDescriptor + { + [default] interface Windows.Devices.Usb.IUsbDeviceDescriptor; + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbInterface + { + [default] interface Windows.Devices.Usb.IUsbInterface; + } + + [ + activatable(Windows.Devices.Usb.IUsbSetupPacketFactory, Windows.Foundation.UniversalApiContract, 1.0), + activatable(Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UsbSetupPacket + { + [default] interface Windows.Devices.Usb.IUsbSetupPacket; + } +}
1
0
0
0
Mohamad Al-Jaf : include: Add support for IAsyncOperation parameterized type IBuffer.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 4871777b780a04e0a4e07ed2b58a3c37af655a05 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4871777b780a04e0a4e07ed2b58a3c…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Mon Jul 3 03:43:32 2023 -0400 include: Add support for IAsyncOperation parameterized type IBuffer. Needed by windows.devices.usb.idl. --- include/windows.storage.streams.idl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/windows.storage.streams.idl b/include/windows.storage.streams.idl index bb107b25976..9255fb43ff3 100644 --- a/include/windows.storage.streams.idl +++ b/include/windows.storage.streams.idl @@ -35,6 +35,11 @@ namespace Windows.Storage.Streams { interface IRandomAccessStreamWithContentType; runtimeclass Buffer; + declare { + interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Storage.Streams.IBuffer *>; + interface Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IBuffer *>; + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), uuid(905a0fe0-bc53-11df-8c49-001e4fc686da)
1
0
0
0
Mohamad Al-Jaf : include: Add support for IAsyncOperation UINT32.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 36e31223294b594f6b207fbc65062254de30eb1d URL:
https://gitlab.winehq.org/wine/wine/-/commit/36e31223294b594f6b207fbc650622…
Author: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Date: Mon Jul 3 03:41:57 2023 -0400 include: Add support for IAsyncOperation UINT32. Needed by windows.devices.usb.idl. --- include/windows.foundation.idl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl index 11679367eca..d4475adc807 100644 --- a/include/windows.foundation.idl +++ b/include/windows.foundation.idl @@ -100,8 +100,10 @@ namespace Windows.Foundation { interface Windows.Foundation.EventHandler<IInspectable *>; interface Windows.Foundation.AsyncOperationCompletedHandler<IInspectable *>; interface Windows.Foundation.AsyncOperationCompletedHandler<boolean>; + interface Windows.Foundation.AsyncOperationCompletedHandler<UINT32>; interface Windows.Foundation.IAsyncOperation<IInspectable *>; interface Windows.Foundation.IAsyncOperation<boolean>; + interface Windows.Foundation.IAsyncOperation<UINT32>; interface Windows.Foundation.IReference<BYTE>; interface Windows.Foundation.IReference<INT32>; interface Windows.Foundation.IReference<DOUBLE>;
1
0
0
0
Jacek Caban : win32u: Use user message packing for WM_NCCALCSIZE.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: c9a17eb503899bd6f4280004a50f59226ed2d893 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c9a17eb503899bd6f4280004a50f59…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 18 13:19:43 2023 +0200 win32u: Use user message packing for WM_NCCALCSIZE. --- dlls/user32/winproc.c | 30 +++++------------- dlls/win32u/hook.c | 8 ++--- dlls/win32u/message.c | 74 ++++++++++++++++++++++++++++++++++---------- dlls/win32u/tests/win32u.c | 29 +++++++++++++---- dlls/win32u/win32u_private.h | 6 ++-- dlls/wow64win/user.c | 48 +++++++++++++++++++++++----- 6 files changed, 136 insertions(+), 59 deletions(-)
1
0
0
0
Jacek Caban : win32u: Pack messages in WH_CALLWNDPROCRET hooks.
by Alexandre Julliard
24 Jul '23
24 Jul '23
Module: wine Branch: master Commit: 9b3aa968992a53686b38b7b5ecdb0bf3f5f9059e URL:
https://gitlab.winehq.org/wine/wine/-/commit/9b3aa968992a53686b38b7b5ecdb0b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Jul 19 17:04:30 2023 +0200 win32u: Pack messages in WH_CALLWNDPROCRET hooks. --- dlls/user32/hook.c | 12 ++++++++++++ dlls/win32u/hook.c | 7 +++++++ dlls/wow64win/user.c | 9 +++++++++ 3 files changed, 28 insertions(+) diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index 1ae49587688..a21b11735ab 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -495,6 +495,18 @@ BOOL WINAPI User32CallWindowsHook( struct win_hook_params *params, ULONG size ) ret_size = 0; break; } + case WH_CALLWNDPROCRET: + if (ret_size > sizeof(CWPRETSTRUCT)) + { + CWPRETSTRUCT *cwpret = (CWPRETSTRUCT *)params->lparam; + size_t offset = (lparam_offset + sizeof(*cwpret) + 15) & ~15; + void *buffer = (char *)params + offset; + + unpack_message( cwpret->hwnd, cwpret->message, &cwpret->wParam, &cwpret->lParam, + &buffer, size - offset, !params->prev_unicode ); + ret_size = 0; + break; + } } } if (params->module[0] && !(proc = get_hook_proc( proc, params->module, &free_module ))) diff --git a/dlls/win32u/hook.c b/dlls/win32u/hook.c index 27b109ce545..e3c3a0ce5ba 100644 --- a/dlls/win32u/hook.c +++ b/dlls/win32u/hook.c @@ -295,6 +295,13 @@ static LRESULT call_hook( struct win_hook_params *info, const WCHAR *module, siz cwp->message, cwp->lParam, ansi ); } break; + case WH_CALLWNDPROCRET: + { + CWPRETSTRUCT *cwpret = (CWPRETSTRUCT *)((char *)params + lparam_offset); + pack_user_message( (char *)params + message_offset, message_size, + cwpret->message, cwpret->lParam, ansi ); + } + break; } } diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 94df46cbb90..7e77e5a2f73 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -766,6 +766,15 @@ static UINT hook_lparam_64to32( int id, int code, const void *lp, size_t size, v cwpret32.message = cwpret->message; cwpret32.hwnd = HandleToUlong( cwpret->hwnd ); memcpy( lp32, &cwpret32, sizeof(cwpret32) ); + if (size > sizeof(*cwpret)) + { + const size_t offset64 = (sizeof(*cwpret) + 15) & ~15; + const size_t offset32 = (sizeof(cwpret32) + 15) & ~15; + size = packed_message_64to32( cwpret32.message, + (const char *)lp + offset64, + (char *)lp32 + offset32, size - offset64 ); + return offset32 + size; + } return sizeof(cwpret32); }
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
87
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
Results per page:
10
25
50
100
200