C# - 如何获取连接到Windows设备的所有传感器的列表? [英] C# - how to get list of all the sensors connected to a windows device ?
问题描述
我正在开发一个简单的C#后端应用程序,我将收集来自连接到Windows设备的不同类型传感器的所有数据,如陀螺仪,重力传感器。等等
我尝试了什么:
经过大量的互联网搜索我找不到任何有用的东西。与我的查询更接近的唯一选择是UWP应用程序,但我现在不在使用UWP应用程序。我正在使用Simple Console C#Application,是否可以帮助我找到一些用于Windows传感器管理的优秀且有用的API?
I'm working on a simple C# Back-end App where I've to collect all the data coming from different kind of sensors that are connected to windows Device, like " Gyroscope " , " Gravity " sensors. etc.
What I have tried:
After a lot of internet search I couldn't find anything useful. The only option that is a little bit closer to my query is UWP Apps, But I'm not working on UWP app now. I'm working with Simple Console C# Application , Can any body help me to find out some good and useful API for windows sensors management ?
推荐答案
查看传感器API(Windows) [ ^ ]和该页面的链接和左侧的项目。
但是,API使用COM接口来使用C ++。您可以编写自己的包装器或使用.Net的现有实现(使用c#或.net在网上搜索windows sensor api。)。
一些链接:
致电来自桌面应用程序的Windows 10 API - Windows开发人员BlogWindows开发人员博客 [ ^ ]
使用C#中的Windows 7传感器和位置平台 [ ^ ]
如何从C#桌面应用程序调用Windows 8中的WinRT API - WinRT图表 - Scott Hanselman [ ^ ]
See the Sensor API (Windows)[^] and the links from that page and the items on the left side.
However, the API uses COM interfaces for the usage with C++. You can write your own wrappers or use existing implementations for .Net (search the web for "windows sensor api" with "c#" or ".net".).
Some links:
Calling Windows 10 APIs From a Desktop Application - Windows Developer BlogWindows Developer Blog[^]
Using the Windows 7 Sensor and Location Platform from C#[^]
How to call WinRT APIs in Windows 8 from C# Desktop Applications - WinRT Diagram - Scott Hanselman[^]
这篇关于C# - 如何获取连接到Windows设备的所有传感器的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!