询问者
请教一下HID设备,怎么在metro app和desktop app下同步?

问题
全部回复
-
你好,
不是很明白你的意思,你是说想在Store App占用HID设备的时候,Desktop应用来接管HID么?
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later. -
你好,
不是很明白你的意思,你是说想在Store App占用HID设备的时候,Desktop应用来接管HID么?
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.在Store App给HID发消息,并等待HID设备回消息的时候,Desktop App也会给HID设备发消息。
-
你好,
Windows Store App中队HID信息的处理已经有类似让步的举措,参考一下文档: Human Interface Devices (HID)
里面提到为了避免和Windows API或者OS冲突,Windows Store App已经屏蔽了顶层usage page的使用,所以你Desktop Application使用的UsagePage是否包含在内?
The Windows.Devices.HumanInterfaceDevice API supports most HID devices. However, it blocks the top-level application collection represented by the following usage pages, to prevent conflict with other Windows APIs and OS behavior:
- HID_USAGE_PAGE_UNDEFINED
- HID_USAGE_PAGE_GENERIC
- HID_USAGE_GENERIC_KEYBOARD
- HID_USAGE_GENERIC_KEYPAD
- HID_USAGE_GENERIC_SYSTEM_CTL
- HID_USAGE_PAGE_KEYBOARD
- HID_USAGE_PAGE_CONSUMER
- HID_USAGE_PAGE_DIGITIZER
- HID_USAGE_PAGE_SENSOR
- HID_USAGE_PAGE_BARCODE_SCANNER
- HID_USAGE_PAGE_WEIGHING_DEVICE
- HID_USAGE_PAGE_MAGNETIC_STRIPE_READER
- HID_USAGE_PAGE_TELEPHONY
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later. -
你好,这个我帮你去问一下吧,我也不是很清楚,不过我认为可能没办法,毕竟是系统封装的功能。
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later. -
你好,
我这里问到了点东西,看看对你是否有帮助。
首先Windows Store App里面的 API: Windows.Devices.HumanInterfaceDevice 仅仅支持不在列表中的UsagePage,这里你的应该是不在列表中。
其次,这些设备必须不能是PC自带的,需要是额外的那种设备才行。
同时,你可以测试一下,先从Windows Store App中运行不同的UsagePage然后再开启Desktop程序对它的访问么?
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.