# HG changeset patch # User StephaneLenclud # Date 1424634968 -3600 # Node ID bbe61b1021bb990f5e77651197caa9462fd35e8c # Parent bda062e75e479cde48ac8a1268512bcf7e8aa578 Adding HidP_GetUsageValue function declaration. diff -r bda062e75e47 -r bbe61b1021bb Win32Hid.cs --- a/Win32Hid.cs Sun Feb 15 23:16:57 2015 +0100 +++ b/Win32Hid.cs Sun Feb 22 20:56:08 2015 +0100 @@ -42,6 +42,20 @@ [System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetValueCaps", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)] 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); + /// Return Type: NTSTATUS->LONG->int + ///ReportType: HIDP_REPORT_TYPE->_HIDP_REPORT_TYPE + ///UsagePage: USAGE->USHORT->unsigned short + ///LinkCollection: USHORT->unsigned short + ///Usage: USAGE->USHORT->unsigned short + ///UsageValue: PULONG->ULONG* + ///PreparsedData: PHIDP_PREPARSED_DATA->_HIDP_PREPARSED_DATA* + ///Report: PCHAR->CHAR* + ///ReportLength: ULONG->unsigned int + [System.Runtime.InteropServices.DllImportAttribute("hid.dll", EntryPoint = "HidP_GetUsageValue", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)] + 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); + + + } diff -r bda062e75e47 -r bbe61b1021bb pinvoke-interop-assistant-input.c --- a/pinvoke-interop-assistant-input.c Sun Feb 15 23:16:57 2015 +0100 +++ b/pinvoke-interop-assistant-input.c Sun Feb 22 20:56:08 2015 +0100 @@ -139,3 +139,16 @@ PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData ); + +NTSTATUS __stdcall +HidP_GetUsageValue ( + HIDP_REPORT_TYPE ReportType, + USAGE UsagePage, + USHORT LinkCollection, + USAGE Usage, + PULONG UsageValue, + PHIDP_PREPARSED_DATA PreparsedData, + PCHAR Report, + ULONG ReportLength + ); +