I want get the value back in wpd driver to my metro UI.
in my wpd driver, I have setting the value as below:
MethodParameterAttributeInfo g_ServiceMethodParameters[] =
{
{&METHOD_ReadHeartRateMeasurement, &METHOD_PARAMETER_HealthHeartRateService_Measurement_Result, VT_BOOL, WPD_PARAMETER_USAGE_RETURN,
WPD_PARAMETER_ATTRIBUTE_FORM_UNSPECIFIED, 0, L"Result" },
{&METHOD_ReadHeartRateMeasurement, &METHOD_PARAMETER_HealthHeartRateService_Measurement_Value, VT_INT, WPD_PARAMETER_USAGE_OUT,
WPD_PARAMETER_ATTRIBUTE_FORM_UNSPECIFIED, 1, L"Value" },
};
HRESULT HealthHeartRateService::OnMethodInvoke(
_In_ REFGUID Method,
_In_ IPortableDeviceValues* pParams,
_Out_ IPortableDeviceValues* pResults)
{
HRESULT hr = S_OK;
UNREFERENCED_PARAMETER(pParams);
if (IsEqualGUID(METHOD_ReadHeartRateMeasurement, Method))
{
READVALUE_MEASUREMENT * pMeasurement = NULL;
int value=50;
if (SUCCEEDED(hr))
{
hr = pResults->SetUnsignedLargeIntegerValue(METHOD_PARAMETER_HealthHeartRateService_Measurement_Value, value);
CHECK_HR(hr, "Failed to add METHOD_PARAMETER_HealthHeartRateService_Measurement_Value");
}
return hr;
}
How to get METHOD_PARAMETER_HealthHeartRateService_Measurement_Value = 50 back to my metro UI?