VXD and WDM Drivers

RolyL

Senior member
Jul 14, 2001
258
0
0
Basically WDM (Windows Driver Model) is newer driver standard, Win 98 / Me / 2000 / XP compatible. VXD is older equivalent, for Win 3.x / 95 / 98.


There are really two kinds of device drivers for Windows 3.x/95. =
Virtual
Device Drivers (VxDs) run as part of the privileged (ring-0) operating
system. VxDs can be thought of as a DLL for the operating system. =
Running
at ring 0, VxDs have complete access to the physical hardware, and can
access data in the address space of any DOS, Windows, or Protected Mode
application. Under Windows 3.x, VxDs are typically given a .386 file
extension, and are loaded when Windows starts. Under Windows 95, VxDs=
are
given the .VXD file extension, and may be loaded at startup time, or
dynamically loaded later.
=20
Windows 95 uses the same basic architecture for VxDs as Windows 3.x. =
Thus,
drivers written for Windows 3.x can be loaded on a Windows 95 system=
and
should generally work fine. However, Windows 95 adds hundreds of new
services for VxDs, and extends the VxD architecture to allow full=
dynamic
loading, pageable code and data, access to the system registry,=
interfaces
to Win32 applications, and many other features. VxDs written for=
Windows
95 cannot be loaded on a Windows 3.x system.
=20
In addition to VxDs, Windows 3.x/95 supports non-privileged (ring-3)
Communication and Printer drivers. These are typically given .DRV file
extensions.
=20
Windows NT uses a new driver architecture, called "Kernel Mode=
Drivers".
Refer to the Windows NT DDK for detailed information. VxDs are not
compatible with Windows NT.
=20
In order to provide compatibility between Windows NT and Windows=
95/3.x,
Microsoft provides "Miniport Drivers" for certain kinds of devices.
Miniports allow driver developers to write a single driver using a pre-
defined interface that is provided on both Windows NT and Windows=
95/3.x.
Microsoft provides Miniport drivers for SCSI, Printer, and Display=
devices.

What is Windows Driver Model (WDM)?
WDM, or Win32 Driver Model, was announced with much fanfare at the=
Windows
Hardware Engineering Conference (WinHEC) in March, 1996. WDM is a=
standard
API for device driver development under Windows that will be supported
across Windows 98 and Windows NT platforms. WDM will be based on the
Windows NT driver model, with additions to support Plug and Play.=
Although
the definition has not been released, Microsoft has said that a future
release of Windows 95 will support a subset of the Windows NT device=
driver
services and architecture.
=20
Microsoft will initially support new buses (such as USB and P1394) with=
WDM
=93class drivers=94. Support for sound and input devices is also=
planned
=93sooner rather than later.=94 No specific commitment has been made=
regarding
other classes of devices.
=20
It appears that VxDs will continue to be required for many classes of
drivers (for example, file system drivers for Windows 98) for the
indefinite future.

What is a VxD?
"VxD" stands for Virtual "something" Device, where 'x' stands for
"something". Microsoft often names drivers according to this=
convention,
thus "VKD" is the Virtual Keyboard Device, and "VPICD" is the Virtual
Programmable Interrupt Device. VxDs are loaded into the protected=
(ring-0)
operating system address space, and have full access to the system
hardware. VxDs can modify page tables directly, install true hardware
interrupt handlers, and generally wreak unrestricted havoc on the=
system.
Of course, just because you *can* doesn=92t suggest that you *should*.
=20
VxDs can be used to virtualize physical hardware by intercepting
application requests to use the hardware and arbitrating between=
requests
from different applications. In the more extreme case, VxDs can provide=
a
"virtual" device that is not actually present at all, by emulating the
behavior of a hardware device. VxDs, by virtue of their privileged=
access
to the system, can also be used to implement software monitors,=
debuggers,
and to modify the behavior of other software on the system.
=20
VxDs under Windows 95 are also used to implement many other components=
of
the operating system, including the protected mode file system (IOS and
IFS), the Virtual Communication Architecture (VCOMM), plug and play
(Configuration Manager, etc.), and network transport and protocol=
drivers
(NDIS).