ISensorManager interface
Provides methods for discovering and retrieving available sensors and a method to request sensor manager events.
Members
The ISensorManager interface inherits from the IUnknown interface but does not have additional members.
| Event | Description |
|---|---|
| GetSensorByID | Retrieves a pointer to the specified sensor. |
| GetSensorsByCategory | Retrieves a collection containing all sensors associated with the specified category. |
| GetSensorsByType | Retrieves a collection containing all sensors associated with the specified type. |
| RequestPermissions | Opens a system dialog box to request user permission to access sensor data. |
| SetEventSink | Specifies the interface through which to receive sensor manager event notifications. |
Remarks
You retrieve a pointer to this interface by calling the COM CoCreateInstance method. If group policy does not allow creation of this object, CoCreateInstance will return HRESULT_FROM_WIN32 (ERROR_ACCESS_DISABLED_BY_POLICY).
Examples
The following example code creates an instance of the sensor manager.
// Create the sensor manager. hr = CoCreateInstance(CLSID_SensorManager, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pSensorManager)); if(hr == HRESULT_FROM_WIN32(ERROR_ACCESS_DISABLED_BY_POLICY)) { // Unable to retrieve sensor manager due to // group policy settings. Alert the user. }
Requirements
|
Minimum supported client | Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server | None supported [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012