使用 Windows 驱动程序模型的虚拟驱动程序 - 从哪里开始?
我以前从未编写过驱动程序,但我正在启动一个开源项目,该项目涉及创建虚拟 MIDI 端口,该端口将通过网络发送 MIDI 数据。
为此,我想我会使用 WDM 创建某种虚拟驱动程序(除非可以使用内核挂钩?) - 但作为驱动程序开发的初学者,我不知道从哪里开始。
有谁知道任何有用的资源可以帮助我完成这个项目?或者我可以从类似项目中分叉一些开源代码作为起点?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Windows MIDI 驱动程序不需要在内核中实现,它们可以完全在用户空间中作为 DLL 实现。
MSDN 有一些关于您需要实现的功能的信息 -
MIDI 音频设备消息 - 不幸的是有点欠缺。
作为 NT4 DDK 的一部分,曾经有此类驱动程序的示例代码,但不幸的是,最新版本的 DDK / WDK 不再包含它。
经过一番搜索后,仍然可以找到一些更好的(尽管较旧的)文档和示例代码:
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:
查看 Dokan 项目,它正在做类似的事情(但使用文件系统虚拟驱动程序) )。
Check out the Dokan project, it is doing something similar (but with a File System virtual driver).
这里是WDM下驱动开发的好资源编译
Here is good resources compilation on driver development under WDM
谷歌 tiamodisk...一个很好的例子。虚拟 SCSI 微型端口驱动程序。
我知道的另一个虚拟驱动程序是“Filedisk”。
如果你想要 tiamodisk 我可以发电子邮件
google tiamodisk...an excellent eg. of a virtual SCSI miniport driver.
another virtual driver I know is "Filedisk".
if u want tiamodisk I can e-mail