Commit 377aac9c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

twinapi.appcore: Implement Windows.System.Profile.AnalyticsInfo_get_DeviceFamily.

parent f082ff9e
......@@ -89,8 +89,8 @@ static HRESULT WINAPI analytics_version_info_GetTrustLevel( IAnalyticsVersionInf
static HRESULT WINAPI analytics_version_info_get_DeviceFamily( IAnalyticsVersionInfo *iface, HSTRING *value )
{
FIXME( "iface %p, value %p stub!\n", iface, value );
return E_NOTIMPL;
TRACE( "iface %p, value %p\n", iface, value );
return WindowsCreateString( L"Windows.Desktop", wcslen( L"Windows.Desktop" ), value );
}
static HRESULT WINAPI analytics_version_info_get_DeviceFamilyVersion( IAnalyticsVersionInfo *iface, HSTRING *value )
......
......@@ -117,8 +117,9 @@ static void test_AnalyticsVersionInfo(void)
IAnalyticsInfoStatics *analytics_info_statics;
IAnalyticsVersionInfo *analytics_version_info;
IActivationFactory *factory;
HSTRING str;
HSTRING str, expect_str;
HRESULT hr;
INT32 res;
LONG ref;
hr = WindowsCreateString( class_name, wcslen( class_name ), &str );
......@@ -147,6 +148,16 @@ static void test_AnalyticsVersionInfo(void)
check_interface( analytics_version_info, &IID_IInspectable, TRUE );
check_interface( analytics_version_info, &IID_IAgileObject, TRUE );
hr = WindowsCreateString( L"Windows.Desktop", wcslen( L"Windows.Desktop" ), &expect_str );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = IAnalyticsVersionInfo_get_DeviceFamily( analytics_version_info, &str );
ok( hr == S_OK, "got hr %#lx.\n", hr );
hr = WindowsCompareStringOrdinal( str, expect_str, &res );
ok( hr == S_OK, "got hr %#lx.\n", hr );
ok( !res, "got unexpected string %s.\n", debugstr_hstring(str) );
WindowsDeleteString( str );
WindowsDeleteString( expect_str );
ref = IAnalyticsVersionInfo_Release( analytics_version_info );
ok( ref == 0, "got ref %ld.\n", ref );
......
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