2011-12-26 03:37:22 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define _HIDPI_NO_FUNCTION_MACROS_
|
|
|
|
#include <ntddk.h>
|
|
|
|
#include <hidclass.h>
|
|
|
|
#include <hidpddi.h>
|
|
|
|
#include <hidpi.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include <ntddmou.h>
|
|
|
|
#include <kbdmou.h>
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2011-12-28 11:36:05 +00:00
|
|
|
//
|
|
|
|
// lower device object
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
PDEVICE_OBJECT NextDeviceObject;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// irp which is used for reading input reports
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
PIRP Irp;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// event
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
KEVENT Event;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// device object for class callback
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
PDEVICE_OBJECT ClassDeviceObject;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// class callback
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
PVOID ClassService;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// mouse type
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
USHORT MouseIdentifier;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// wheel usage page
|
|
|
|
//
|
2011-12-26 03:37:22 +00:00
|
|
|
USHORT WheelUsagePage;
|
2011-12-27 00:46:10 +00:00
|
|
|
|
2011-12-28 11:36:05 +00:00
|
|
|
//
|
|
|
|
// usage list length
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
USHORT UsageListLength;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// current usage list length
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PUSAGE CurrentUsageList;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// previous usage list
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PUSAGE PreviousUsageList;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// removed usage item list
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PUSAGE BreakUsageList;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// new item usage list
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PUSAGE MakeUsageList;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// preparsed data
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PVOID PreparsedData;
|
|
|
|
|
2011-12-28 11:36:05 +00:00
|
|
|
//
|
|
|
|
// mdl for reading input report
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PMDL ReportMDL;
|
2011-12-28 11:36:05 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// input report buffer
|
|
|
|
//
|
2011-12-27 00:46:10 +00:00
|
|
|
PUCHAR Report;
|
|
|
|
|
2011-12-28 11:36:05 +00:00
|
|
|
//
|
|
|
|
// input report length
|
|
|
|
//
|
|
|
|
ULONG ReportLength;
|
2011-12-27 00:46:10 +00:00
|
|
|
|
2011-12-28 11:36:05 +00:00
|
|
|
//
|
|
|
|
// file object the device is reading reports from
|
|
|
|
//
|
2011-12-27 02:35:03 +00:00
|
|
|
PFILE_OBJECT FileObject;
|
|
|
|
|
|
|
|
}MOUHID_DEVICE_EXTENSION, *PMOUHID_DEVICE_EXTENSION;
|
|
|
|
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
MouHid_InitiateRead(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject);
|