![]() Void OpenHIDDevice( String DevicePath, ref HID_DEVICE HID_Device, Int32 iHIDD) This function extend FindKnownHIDDevices(). OpenHidDevice(functionClassDeviceData.DevicePath, ref HID_Devices, iHIDD) // Open device with just generic query abilities to begin with // Ref functionClassDeviceData, RequiredLength, // Retrieve the information from Plug and Play. IntPtr.Zero, 0, ref RequiredLength, IntPtr.Zero) SetupDiGetDeviceInterfaceDetail(hardwareDeviceInfo, ref deviceInfoData, // Allocate a function class device data structure to receive the // goods about this particular device. While (SetupDiEnumDeviceInterfaces(hardwareDeviceInfo, IntPtr.Zero, IntPtr.Zero, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE) ĭeviceInfoData.cbSize = Marshal.SizeOf( typeof(SP_DEVICE_INTERFACE_DATA)) HardwareDeviceInfo = SetupDiGetClassDevs( ref hidGuid, IntPtr.Zero, SetupDiDestroyDeviceInfoList(hardwareDeviceInfo) // Open a handle to the plug and play dev node. Var functionClassDeviceData = new SP_DEVICE_INTERFACE_DETAIL_DATA() ![]() ![]() Var deviceInfoData = new SP_DEVICE_INTERFACE_DATA() Int32 FindKnownHIDDevices( ref HID_DEVICE HID_Devices)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |