Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Hacking a mouse filter driver

youkiyouki Member Posts: 3
edited September 2020 in NTDEV

I want to develop a windows desktop application to modify the mouse buttons behaviour (PS/2 and USB). I tested it with mouse hooks in c# and c++ but i realized that i probably have to use a filter driver.
I want to hack the moufiltr example for my purposes but it's not that easy for me to find the corresponding information to do it.
1. I'm following a webcast for developing a WDM filter driver to understand how to start but is it the right way for a beginner just to hack a WDF filter driver?
2. Where can i find the right information to proceed specifically in moufiltr to use it with USB and to modify the mouse actions? (Of course, concrete steps would be great. :) )



  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,760

    If mouse hooks work, why do you need a filter driver? Never do anything in kernel that can be done just as easily in user mode.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • youkiyouki Member Posts: 3

    Hi Tim,
    Finally I had a little help from a very experienced guy on MSDN. The problem was that SendInput doesn't work properly without lagging in a mouse hook when i modify the scroll wheel. It took a few weeks of testing and it's unfortunately not working.

    I've read a little bit in this forum where you suggest to read some things about windows drivers for understanding the moufiltr driver.
    I don't really know where to start. The webcast for the WDM driver is really understandable but i doubt that i can technically transport it to the moufiltr example. WDF seems more complicated. I know that i have to do it with WDF at the end.


  • MBond2MBond2 Member Posts: 233

    you are not likely to get much help here unless you tell us how you are planning to 'hack the mouse' and to what end. as a learning project sure, but then read the sample code

  • youkiyouki Member Posts: 3

    Ok, Thanks. Tim's statement got me thinking further. I had a few hard weeks of thinking and testing behind me, then in the morning i had the right idea and it's working now without the need of a filter driver.

    Best regards

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE