Sample Code
Windows Driver Samples/ Mouse Input WDF Filter Driver (Moufiltr)/ C++/ moufiltr.h/
/*++ Copyright (c) 2008 Microsoft Corporation Module Name: moufiltr.h Abstract: This module contains the common private declarations for the mouse packet filter Environment: kernel mode only Notes: Revision History: --*/ #ifndef MOUFILTER_H #define MOUFILTER_H #include <ntddk.h> #include <kbdmou.h> #include <ntddmou.h> #include <ntdd8042.h> #include <wdf.h> #if DBG #define TRAP() DbgBreakPoint() #define DebugPrint(_x_) DbgPrint _x_ #else // DBG #define TRAP() #define DebugPrint(_x_) #endif typedef struct _DEVICE_EXTENSION { // // Previous hook routine and context // PVOID UpperContext; PI8042_MOUSE_ISR UpperIsrHook; // // Write to the mouse in the context of MouFilter_IsrHook // IN PI8042_ISR_WRITE_PORT IsrWritePort; // // Context for IsrWritePort, QueueMousePacket // IN PVOID CallContext; // // Queue the current packet (ie the one passed into MouFilter_IsrHook) // to be reported to the class driver // IN PI8042_QUEUE_PACKET QueueMousePacket; // // The real connect data that this driver reports to // CONNECT_DATA UpperConnectData; } DEVICE_EXTENSION, *PDEVICE_EXTENSION; WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(DEVICE_EXTENSION, FilterGetData) // // Prototypes // DRIVER_INITIALIZE DriverEntry; EVT_WDF_DRIVER_DEVICE_ADD MouFilter_EvtDeviceAdd; EVT_WDF_IO_QUEUE_IO_INTERNAL_DEVICE_CONTROL MouFilter_EvtIoInternalDeviceControl; VOID MouFilter_DispatchPassThrough( _In_ WDFREQUEST Request, _In_ WDFIOTARGET Target ); BOOLEAN MouFilter_IsrHook ( PVOID DeviceExtension, PMOUSE_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR DataByte, PBOOLEAN ContinueProcessing, PMOUSE_STATE MouseState, PMOUSE_RESET_SUBSTATE ResetSubState ); VOID MouFilter_ServiceCallback( IN PDEVICE_OBJECT DeviceObject, IN PMOUSE_INPUT_DATA InputDataStart, IN PMOUSE_INPUT_DATA InputDataEnd, IN OUT PULONG InputDataConsumed ); #endif // MOUFILTER_H
Our Services
-
What our customers say about us?
Read our customer testimonials to find out why our clients keep returning for their projects.
View Testimonials