怎样用c#编写串口监控软件 监控某个串口的数据接受和发送
你要不要考虑参考一下 Portmon for Windows 提供的工作原理?How it Works: WinNTThe Portmon GUI is responsible for identifying serial and parallel ports. It does so by enumerating the serial ports that are configured under HKEY_LOCAL_MACHINE\\Hardware\\DeviceMap\\SerialComm and the parallel ports defined under HKEY_LOCAL_MACHINE\\Hardware\\DeviceMap\\Parallel Ports. These keys contain the mappings between serial and parallel port device names and the Win32-accessible names.
【怎样用c#编写串口监控软件 监控某个串口的数据接受和发送】 When you select a port to monitor, Portmon sends a request to its device driver that includes the NT name (e.g. \\device\\serial0) that you are interested in. The driver uses standard filtering APIs to attach its own filter device object to the target device object. First, it uses ZwCreateFile to open the target device. Then it translates the handle it receives back from ZwCreateFile to a device object pointer. After creating its own filter device object that matches the characteristics of the target, the driver calls IoAttachDeviceByPointer to establish the filter. From that point on the Portmon driver will see all requests aimed at the target device.
Portmon has built-in knowledge of all standard serial and parallel port IOCTLs, which are the primary way that applications and drivers configure and read status information from ports. The IOCTLs are defined in the DDK file \\ddk\\src\\comm\\inc\tddser.h and \\ddk\\src\\comm\\inc\tddpar.h, and some are documented in the DDK.
■网友
得到花都谢了。。。
推荐阅读
- 聪明人养花,这3种“花”怎样也要养一盆,每年能省不少医药费
- 互联网怎样解决“家政服务上门速度慢”的问题
- 怎样看待从1月8号起,QQ钱包开始提现收费
- 银行it人怎样转型
- 汽车|冬天怎样让车内温度快速升高?座椅加热的最佳使用方式二,外循环的作用总结
- 怎样进入通信行业
- 怎样评价扶他柠檬茶的小说《云养汉》的结尾
- 怎样成为一名合格的Python程序员?
- 怎样评价华为、诺基亚、中兴中标中国移动高端路由交换设备扩容集采
- 怎样评价类似前橙会、百老汇、南极圈这样类型的离职帮抱团,对企业的积极意义和消极意义
