ISensorManager::GetSensorByID method (sensorsapi.h)
Retrieves a pointer to the specified sensor.
Syntax
HRESULT GetSensorByID(
[in] REFSENSOR_ID sensorID,
[out] ISensor **ppSensor
);
Parameters
[in] sensorID
The ID of the sensor to retrieve.
[out] ppSensor
Address of an ISensor interface pointer that receives a pointer to the requested sensor. Will be NULL if the requested sensor cannot be found.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
The sensor manager found more than one sensor with the same ID. |
|
No sensor is available for the specified ID. |
|
NULL was passed in for ppSensor. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | sensorsapi.h |
Library | Sensorsapi.lib |
DLL | Sensorsapi.dll |