windows.devices.bluetooth: Implement IBluetoothAdapterStatics::GetDeviceSelector().

Needed for Revo Scan 5.
This commit is contained in:
Mohamad Al-Jaf 2023-07-02 01:56:11 -04:00 committed by Alexandre Julliard
parent b058274317
commit 0fb31cfc5d
2 changed files with 11 additions and 6 deletions

View file

@ -119,8 +119,13 @@ DEFINE_IINSPECTABLE( bluetoothadapter_statics, IBluetoothAdapterStatics, struct
static HRESULT WINAPI bluetoothadapter_statics_GetDeviceSelector( IBluetoothAdapterStatics *iface, HSTRING *result )
{
FIXME( "iface %p, result %p stub!\n", iface, result );
return E_NOTIMPL;
static const WCHAR *default_res = L"System.Devices.InterfaceClassGuid:=\"{92383B0E-F90E-4AC9-8D44-8C2D0D0EBDA2}\" "
L"AND System.Devices.InterfaceEnabled:=System.StructuredQueryType.Boolean#True";
TRACE( "iface %p, result %p.\n", iface, result );
if (!result) return E_POINTER;
return WindowsCreateString( default_res, wcslen(default_res), result );
}
static HRESULT WINAPI bluetoothadapter_statics_FromIdAsync( IBluetoothAdapterStatics *iface, HSTRING id, IAsyncOperation_BluetoothAdapter **operation )

View file

@ -87,14 +87,14 @@ static void test_BluetoothAdapterStatics(void)
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IBluetoothAdapterStatics_GetDeviceSelector( bluetoothadapter_statics, NULL );
todo_wine ok( hr == E_POINTER, "got hr %#lx.\n", hr );
ok( hr == E_POINTER, "got hr %#lx.\n", hr );
hr = IBluetoothAdapterStatics_GetDeviceSelector( bluetoothadapter_statics, &str );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCreateString( default_res, wcslen(default_res), &default_str );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCompareStringOrdinal( str, default_str, &res );
todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
todo_wine ok( !res, "got unexpected string %s.\n", debugstr_hstring(str) );
ok( hr == S_OK, "got hr %#lx.\n", hr );
ok( !res, "got unexpected string %s.\n", debugstr_hstring(str) );
WindowsDeleteString( str );
WindowsDeleteString( default_str );