windowsmididriverswdm

Virtual drivers with Windows Driver Model - where to begin?


I've never written drivers before but I'm starting an open-source project that involves creating virtual MIDI ports that will send the MIDI data over a network.

For this, I presume I would be creating some sort of virtual driver using WDM (unless it's possible with kernel hooks?) - but being a beginner to driver development I don't know where to begin.

Does anyone know any useful resources that would help me with this project? Or some open-source code from a similar project that I could fork as a starting point?


Solution

  • Windows MIDI drivers do not need to be implemented in the kernel, they can be implemented entirely in userspace as DLLs.

    MSDN has some information about the functions you need to implement - Audio Device Messages for MIDI - unfortunately it is somewhat lacking.

    There used to be sample code for this kind of driver, as part of the NT4 DDK, but more recent releases of the DDK / WDK unfortunately don't include it any more.

    Some better (though older) documentation and sample code can still be found after some searching: