Commit 0fb31cfc authored by Mohamad Al-Jaf's avatar Mohamad Al-Jaf Committed by Alexandre Julliard

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

Needed for Revo Scan 5.
parent b0582743
......@@ -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 )
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment