none
How to expose the SENSOR_PROPERTY_LIGHT_RESPONSE_CURVE property from your driver

    Question

  • Hi,

    I am trying to expose the SENSOR_PROPERTY_LIGHT_RESPONSE_CURVE property from your driver.  Do you have any sample code of it?  

    I did the below but still not successful.  I mean not successful because at the sensor diagnostic tool, I can't see the array at the SENSOR_PROPERTY_LIGHT_RESPONSE_CURVE.

    UINT responseCurve[10] = {
    0, 10,
    10, 40,
    40, 80,
    68, 100,
    90, 150
    };

    ComPtr<IPortableDeviceValues> spResponseCurveValues;
    hr = CoCreateInstance(
    CLSID_PortableDeviceValues,
    nullptr,
    CLSCTX_INPROC_SERVER,
    IID_PPV_ARGS(&spResponseCurveValues));

    if (SUCCEEDED(hr)) {

    PROPVARIANT pvCurve = { 0 };

    InitPropVariantFromBuffer(responseCurve, (10 * sizeof (UINT)), &pvCurve);

    hr = spResponseCurveValues->SetValue(SENSOR_PROPERTY_LIGHT_RESPONSE_CURVE, &pvCurve);

    PropVariantClear(&pvCurve);

    }

    Any help is very much appreciated.

    Thanks.


    Thursday, July 30, 2015 2:49 AM