From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/wintypes/main.c | 34 +++++++++++++++++++++++++++++++++- dlls/wintypes/tests/wintypes.c | 3 +++ 2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/dlls/wintypes/main.c b/dlls/wintypes/main.c index 6e2fa60b55f..7c8d7c55232 100644 --- a/dlls/wintypes/main.c +++ b/dlls/wintypes/main.c @@ -403,6 +403,7 @@ struct property_value IReference_INT32 int32_iface; IReference_UINT32 uint32_iface; IReference_INT64 int64_iface; + IReference_UINT64 uint64_iface; IReference_boolean boolean_iface; IReference_FLOAT float_iface; IReference_DOUBLE double_iface; @@ -500,6 +501,12 @@ static HRESULT STDMETHODCALLTYPE property_value_QueryInterface(IPropertyValue *i *out = &impl->irefs.int64_iface; return S_OK; } + else if (IsEqualIID(riid, &IID_IReference_UINT64) && impl->type == PropertyType_UInt64) + { + IReference_UINT64_AddRef(&impl->irefs.uint64_iface); + *out = &impl->irefs.uint64_iface; + return S_OK; + } else if (IsEqualIID(riid, &IID_IReference_boolean) && impl->type == PropertyType_Boolean) { IReference_boolean_AddRef(&impl->irefs.boolean_iface); @@ -1046,6 +1053,31 @@ static const struct IReference_INT64Vtbl iref_int64_vtbl = iref_int64_get_Value, };
+DEFINE_IINSPECTABLE_(iref_uint64, IReference_UINT64, struct property_value, + impl_from_IReference_UINT64, irefs.uint64_iface, &impl->IPropertyValue_iface); + +static HRESULT STDMETHODCALLTYPE iref_uint64_get_Value(IReference_UINT64 *iface, UINT64 *value) +{ + struct property_value *impl = impl_from_IReference_UINT64(iface); + + TRACE("iface %p, value %p.\n", iface, value); + + return property_value_GetUInt64(&impl->IPropertyValue_iface, value); +} + +static const struct IReference_UINT64Vtbl iref_uint64_vtbl = +{ + iref_uint64_QueryInterface, + iref_uint64_AddRef, + iref_uint64_Release, + /* IInspectable methods */ + iref_uint64_GetIids, + iref_uint64_GetRuntimeClassName, + iref_uint64_GetTrustLevel, + /* IReference<UINT64> methods */ + iref_uint64_get_Value, +}; + DEFINE_IINSPECTABLE_(iref_boolean, IReference_boolean, struct property_value, impl_from_IReference_boolean, irefs.boolean_iface, &impl->IPropertyValue_iface);
@@ -1231,7 +1263,7 @@ static HRESULT STDMETHODCALLTYPE property_value_statics_CreateUInt64(IPropertyVa UINT64 value, IInspectable **property_value) { TRACE("iface %p, value %I64u, property_value %p.\n", iface, value, property_value); - return create_primitive_property_value(PropertyType_UInt64); + create_primitive_property_value_iref(PropertyType_UInt64, irefs.uint64_iface.lpVtbl, iref_uint64_vtbl); }
static HRESULT STDMETHODCALLTYPE property_value_statics_CreateSingle(IPropertyValueStatics *iface, diff --git a/dlls/wintypes/tests/wintypes.c b/dlls/wintypes/tests/wintypes.c index 4cebe43aaa7..9f8358a1157 100644 --- a/dlls/wintypes/tests/wintypes.c +++ b/dlls/wintypes/tests/wintypes.c @@ -741,6 +741,7 @@ static void test_IPropertyValueStatics(void) IReference_INT32 *iref_int32; IReference_UINT32 *iref_uint32; IReference_INT64 *iref_int64; + IReference_UINT64 *iref_uint64; IReference_boolean *iref_boolean; IReference_HSTRING *iref_hstring; IReference_FLOAT *iref_float; @@ -755,6 +756,7 @@ static void test_IPropertyValueStatics(void) INT32 ret_int32; UINT32 ret_uint32; INT64 ret_int64; + UINT64 ret_uint64; FLOAT ret_float; DOUBLE ret_double; GUID ret_guid; @@ -1014,6 +1016,7 @@ static void test_IPropertyValueStatics(void) TEST_PROPERTY_VALUE_IREFERENCE(Int32, IReference_INT32, int32_value, iref_int32, ret_int32) TEST_PROPERTY_VALUE_IREFERENCE(UInt32, IReference_UINT32, uint32_value, iref_uint32, ret_uint32) TEST_PROPERTY_VALUE_IREFERENCE(Int64, IReference_INT64, int64_value, iref_int64, ret_int64) + TEST_PROPERTY_VALUE_IREFERENCE(UInt64, IReference_UINT64, uint64_value, iref_uint64, ret_uint64) TEST_PROPERTY_VALUE_IREFERENCE(Boolean, IReference_boolean, boolean_value, iref_boolean, ret) TEST_PROPERTY_VALUE_IREFERENCE(String, IReference_HSTRING, str, iref_hstring, ret_str) TEST_PROPERTY_VALUE_IREFERENCE(Single, IReference_FLOAT, float_value, iref_float, ret_float)