ISensorCollection 接口 (sensorsapi.h)

重要

请改用 UWP 传感器 API 。

基于 COM 的传感器 API 已弃用,不应在新应用程序中使用。 没有计划其他功能或增强功能,并且支持将受到限制。

表示传感器的集合,例如连接到计算机的所有传感器。

通过调用 ISensorManager 接口的方法检索指向 ISensorCollection 的指针。 除了从 IUnknown 继承的方法外, ISensorCollection 接口还公开了以下方法。

继承

ISensorCollection 接口继承自 IUnknown 接口。

Methods

ISensorCollection 接口具有这些方法。

 
ISensorCollection::Add

将传感器添加到集合。
ISensorCollection::Clear

清空传感器集合。
ISensorCollection::GetAt

检索集合中指定索引处的传感器。
ISensorCollection::GetCount

检索集合中的传感器计数。
ISensorCollection::Remove

从集合中删除传感器。 传感器由指向要移除的 ISensor 接口的指针指定。
ISensorCollection::RemoveByID

从集合中删除传感器。 要移除的传感器由其 ID 指定。

要求

Requirement 价值
最低支持的客户端 Windows 7 [仅限桌面应用]
支持的最低服务器 无受支持的版本
目标平台 Windows操作系统
Header sensorsapi.h

另请参阅

COM 接口