NTSTATUS
FireflySetFeature(
IN PDEVICE_CONTEXT DeviceContext,
IN UCHAR PageId,
IN USHORT FeatureId,
IN BOOLEAN EnableFeature
)
// Edit the report to reflect the enabled feature
USAGE usage = FeatureId;
ULONG usageLength = 1;
status = HidP_SetUsages(
HidP_Feature,
PageId,
0,
&usage, // pointer to the usage list
&usageLength, // number of usages in the usage list
preparsedData,
report,
caps.FeatureReportByteLength
);
HidP_SetUsages
Client code:
Implementation: