Tag: 原始输入

使用RegisterRawInputDevices注册触摸屏HID不起作用

我正在尝试使用RAWINPUT API从Surface触摸屏获取原始输入数据。 获取设备列表很有用。 但是当我想用RegisterRawInputDevices注册触摸屏设备时,我遇到了问题:该函数在GetLastError中返回false(87)(ERROR_INVALID_PARAMETER)…我尝试了不同的东西,我在网上阅读但没有工作。 我在C#上使用Interop用于非常简单的桌面控制台应用程序,在Windows 8.1上使用Visual Studio 2013进行开发。 目标是Surface Pro 3。 使用API​​的代码在下面…(对于丑陋的编辑感到遗憾)。 我会非常感谢你的帮助:) 皮埃尔 CASS中API封装的CLASS using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; using System.Diagnostics; namespace ConsoleApplication3 { class APIWrapper { #region Properties private static int _vendorID=-1; public static int VendorID { get { return _vendorID; } } private static int […]