locked
question about get wpd driver value from metro javascript

    Question

  • 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?

    Sunday, May 27, 2012 3:46 AM

Answers

All replies

  • Ed,

    I will look into this for you.

    Best Wishes - Eric

    Tuesday, May 29, 2012 6:33 AM
    Moderator
  • Ed,

    Did you write your Metro UI in XAML?

    Best Wishes - Eric

    Thursday, May 31, 2012 12:47 AM
    Moderator
  • Dear Eric:

    I already fix this problem, thanks your help.

    Br

    Ed

    Monday, June 4, 2012 2:04 AM