Bunch of minor fixes, device list format.
1.1 --- a/HidDevice.cs Sun Feb 22 20:56:08 2015 +0100
1.2 +++ b/HidDevice.cs Tue Mar 03 21:07:44 2015 +0100
1.3 @@ -239,12 +239,12 @@
1.4
1.5 if (Product != null && Product.Length > 1)
1.6 {
1.7 - //Add the devices with a proper name at the top
1.8 + //This device as a proper name, use it
1.9 FriendlyName = Product + suffix;
1.10 }
1.11 else
1.12 {
1.13 - //Add other once at the bottom
1.14 + //No proper name just use the device ID instead
1.15 FriendlyName = "0x" + ProductId.ToString("X4") + suffix;
1.16 }
1.17
2.1 --- a/RawInput.cs Sun Feb 22 20:56:08 2015 +0100
2.2 +++ b/RawInput.cs Tue Mar 03 21:07:44 2015 +0100
2.3 @@ -189,7 +189,7 @@
2.4 else
2.5 {
2.6 //Add other once at the bottom
2.7 - node = aTreeView.Nodes.Add(hidDevice.Name, "0x" + hidDevice.FriendlyName);
2.8 + node = aTreeView.Nodes.Add(hidDevice.Name, hidDevice.FriendlyName);
2.9 }
2.10
2.11 node.Nodes.Add("Manufacturer: " + hidDevice.Manufacturer);
3.1 --- a/Win32Hid.cs Sun Feb 22 20:56:08 2015 +0100
3.2 +++ b/Win32Hid.cs Tue Mar 03 21:07:44 2015 +0100
3.3 @@ -52,7 +52,7 @@
3.4 ///Report: PCHAR->CHAR*
3.5 ///ReportLength: ULONG->unsigned int
3.6 [System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetUsageValue", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
3.7 - public static extern int HidP_GetUsageValue(HIDP_REPORT_TYPE ReportType, ushort UsagePage, ushort LinkCollection, ushort Usage, ref uint UsageValue, System.IntPtr PreparsedData, System.IntPtr Report, uint ReportLength);
3.8 + public static extern HidStatus HidP_GetUsageValue(HIDP_REPORT_TYPE ReportType, ushort UsagePage, ushort LinkCollection, ushort Usage, ref uint UsageValue, System.IntPtr PreparsedData, System.IntPtr Report, uint ReportLength);
3.9
3.10
3.11