VxD

VxD是在Microsoft Windows/386、Windows 3.x的386增强模式及Windows 9x中使用的设备驱动程序模型,并在一定程度上被Novell DOS 7英语DR-DOSOpenDOS 7.01英语OpenDOS 7.01以及DR-DOS 7.02英语DR-DOS 7.02(及更高版本)多任务(TASKMGR)使用。[1]VxDs可以访问内核和所有运行中进程的内存,以及对硬件的原始访问。

设计

名称“VxD”是“虚拟xxx驱动程序”(virtual xxx driver)的缩写,其中“xxx”是一些硬件设备的类别。它本身源于Windows 3.x中以vxxxd.386作为文件名称的大多数驱动程序,例如:vjoyd.386(操纵杆)、vmm.386(内存管理器)。VxD在Windows 3.x下通常使用.386文件扩展名,在Windows 9x下则使用.vxd。为Windows 3.x编写的VxD可以在Windows 9x下使用,反之不可。

历史

在Windows出现前,DOS应用程序直接与各种硬件通信(响应中断,读取和写入设备内存等)或通过DOS设备驱动程序通信。由于DOS不是多任务架构,每个应用程序将在运行时对硬件进行独占和完全的控制。虽然Windows应用程序通常不直接与硬件通信,但它是Windows驱动程序的唯一方法,并且在Windows 3.x中的真实和标准模式中仍是如此。

Windows/386及之后的系统允许多个DOS应用程序在自己的DOS虚拟机英语Virtual DOS machine中并发执行。为在这些虚拟机之间共享物理资源,微软引入了虚拟设备驱动程序。这些驱动程序通过拦截对硬件的调用来解决与物理资源的使用冲突相关的问题。相较于实际设备的机器端口,它表示经由操作系统管理的“虚拟”设备。

过时

尽管Windows 98引入了Windows Driver Model (WDM),VxD仍可在Windows 98和Windows Me上使用。VxD不能在Windows NT及后续版本中使用。从Windows 2000开始,基于Windows NT的操作系统也使用Windows Driver Model,而Windows NT 4和更低版本必须使用专门为它们编写的驱动程序。在Windows 9x中使用VxD驱动程序而非WDM驱动程序将导致高级ACPI 状态(例如休眠)不可用。

VxD不应与类似的名称混淆。NTVDM专用的“VDD”(虚拟设备驱动程序)在Windows NT“DOS Box”下仿真直接I/O的方法NTVDM VDD作为常规的32位用户模式DLL运行,并且必须依靠Win32 API(或另一个WDM驱动程序)代表16位程序模拟所需的I/O。

参见

  • VXD (CONFIG.SYS directive)英语VXD (CONFIG.SYS directive)
  • Windows Driver Model(WDM)
  • Windows 9x的架构英语Architecture of Windows 9x

参考资料

  1. ^ Paul, Matthias. NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP (e-book) edition 3, release 157. 1997-07-30 [2014-09-06]. (原始内容存档于2016-11-04) (德语). 

拓展阅读

  • Unauthorized Windows 95 - Developer's Resource Kit 1st. Foster City, California, USA: John Wiley & Sons, Inc. November 1994. ISBN 1-56884-305-4. ISBN 978-1-56884-305-6. 
  • Undocumented DOS: A programmer's guide to reserved MS-DOS functions and data structures - expanded to include MS-DOS 6, Novell DOS, and Windows 3.1 2nd. 雷丁 (麻薩諸塞州): Addison Wesley英语Addison Wesley. 1994. ISBN 0-201-63287-X. ISBN 978-0-201-63287-3. 
  • Programmer's Guide to Microsoft Windows 95: Key Topics on Programming for Windows from the Microsoft Windows Development Team. Technical Reference 1st (Redmond, Washington, USA: Microsoft Press). 1995-07-01. ISBN 1-55615-834-3. ISBN 978-1-55615-834-6. 
  • Systems Programming for Windows 95 1st. Redmond, Washington, USA: Microsoft Press. 1995. ISBN 1-55615-949-8. ISBN 978-1-55615-949-7. 
  • Windows 95 System Programming Secrets. The Secrets Series 1st (John Wiley & Sons, Inc.). November 1995. ISBN 1-56884-318-6. ISBN 978-156884-318-6. 
  • Writing Windows VxDs and Device Drivers - Programming Secrets for Virtual Device Drivers 2nd printing, 2nd. Lawrence, Kansas, USA: R&D Boooks英语R&D Boooks / Miller Freeman, Inc.英语Miller Freeman, Inc.. 1997. ISBN 0-87930-438-3. ISBN 978-0-87930-438-6. 
圖形介面
音樂與音效
多媒體
Web
資料存取
網路
通訊
  • 訊息API英语Messaging Application Programming Interface
  • 電話API
  • WCF
管理
元件與模型
函式庫
驱动程序
安全性
.NET
软件工廠
  • EFx Factory英语EFx Factory
  • Enterprise Library英语Microsoft Enterprise Library
  • 複合使用者介面英语Composite UI Application Block
  • CCF英语Microsoft Customer Care Framework
  • CSF英语Microsoft Connected Services Framework
行程間通訊
可協助性
  • Active Accessibility英语Microsoft Active Accessibility
  • 使用者介面自動化英语Microsoft UI Automation
文字與多語系支援
  • DirectWrite
  • 文本服务框架英语Text Services Framework
  • 文本对象模型英语Text Object Model
  • 输入法编辑器
  • 語言介面套件英语Language Interface Pack
  • 多語系使用者介面英语Multilingual User Interface
  • Uniscribe
遊戲開發