没有设备的设备驱动程序? [英] Device driver without the device?

查看:111
本文介绍了没有设备的设备驱动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个需要使用某些内核级模块的应用程序,为此,我将该应用程序分为2个:一个用户级程序和一个内核级程序.

I'm creating an application that needs to use some kernel level modules, for which I've divided the app into 2: one user-level program and one kernel level program.

在阅读了有关设备驱动程序并完成了一些教程之后,我有些困惑.

After reading about device drivers and walking through some tutorials, I'm a little confused.

是否存在没有与任何特定设备关联的设备驱动程序?除了设备驱动程序(内核代码等)以外,还有其他可以在内核模式下工作的东西吗?

Can there be a device driver without any specific device associated with it? Is there anything other than the device driver (kernel code or something) which works in kernel mode?

防病毒程序和其他此类应用程序如何在内核模式下工作?设备驱动程序是正确的方式还是我缺少什么?

How do anti-virus programs and other such applications work in kernel mode? Is device driver the correct way or am I missing something?

推荐答案

是的,设备驱动程序可以在没有实际的硬件(即设备)连接到机器的情况下工作.只需考虑一下模拟连接的SCSI驱动器(CD-ROM,等等)以安装ISO映像的不同程序.或者考虑一下TrueCrypt,它使用容器来模拟(可移动)驱动器,这些容器不过是硬盘驱动器上的加密文件.

Yes, device drivers can work without an actual piece of hardware (i.e. the device) attached to the machine. Just think of the different programs that emulate a connected SCSI drive (CD-ROM, whatever) for mounting ISO images. Or think about TrueCrypt, which emulates (removable) drives using containers, which are nothing more than encrypted files on your hard drive.

不过,有一点警告:驱动程序开发需要更多的思考,并且必须做得更仔细,没有捷径,良好的测试,并且通常希望您对Windows驱动程序模型有足够的了解.请记住,错误和不良的驱动程序会危及整个系统的稳定性.

A word of warning, though: Driver development requires much more thought and has to be done more carefully, no shortcuts, good testing and in general expects you to know quite a good deal about the Windows driver model. Remember that faulty and poor drivers put the whole system's stability in jeopardy.

老实说,我认为在这里阅读教程是不够的.您可能想要至少投资有关该主题的一本不错的书.不过只有我的2美分.

Honestly, I don't think reading a tutorial is sufficient here. You might want to at least invest in a decent book on that subject. Just my 2 cents, though.

这篇关于没有设备的设备驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆