Adding HidP_GetUsageValue function declaration.
1.1 --- a/Win32Hid.cs Sun Feb 15 23:16:57 2015 +0100
1.2 +++ b/Win32Hid.cs Sun Feb 22 20:56:08 2015 +0100
1.3 @@ -42,6 +42,20 @@
1.4 [System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetValueCaps", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
1.5 public static extern HidStatus HidP_GetValueCaps(HIDP_REPORT_TYPE ReportType, [Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] HIDP_VALUE_CAPS[] ValueCaps, ref ushort ValueCapsLength, System.IntPtr PreparsedData);
1.6
1.7 + /// Return Type: NTSTATUS->LONG->int
1.8 + ///ReportType: HIDP_REPORT_TYPE->_HIDP_REPORT_TYPE
1.9 + ///UsagePage: USAGE->USHORT->unsigned short
1.10 + ///LinkCollection: USHORT->unsigned short
1.11 + ///Usage: USAGE->USHORT->unsigned short
1.12 + ///UsageValue: PULONG->ULONG*
1.13 + ///PreparsedData: PHIDP_PREPARSED_DATA->_HIDP_PREPARSED_DATA*
1.14 + ///Report: PCHAR->CHAR*
1.15 + ///ReportLength: ULONG->unsigned int
1.16 + [System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetUsageValue", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
1.17 + 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);
1.18 +
1.19 +
1.20 +
1.21 }
1.22
1.23
2.1 --- a/pinvoke-interop-assistant-input.c Sun Feb 15 23:16:57 2015 +0100
2.2 +++ b/pinvoke-interop-assistant-input.c Sun Feb 22 20:56:08 2015 +0100
2.3 @@ -139,3 +139,16 @@
2.4 PUSHORT ValueCapsLength,
2.5 PHIDP_PREPARSED_DATA PreparsedData
2.6 );
2.7 +
2.8 +NTSTATUS __stdcall
2.9 +HidP_GetUsageValue (
2.10 + HIDP_REPORT_TYPE ReportType,
2.11 + USAGE UsagePage,
2.12 + USHORT LinkCollection,
2.13 + USAGE Usage,
2.14 + PULONG UsageValue,
2.15 + PHIDP_PREPARSED_DATA PreparsedData,
2.16 + PCHAR Report,
2.17 + ULONG ReportLength
2.18 + );
2.19 +