Jump to content

VxD: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m fixed reference
Fixed citations
(28 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{Short description|Device driver model used in Microsoft Windows/386}}
{{Moreref|date=September 2014}}
{{Moreref|date=September 2014}}
{{Use dmy dates|date=July 2019|cs1-dates=y}}
'''VxD''' is the [[device driver]] model used in [[Windows/386|Microsoft Windows/386]] 2.x, the 386 enhanced mode of [[Windows 3.1x|Windows 3.x]], [[Windows 9x]], and to some extent also by the [[Novell DOS 7]], [[OpenDOS 7.01]], and [[DR-DOS 7.02]] (and higher) multitasker (<code>TASKMGR</code>).<ref name="Paul_1997_NWDOSTIP"/> VxDs have access to the [[memory]] of the [[Kernel (operating system)|kernel]] and all running [[Process_(computing)|processes]], as well as raw access to the hardware. Starting with [[Windows 98]], [[Windows Driver Model]] was the recommended driver model to write drivers for, with the VxD driver model still being supported for backward compatibility, until [[Windows Me]].


== Name and design ==
'''VxD''' is the [[device driver]] model used in [[Windows 2.1x|Microsoft Windows/386]], the 386 enhanced mode of [[Windows 3.1x|Windows 3.x]], [[Windows 9x]], and to some extent also by the [[Novell DOS 7]], [[OpenDOS 7.01]], and [[DR-DOS 7.02]] (and higher) multitasker (<code>TASKMGR</code>).<ref name="Paul_1997_NWDOSTIP">{{cite book | title=NWDOS-TIPs &mdash; Tips &amp; Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds | work=MPDOSTIP | first=Matthias | last=Paul | date=1997-07-30 | edition=edition 3, release 157 | language=German | type=e-book | url=http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm | accessdate=2014-09-06}} NWDOSTIP.TXT is a comprehensive work on Novell DOS 7 and OpenDOS 7.01, including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.</ref> VxDs have access to the [[memory]] of the [[Kernel (operating system)|kernel]] and all running [[processes]],{{dn|date=April 2017}} as well as raw access to the hardware.
The name "VxD" is an abbreviation for "virtual xxx driver", where "xxx" is some class of hardware device. It derives from the fact that most drivers had filenames of the form <code>vxxxd.386</code> in [[Windows 3.1x|Windows 3.x]]. Some examples are vjoyd.386 (joystick) and vmm.386 (memory manager). VxDs under Windows 3.x usually have the [[filename extension]] <code>.386</code>, while those under Windows 9x have <code>.vxd</code>. VxDs written for Windows 3.x can be used under Windows 9x but not vice versa.

__TOC__

== Design ==
The name "VxD" is an abbreviation for "virtual xxx driver", where "xxx" is some class of hardware device. It derives from the fact that most drivers had filenames of the form <code>vxxxd.386</code> in [[Windows 3.1x|Windows 3.x]]. Some examples are: vjoyd.386 (joystick), vmm.386 (memory manager). VxDs usually have the [[filename extension]] <code>.386</code> under Windows 3.x and <code>.vxd</code> under Windows 9x. VxDs written for Windows 3.x can be used under Windows 9x but not vice versa.


== History ==
== History ==
Prior to the advent of Windows, [[DOS]] applications would either communicate directly with the various pieces of hardware (responding to interrupts, reading and writing device memory etc.) or go through a DOS [[device driver]]. As DOS was not multitasking, each application would have exclusive and complete control over the hardware while running. Though [[Microsoft Windows|Windows]] applications don't often communicate directly with hardware, it was the only way for Windows drivers; and still is in the real and standard modes of Windows 3.x.
Prior to the advent of Windows, [[DOS]] applications would either communicate directly with the various pieces of hardware (responding to interrupts, reading and writing device memory etc.) or go through a DOS [[device driver]]. As DOS was not multitasking, each application would have exclusive and complete control over the hardware while running. Though [[Microsoft Windows|Windows]] applications don't often communicate directly with hardware, it was the only way for Windows drivers; and still is in the real and standard modes of Windows 3.x.


Windows/386 and onward allowed multiple DOS applications to execute concurrently by executing each within its own [[virtual DOS machine|virtual machine]]. To share physical resources among these virtual machines, Microsoft introduced virtual device drivers. These drivers solved issues relating to conflicting usage of physical resources by intercepting calls to the hardware. Instead of a [[Computer port (software)|machine port]] representing an actual device, it would represent a "virtual" device, which could be managed by the operating system.
[[Windows/386]] and onward allowed multiple DOS applications to execute concurrently by executing each within its own [[virtual DOS machine|virtual machine]]. To share physical resources among these virtual machines, Microsoft introduced virtual device drivers. These drivers solved issues relating to conflicting usage of physical resources by intercepting calls to the hardware. Instead of a [[Input/output#Port-mapped I/O|machine port]] representing an actual device, it would represent a "virtual" device, which could be managed by the operating system.

Under [[Windows 9x]], the VxD is a [[Linear Executable]] format file.


== Obsolescence ==
== Obsolescence ==
Although Windows 98 introduced the [[Windows Driver Model]] (WDM), VxD device drivers can be used under Windows 98 and Windows Me. VxDs are not usable in [[Windows NT]] or its descendants. Starting with Windows 2000, Windows NT-based operating systems also use the Windows Driver Model, while Windows NT 4 and earlier versions must use drivers written specifically for them. Using VxD drivers instead of WDM drivers in Windows 9x resulted in advanced [[Advanced Configuration and Power Interface|ACPI]] states like [[Hibernation (computing)|hibernation]] being unavailable.
Although Windows 98 introduced the [[Windows Driver Model]] (WDM), VxD device drivers can be used under Windows 98 and Windows Me. Using VxD drivers instead of WDM drivers in Windows 9x may result in advanced [[Advanced Configuration and Power Interface|ACPI]] states like [[Hibernation (computing)|hibernation]] being unavailable.

VxDs are not usable in [[Windows NT]] or its descendants. Windows NT-based operating systems from [[Windows NT 3.1|3.1]] to [[Windows NT 4.0|4.0]] must use drivers written specifically for them. These drivers are otherwise known as the [[Windows NT#Major features|Windows NT Driver Model]]. Starting with [[Windows 2000]], Windows NT-based operating systems have adopted the Windows Driver Model from Windows 98.


VxDs should not be confused with the similarly named [[NTVDM]]-specific 'VDDs' (Virtual Device Drivers), which provide a method of emulating direct I/O under a Windows NT "DOS Box". NTVDM VDDs run as regular, 32-bit, user-mode DLLs, and must rely on the Win32 API (or another WDM driver) to emulate the desired I/O on behalf of the 16-bit program.
VxDs should not be confused with the similarly named [[NTVDM]]-specific 'VDDs' (Virtual Device Drivers), which provide a method of emulating direct I/O under a Windows NT "DOS Box". NTVDM VDDs run as regular, 32-bit, user-mode DLLs, and must rely on the Win32 API (or another WDM driver) to emulate the desired I/O on behalf of the 16-bit program.
Line 23: Line 26:
* [[Architecture of Windows 9x]]
* [[Architecture of Windows 9x]]


==References ==
== References ==
{{reflist|refs=
<references/>
<ref name="Paul_1997_NWDOSTIP">{{cite book |title=NWDOS-TIPs &mdash; Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds |series=MPDOSTIP, Release 157 |author-first=Matthias R. |author-last=Paul |date=1997-07-30 |edition=3rd|language=de |url=http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |access-date=2014-09-06 |url-status=live |archive-url=https://web.archive.org/web/20170910194752/http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm |archive-date=2017-09-10}} (NB. NWDOSTIP.TXT is a comprehensive work on [[Novell DOS 7]] and [[OpenDOS 7.01]], including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)</ref>
}}


== Further reading ==
== Further reading ==
* {{cite book |title=Unauthorized Windows 95 - Developer's Resource Kit |author-last=Schulman |author-first=Andrew |date=November 1994 |publisher=[[John Wiley & Sons, Inc.]] |edition=1st |location=Foster City, California, USA |isbn=1-56884-305-4 <!--|ISBN=978-1-56884-305-6 -->}}
* {{cite book |title=Unauthorized Windows 95 - Developer's Resource Kit |author-last=Schulman |author-first=Andrew |date=November 1994 |publisher=[[John Wiley & Sons, Inc.]] |edition=1st|location=Foster City, California, USA |isbn=1-56884-305-4 |url=https://archive.org/details/unauthorizedwind00schu }}
*{{cite book |title=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 |author-first1=Andrew |author-last1=Schulman |author-first2=Ralf |author-last2=Brown |author-link2=Ralf Brown |author-first3=David |author-last3=Maxey |author-first4=Raymond J. |author-last4=Michels |author-first5=Jim |author-last5=Kyle |edition=2nd |date=1994<!-- 1993? --> |publisher=[[Addison Wesley]] |location=[[Reading, Massachusetts]] |isbn=0-201-63287-X <!--|ISBN=978-0-201-63287-3 -->}}
* {{cite book |author-first1=Andrew |author-last1=Schulman |author-first2=Ralf D. |author-last2=Brown |author-link2=Ralf D. Brown |author-first3=David |author-last3=Maxey |author-first4=Raymond J. |author-last4=Michels |author-first5=Jim |author-last5=Kyle |title=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 |publisher=[[Addison Wesley]] |edition=2nd|date=1994 |orig-year=November 1993<!-- first printing --> |isbn=0-201-63287-X |location=Reading, Massachusetts |url=https://archive.org/details/undocumenteddosp00andr_0 }} (xviii+856+vi pages, 3.5"-floppy) Errata: [https://web.archive.org/web/20190417215556/http://www.cs.cmu.edu/afs/cs/user/ralf/pub/books/UndocumentedDOS/errata.ud2][https://web.archive.org/web/20190417212906/https://www.pcjs.org/pubs/pc/programming/Undocumented_DOS/#errata-2nd-edition]
* {{cite book |title=Programmer's Guide to Microsoft Windows 95: Key Topics on Programming for Windows from the Microsoft Windows Development Team |work=Technical Reference |author=<!-- staff writers --> |publisher=[[Microsoft Press]] |edition=1st |date=1995-07-01 |isbn=1-55615-834-3 <!--|ISBN=978-1-55615-834-6 --> |location=Redmond, Washington, USA |url=https://books.google.com/books/about/Programmer_s_Guide_to_Microsoft_Windows.html?id=MLZQAAAAMAAJ |access-date=2016-05-26}}
* {{cite book |title=Programmer's Guide to Microsoft Windows 95: Key Topics on Programming for Windows from the Microsoft Windows Development Team |series=Technical Reference |author=<!-- staff writers --> |publisher=[[Microsoft Press]] |edition=1st|date=1995-07-01 |isbn=1-55615-834-3 <!--|ISBN=978-1-55615-834-6 --> |location=Redmond, Washington, USA |url=https://books.google.com/books?id=MLZQAAAAMAAJ |access-date=2016-05-26}}
* {{cite book |title=Systems Programming for Windows 95 |author-first=Walter |author-last=Oney |publisher=[[Microsoft Press]] |edition=1st |date=1995 |isbn=1-55615-949-8 <!--|ISBN=978-1-55615-949-7 --> |location=Redmond, Washington, USA}}
* {{cite book |title=Systems Programming for Windows 95 |author-first=Walter |author-last=Oney |publisher=[[Microsoft Press]] |edition=1st|date=1995 |isbn=1-55615-949-8 |location=Redmond, Washington, USA |url=https://archive.org/details/systemsprogrammi00oney }}
* {{cite book |title=Windows 95 System Programming Secrets |author-last=Pietrek |author-first=Matt |author-link=Matt Pietrek |date=November 1995 |publisher=[[John Wiley & Sons, Inc.]] |work=The Secrets Series |edition=1st |isbn=1-56884-318-6 |ISBN=978-156884-318-6 |url=https://books.google.com/books/about/Windows_95_System_Programming_Secrets.html?id=E9Q7KAAACAAJ |access-date=2016-05-26}}
* {{cite book |title=Windows 95 System Programming Secrets |author-last=Pietrek |author-first=Matt |author-link=Matt Pietrek |date=November 1995 |publisher=[[John Wiley & Sons, Inc.]] |series=The Secrets Series |edition=1st|isbn=1-56884-318-6 |url=https://books.google.com/books?id=E9Q7KAAACAAJ |access-date=2016-05-26}}
* {{cite book |title=Writing Windows VxDs and Device Drivers - Programming Secrets for Virtual Device Drivers |author-first=Karen |author-last=Hazzah |publisher=[[Miller Freeman, Inc.]] |location=Lawrence, Kansas, USA |edition=2nd printing, 2nd |date=1997 |isbn=0-87930-438-3 |ISBN=978-0-87930-438-6}}
* {{cite book |title=Writing Windows VxDs and Device Drivers - Programming Secrets for Virtual Device Drivers |author-first=Karen |author-last=Hazzah |publisher=[[Miller Freeman, Inc.]] |location=Lawrence, Kansas, USA |edition=2nd printing, 2nd |date=1997 |isbn=0-87930-438-3 }}


{{Microsoft APIs}}
{{Microsoft APIs}}

Revision as of 14:41, 19 July 2024

VxD is the device driver model used in Microsoft Windows/386 2.x, the 386 enhanced mode of Windows 3.x, Windows 9x, and to some extent also by the Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 (and higher) multitasker (TASKMGR).[1] VxDs have access to the memory of the kernel and all running processes, as well as raw access to the hardware. Starting with Windows 98, Windows Driver Model was the recommended driver model to write drivers for, with the VxD driver model still being supported for backward compatibility, until Windows Me.

Name and design

The name "VxD" is an abbreviation for "virtual xxx driver", where "xxx" is some class of hardware device. It derives from the fact that most drivers had filenames of the form vxxxd.386 in Windows 3.x. Some examples are vjoyd.386 (joystick) and vmm.386 (memory manager). VxDs under Windows 3.x usually have the filename extension .386, while those under Windows 9x have .vxd. VxDs written for Windows 3.x can be used under Windows 9x but not vice versa.

History

Prior to the advent of Windows, DOS applications would either communicate directly with the various pieces of hardware (responding to interrupts, reading and writing device memory etc.) or go through a DOS device driver. As DOS was not multitasking, each application would have exclusive and complete control over the hardware while running. Though Windows applications don't often communicate directly with hardware, it was the only way for Windows drivers; and still is in the real and standard modes of Windows 3.x.

Windows/386 and onward allowed multiple DOS applications to execute concurrently by executing each within its own virtual machine. To share physical resources among these virtual machines, Microsoft introduced virtual device drivers. These drivers solved issues relating to conflicting usage of physical resources by intercepting calls to the hardware. Instead of a machine port representing an actual device, it would represent a "virtual" device, which could be managed by the operating system.

Under Windows 9x, the VxD is a Linear Executable format file.

Obsolescence

Although Windows 98 introduced the Windows Driver Model (WDM), VxD device drivers can be used under Windows 98 and Windows Me. Using VxD drivers instead of WDM drivers in Windows 9x may result in advanced ACPI states like hibernation being unavailable.

VxDs are not usable in Windows NT or its descendants. Windows NT-based operating systems from 3.1 to 4.0 must use drivers written specifically for them. These drivers are otherwise known as the Windows NT Driver Model. Starting with Windows 2000, Windows NT-based operating systems have adopted the Windows Driver Model from Windows 98.

VxDs should not be confused with the similarly named NTVDM-specific 'VDDs' (Virtual Device Drivers), which provide a method of emulating direct I/O under a Windows NT "DOS Box". NTVDM VDDs run as regular, 32-bit, user-mode DLLs, and must rely on the Win32 API (or another WDM driver) to emulate the desired I/O on behalf of the 16-bit program.

See also

References

  1. ^ Paul, Matthias R. (1997-07-30). NWDOS-TIPs — Tips & Tricks rund um Novell DOS 7, mit Blick auf undokumentierte Details, Bugs und Workarounds. MPDOSTIP, Release 157 (in German) (3rd ed.). Archived from the original on 2017-09-10. Retrieved 2014-09-06. (NB. NWDOSTIP.TXT is a comprehensive work on Novell DOS 7 and OpenDOS 7.01, including the description of many undocumented features and internals. It is part of the author's yet larger MPDOSTIP.ZIP collection maintained up to 2001 and distributed on many sites at the time. The provided link points to a HTML-converted older version of the NWDOSTIP.TXT file.)

Further reading