From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- .../holographicspace.c | 30 +++++++++++++++++++ .../tests/perception.c | 13 ++++++++ 2 files changed, 43 insertions(+)
diff --git a/dlls/windows.perception.stub/holographicspace.c b/dlls/windows.perception.stub/holographicspace.c index a99932f7889..52fd6421075 100644 --- a/dlls/windows.perception.stub/holographicspace.c +++ b/dlls/windows.perception.stub/holographicspace.c @@ -26,6 +26,7 @@ struct holographicspace { IActivationFactory IActivationFactory_iface; IHolographicSpaceStatics2 IHolographicSpaceStatics2_iface; + IHolographicSpaceStatics3 IHolographicSpaceStatics3_iface; LONG ref; };
@@ -57,6 +58,13 @@ static HRESULT WINAPI factory_QueryInterface( IActivationFactory *iface, REFIID return S_OK; }
+ if (IsEqualGUID( iid, &IID_IHolographicSpaceStatics3 )) + { + *out = &impl->IHolographicSpaceStatics3_iface; + IInspectable_AddRef( *out ); + return S_OK; + } + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; @@ -162,10 +170,32 @@ static const struct IHolographicSpaceStatics2Vtbl holographicspace_statics2_vtbl holographicspace_statics2_remove_IsAvailableChanged, };
+DEFINE_IINSPECTABLE( holographicspace_statics3, IHolographicSpaceStatics3, struct holographicspace, IActivationFactory_iface ) + +static HRESULT WINAPI holographicspace_statics3_get_IsConfigured( IHolographicSpaceStatics3 *iface, boolean *value ) +{ + FIXME( "iface %p, value %p stub!\n", iface, value ); + return E_NOTIMPL; +} + +static const struct IHolographicSpaceStatics3Vtbl holographicspace_statics3_vtbl = +{ + holographicspace_statics3_QueryInterface, + holographicspace_statics3_AddRef, + holographicspace_statics3_Release, + /* IInspectable methods */ + holographicspace_statics3_GetIids, + holographicspace_statics3_GetRuntimeClassName, + holographicspace_statics3_GetTrustLevel, + /* IHolographicSpaceStatics3 methods */ + holographicspace_statics3_get_IsConfigured, +}; + static struct holographicspace holographicspace_statics = { {&factory_vtbl}, {&holographicspace_statics2_vtbl}, + {&holographicspace_statics3_vtbl}, 1, };
diff --git a/dlls/windows.perception.stub/tests/perception.c b/dlls/windows.perception.stub/tests/perception.c index 2fb526ed3d5..67c45e2a480 100644 --- a/dlls/windows.perception.stub/tests/perception.c +++ b/dlls/windows.perception.stub/tests/perception.c @@ -99,6 +99,7 @@ static void test_HolographicSpaceStatics(void) { static const WCHAR *holographicspace_statics_name = L"Windows.Graphics.Holographic.HolographicSpace"; IHolographicSpaceStatics2 *holographicspace_statics2; + IHolographicSpaceStatics3 *holographicspace_statics3; IActivationFactory *factory; BOOLEAN value; HSTRING str; @@ -142,6 +143,18 @@ static void test_HolographicSpaceStatics(void)
ref = IHolographicSpaceStatics2_Release( holographicspace_statics2 ); ok( ref == 2, "got ref %ld.\n", ref ); + + hr = IActivationFactory_QueryInterface( factory, &IID_IHolographicSpaceStatics3, (void **)&holographicspace_statics3 ); + if (hr == E_NOINTERFACE) /* win1703 */ + { + win_skip( "IHolographicSpaceStatics3 is not supported, skipping tests.\n" ); + goto done; + } + + ok( hr == S_OK, "got hr %#lx.\n", hr ); + + ref = IHolographicSpaceStatics3_Release( holographicspace_statics3 ); + ok( ref == 2, "got ref %ld.\n", ref ); done: ref = IActivationFactory_Release( factory ); ok( ref == 1, "got ref %ld.\n", ref );