Windows Driver Model

November 12th, 2009 No comments

In computing, the Windows Driver Model (WDM) — also known at one point as the Win32 Driver Model — is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1, as well as the Windows NT Driver Model.

Overview

WDM drivers are layered in a complex hierarchy and communicate with each other via I/O request packets (IRPs). The Microsoft Windows Driver Model defined a unified driver model for the Windows 98 and Windows 2000 lines by standardizing requirements and reducing the amount of code that needed to be written. WDM drivers will not run on operating systems earlier than Windows 98 or Windows 2000, such as Windows 95, Windows NT 4.0 and Windows 3.1. By conforming to WDM, drivers can be binary compatible and source-compatible across Windows 98, Windows 98 Second Edition, Windows Me, Windows 2000, Windows XP, Windows Server 2003 and Windows Vista (for backwards compatibility) on x86-based computers. WDM drivers are designed to be forward-compatible so that a WDM driver can run on a version of Windows newer than what the driver was initially written for, but doing that would mean that the driver cannot take advantage of any new features introduced with the new version. WDM is generally not backward-compatible, that is, a WDM driver is not guaranteed to run on any older version of Windows. For example, Windows XP can use a driver written for Windows 2000 but will not make use of any of the new WDM features that were introduced in Windows XP. However, a driver written for Windows XP may or may not load on Windows 2000.

WDM exists in the intermediary layer of Windows 2000 kernel-mode drivers and was introduced to increase the functionality and ease of writing drivers for Windows. Although WDM was mainly designed to be binary and source compatible between Windows 98 and Windows 2000, this may not always be desired and so specific drivers can be developed for either operating system. WDM drivers can be classified into the following types and sub-types:

A function driver is the main driver for a device. A function driver is typically written by the device vendor and is required (unless the device is being used in raw mode). A function driver can service one or more devices.

* Class drivers: These are a type of function drivers and can be thought of as built-in framework drivers that miniport and other class drivers can be built on top of. The class drivers provide interfaces between different levels of the WDM architecture. Common functionality between different classes of drivers can be written into the class driver and used by other class and miniport drivers. The lower edge of the class driver will have its interface exposed to the miniport driver, while the upper edge of top level class drivers is operating system specific. Class drivers can be dynamically loaded and unloaded at will. They can do class specific functions that are not hardware or bus-specific (with the exception of bus-type class drivers) and in fact sometimes only do class specific functions like enumeration.
* Miniport drivers: These are also function drivers for USB, Audio, SCSI and network adapters. They should usually be source and binary compatible between Windows 98 and Windows 2000 and are hardware specific but control access to the hardware through a specific bus class driver.

A bus driver services a bus controller, adapter, or bridge. Microsoft provides bus drivers for most common buses, such as PCI, PnPISA, SCSI, USB and FireWire. Each software vendor can create their own bus drivers if needed. A bus driver can service more than one bus if there is more than one bus of the same type on the machine.

Filter drivers are optional drivers that add value to or modify the behavior of a device and may be non-device drivers. A filter driver can also service one or more devices. Upper level filter drivers sit above the primary driver for the device (the function driver), while lower level filter drivers sit below the function driver and above the bus driver.

* Driver service: This is a type of kernel-level filter driver implemented as a Windows service that enables applications to work with devices.

Windows 98 based operating systems (Windows 98, Windows 98 Second Edition, and Windows Me) are able to use both WDM and VxD (Virtual device driver) driver standards. Both drivers models can provide unique and different features for the same hardware. However, usually the newer WDM standard provides more features. For example, if a TV tuner card using a VxD driver is able to capture images at a resolution of 384 x 288 pixels, the same TV Tuner card with the WDM driver model may be able to capture at a resolution of 768 x 576 pixels. This can be attributed to the new Broadcast Driver Architecture model which is part of WDM.

The Windows Driver Model, while a significant improvement over the VxD and Windows NT driver model used before it, has been criticised by driver software developers [1], most significantly for the following:

* WDM has a very steep learning curve.
* Interactions with power management events and Plug-and-play are difficult. This leads to a variety of situations where Windows machines cannot go to sleep or wake up correctly due to bugs in driver code.
* I/O cancellation is almost impossible to get right.
* Thousands of lines of support code are required for every driver.
* No support for writing pure user-mode drivers.

There were also a number of concerns about the quality of documentation and samples that Microsoft provided.

Because of these issues, Microsoft has released a new framework to replace WDM, called the Windows Driver Foundation, which includes Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF). Windows Vista supports both WDM and the newer Windows Driver Foundation. KMDF is also available for download for Windows XP and even Windows 2000, while UMDF is available for Windows XP.

What’s Device Driver

November 12th, 2009 No comments

In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device.

A driver typically communicates with the device through the computer bus or communications subsystem to which the hardware connects. When a calling program invokes a routine in the driver, the driver issues commands to the device. Once the device sends data back to the driver, the driver may invoke routines in the original calling program. Drivers are hardware-dependent and operating-system-specific. They usually provide the interrupt handling required for any necessary asynchronous time-dependent hardware interface.

Purpose

A device driver simplifies programming by acting as a translator between a hardware device and the applications or operating systems that use it. Programmers can write the higher-level application code independently of whatever specific hardware device it will ultimately control, because code and device can interface in a standard way, regardless of the software superstructure or of underlying hardware. Every version of a device, such as a printer, requires its own hardware-specific specialized commands. In contrast, most applications utilize devices (such as a file to a printer) by means of high-level device-generic commands such as PRINTLN (print a line). The device-driver accepts these generic high-level commands and breaks them into a series of low-level device-specific commands as required by the device being driven. Furthermore, drivers can provide a level of security as they can run in kernel-mode, thereby protecting the operating system from applications running in user-mode.

Device drivers can be abstracted into logical and physical layers. Logical layers process data for a class of devices such as Ethernet ports or disk drives. Physical layers communicate with specific device instances. For example, a serial port needs to handle standard communication protocols such as XON/XOFF that are common for all serial port hardware. This would be managed by a serial port logical layer. However, the logical layer needs to communicate with a particular serial port chip. 16550 UART hardware differs from PL-011. The physical layer addresses these chip-specific variations. Conventionally, OS requests go to the logical layer first. In turn, the logical layer calls upon the physical layer to implement OS requests in terms understandable by the hardware. Inversely, when a hardware device needs to respond to the OS, it uses the physical layer to speak to the logical layer.

In Linux environments, programmers can build device drivers either as parts of the kernel or separately as loadable modules. Makedev includes a list of the devices in Linux: ttyS (terminal), lp (parallel port), hd (disk), loop (loopback disk device), sound (these include mixer, sequencer, dsp, and audio)… [1]

The Microsoft Windows .sys files and Linux .ko modules contain loadable device drivers. The advantage of loadable device drivers is that they can be loaded only when necessary and then unloaded, thus saving kernel memory.

Writing a device driver requires an in-depth understanding of how the hardware and the software of a given platform function. Drivers operate in a highly privileged environment and can cause disaster if they get things wrong.[2] In contrast, most user-level software on modern operating systems can be stopped without greatly affecting the rest of the system. Even drivers executing in user mode can crash a system if the device is erroneously programmed. These factors make it more difficult and dangerous to diagnose problems.

Thus the task of writing drivers usually falls to software engineers who work for hardware-development companies. This is because they have better information than most outsiders about the design of their hardware. Moreover, it was traditionally considered in the hardware manufacturer’s interest to guarantee that their clients can use their hardware in an optimum way. Typically, the logical device driver (LDD) is written by the operating system vendor, while the physical device driver (PDD) is implemented by the device vendor. But in recent years non-vendors have written numerous device drivers, mainly for use with free and open source operating systems. In such cases, it is important that the hardware manufacturer provides information on how the device communicates. Although this information can instead be learned by reverse engineering, this is much more difficult with hardware than it is with software.

Microsoft has attempted to reduce system instability due to poorly written device drivers by creating a new framework for driver development, called Windows Driver Foundation (WDF). This includes User-Mode Driver Framework (UMDF) that encourages development of certain types of drivers — primarily those that implement a message-based protocol for communicating with their devices — as user mode drivers. If such drivers malfunction, they do not cause system instability. The Kernel-Mode Driver Framework (KMDF) model continues to allow development of kernel-mode device drivers, but attempts to provide standard implementations of functions that are well known to cause problems, including cancellation of I/O operations, power management, and plug and play device support.

Apple has an open-source framework for developing drivers on Mac OS X called the I/O Kit.
Kernel-mode vs user-mode

Device drivers, particularly on modern[update] Windows platforms, can run in kernel-mode (Ring 0) or in user-mode (Ring 3).[3] The primary benefit of running a driver in user mode is improved stability, since a poorly written user mode device driver cannot crash the system by overwriting kernel memory.[4] On the other hand, user/kernel-mode transitions usually impose a considerable performance overhead, thereby prohibiting user mode-drivers for low latency and high throughput requirements.

Printer drivers

November 12th, 2009 No comments

In computers, a printer driver or a print processor is a piece of software that converts the data to be printed to the form specific to a printer. The purpose of printer drivers is to allow applications to do printing without being aware of the technical details of each printer model.

Printer drivers should not be confused with print spoolers, that queue print jobs and send them to printer one after the other.

Printer drivers in different operating systems

On UNIX systems and other systems which use the Common Unix Printing System, such as Mac OS X, printer drivers are typically implemented as filters. They are usually named the front end of the printing system, while the printer spoolers constitute the back end.

Backends are also used to determinate the available devices. On startup, each backend is asked for a list of devices it supports, and any information that is available.

On MS-DOS, there have been no system-wide printer drivers; each application was shipped with its own printer drivers, which were essentially descriptions of printer commands. Printers, too, have been supplied with drivers for the most popular applications. In addition, applications included tools for editing printer description, in case there was no ready driver. In the days when DOS was widely used, many printers had emulation modes for Epson FX80[1] and IBM Proprinter commands. It appears that these also worked with Windows 3.0[2].

On Microsoft Windows systems, printer drivers make use of GDI (Unidrv or PScript-based) or XPS (XPSDrv). Programs then use the same standard APIs to draw text and pictures both on screen and on paper. Printers which use GDI natively are commonly referred to as Winprinters and are considered incompatible with other operating systems.

Win32 APIs also allow applications to send data directly to the spooler, bypassing the printer driver; however, few applications actually use this option.

The original AmigaOS up to 1.3 supported printers through a standard series of drivers stored at the required path “Sys:Devs/Printers”. All printer drivers were stored in that directory, and covered the standard printers in 1985-1989 circa, included EpsonFX standard driver, XEROX 4020, HP, etcetera.

Any Amiga printer driver had to communicate though the standard Amiga Printer. Device (the default standard hardware device of Amiga dealing with printers), and the standard Parallel. Device (which controlled parallel port) and the driver would then control the printer on its own.

Amiga printers were an innovation for their time. The had the ability to print up to 4096 colors.

Through the use of the Printer Preferences program printers could be connected to the serial port as well.

Amiga also had support for a virtual device “PTR:” to refer to printer.device so, for example the command “COPY file TO PRT:” caused the file to be printed directly bypassing Parallel. Device and the default Printer Driver. Amiga used a standard ANSI “Esc sequences” list of ESC (Escape) Commands, not the special ones defined by the various printer manufacturers. This way every application on the Amiga could use the same standard set of control sequences and wouldn’t need to know which printer is actually connected. The printer driver then translated these standard sequences into the special sequences a certain printer understands.

Amiga internal function “PWrite” of Printer. Device writes ‘length’ bytes directly to the printer. This function is generally called on by printer drivers to send their buffer(s) to the printer. Number of buffers are decided by the persons who created the driver. Amiga lacked a standard Printer Spooler.

Since AmigaOS 2.0 a standard Printer. Device was changed to control various printers at same time. The Printer preferences were divided in three main panels: Prefs:Printer which selects main printer and other basic elements such as “Print Spacing” and “Paper Size”. PrinterGFX controlled features like Dithering and Scaling. PrinterPS controlled Postscript Printers. The printer drivers surprisingly remained almost same of Workbench 1.3, with 4096 limits.

This fact led Amiga users to prefer third party Printer Systems with their own drivers, like TurboPrint and PrintStudio, which introduced not only recent drivers, but also featured a functioning Printer Spooler into Amiga, and featured 16 millions colors printing. MorphOS Amiga clone Operating System uses a special version of TurboPrint to pilot recent printers.

Many Amiga programs like DTP programs as PageStream featured in the past its own printer drivers.

USB printers are automatically recognized by the Amiga USB Stack, which is called Poseidon. This stack is capable of detecting any USB device by its class, but printers still require a driver to be controlled.

Usually the operating system needs to know the characteristics of a printer. The PPD files are the normal way to supply this information. They have the advantage of being system independent, and there is a freely available large database of them, Foomatic.

HP Says Some Windows 7 Printer Drivers Are Coming

November 12th, 2009 No comments

Windows 7 users may find there are no drivers yet for their Hewlett-Packard printer, although the company said it expects to release some new compatible drivers soon.

HP is recommending that some of its newer products should be used with Windows 7, which was released on Oct. 22. Unfortunately, for some people that will mean buying a new printer.

“Older products may have limited driver support, limited features or both,” according to a page on HP’s Web site that provides a list of products that either do have drivers available or will soon. “If your legacy product is not listed, no support is offered for Windows 7.”

Users have been griping on HP forums about the driver situation for months. In some cases, HP is not developing drivers for products that did have drivers for Windows Vista, Windows 7’s predecessor.

“According to HP’s compatibility lists, there will be no support for HP Laserjet Color 3600n under Windows 7,” wrote user FastasFlash200 in September. “Is this really true and if so, for heaven’s sake why? We bought this device not so long ago for our small business office and waited desperately for upgrading computers and devices to Windows 7, but it seems HP won’t support this.”

Another user wrote that his LaserJet 3600 has a manufacture date of June 2008. “I’m going to make a big stink to everyone,” wrote MorePissedOff in all capital letters early last month.

The delay with the drivers HP is building “really has to do with making sure that all the drivers work smoothly for the customers who make the Windows 7 change,” according to an e-mail response from a spokeswoman on behalf of the company. “HP worked with Microsoft to make sure that the majority of current/recently launched products supported Windows 7 at launch and continues to work with them to ensure the smooth transition moving forward. ”

HP isn’t saying which of the absent drivers may be released first. The best advice is for consumers is to click through to the actual product page and see if one is available. At least some of the drivers should be available within a couple of weeks if not sooner, the spokeswoman said.

Installing laptop drivers without a usb or lan without the driver disc?

November 12th, 2009 No comments

After some problems on my laptop i formatted it, i have re-installed windows xp proffesional it all seems to be working fine. But i am missing some key drivers namely the USB driver and the LAN driver. Now i don’t have the cd to install these drivers and i can’t connect to the internet to get them or transfer them from a usb stick.

Download from another computer (say a friend’s or public library, etc) and save to CD. Then install on your laotop.

Is it okay to install drivers for a new graphics card without uninstalling the old drivers first?

November 12th, 2009 No comments
I forgot to uninstall the drivers for my old graphics card and overwrote them with the new drivers. Are there any issues that might result from this?
If your graphics card is based on an nVidia chip, then you can go ahead and just run the new driver when you download it. If it’s based on a Radeon chip, then uninstall the drivers first, which is a pain in the rear. I quit using Radeon/ATI products years ago for just that reason, no end of driver problems even when you did an uninstall. Since AMD bought them out it may have improved.

How do i find drivers for xp on a vista computer?

November 12th, 2009 No comments
I recently purchased a toshiba A135-S4407. This pc has vista already installed and i am going to install xp, but i know that i need the drivers before i install the old os. The toshiba site only has drivers for vista and not for xp. I need help to find these drivers, i have tried finding them individually to no avail. Thanks in advance for any advice/help.
I just did the same thing with an HP notebook. The problem you may run into, as I did, is that they may not have written drivers for your notebook components for XP yet. You’re best bet is to call technical support and have then give you the links to the individual drivers if they exist. You can also try letting Windows search for the drivers online once you get your NIC up and running, but that didn’t help me at all. Many people are doing what you’re doing, buying PCs and downgrading to XP, so the demand for drivers is out there, you just have to give it some time if you can’t find anything. All told, it took me 4 days and 17 chat sessions with tech support before I had all my drivers, though HP’s cool autoplay DVD feature still doesn’t work on my notebook. Good luck.

What drivers should be installed to make a sound card work?

November 12th, 2009 No comments

Before you give the gut reaction, the driver for the sound card, let me explain that I know this. I have two used desktops and one used laptop I’ve repaired, exchanging some parts. The desktops are 98 and the laptop is ME. I’ve identified the sound card, downloaded the appropriate driver and istalled it. The problem? While the computers think everything is OK, all 3 do not produce sound. If it were one, I’d call it a bad sound card, but not all three. When I look on my XP computer, there is a whole bunch of items in addition to the sound card driver listed under sound devices in the device manager. Are there other software drivers that need to be installed in addition to the actual sound card driver?

is there any error on those bunch of items? if there is none then try to check volume control. if there is then you might have installed the wrong driver. normally just a driver is enough for the sound card to work. try to look at the sound card’s chip and search the driver online

Driver links by manufacturer

November 12th, 2009 No comments

Acer Drivers

Asus Drivers

Dell Drivers

Driver Sweeper

Fujitsu Drivers

Gateway Drivers

Gigabyte Drivers

HP Drivers

IBM Drivers

Intel Drivers

Java Update

MSI Drivers

nVidia Motherboard Drivers:

nVidia Video Card Drivers

Sony Vaio

Soyo Drivers

Toshiba Drivers

Western Digital Drivers

Miscellaneous
http://www.indexoftheweb.com/Computer/Computer_Tech.htm

Please feel free to add any more Driver Manufacturers and links

It should also be noted that TechSpot provide an excellent Device Drivers section, broken up into Hardware category

Microsoft Hardware and software vendor contact information
http://support.microsoft.com/gp/vendors/en-us
http://support.microsoft.com/gp/oemphone

AMD ATI:

http://ati.amd.com/support/driver.html

MSI Drivers

How to identify your webcam

November 12th, 2009 No comments

Even if you’ve lost your web cam’s installation CD, all the product info, and have no clue “who the heck” even manufactured it you can still identify it! Actually, to phrase it more accurately, “you can simply let Windows identify it”!!!

Windows doesn’t require a device driver to detect device hardware or determine its Device Identification strings

Windows Device Identification strings may look cryptic (for example, USB\VID_093A&PID_2468\5&B114931&0&1) but these strings are fundamental to Windows Plug-and-Play and how Windows figures out which drivers work with what devices in the first place!

This guide
=> Will work for both XP and Vista based systems
=> Assumes your web cam connects via USB. If other then USB, the steps are still similar but the detail will be different

1. Connect your web cam

* Attach all power cords (e.g. laptop and/or web cam).
* Plug your USB cam directly into your computer (do not use any external USB hubs). Turn your cam on
* As long as your web cam and computer hardware are working, Windows should detect it!

2. Open Device Manager

* For Vista
=> Click Control Panel
. If you have Control Panel Classic View, click Device Manager
=> Click Control Panel. If you have Control Panel Home View, click System and Maintenance->Device Manager
* For XP
=> Click Control Panel->System, then Hardware tab, then Device Manager button

3. Find your web cam in Device Manager

* Understanding Device Names
=> Windows provides user-friendly device names to accomodate us humans. As far as Windows is concerned, the device name is simply a comment!
=> It’s those cryptic Device Identification strings that really identify a device
=> Device Manager displays whatever device name it happens to find in the device driver
…==> If Windows finds NO device driver, your web cam may be named “Unknown” or “Other” device
…==> If Windows finds the WRONG device driver you may see your web cam with the WRONG device name
* How to find your web cam
=> While your web cam is connected, look through all of Device Manager for devices with a yellow icon (probably a yellow question mark)
=> Be certain to expand the USB category to check all devices listed under it. Also, be sure to also check if category Other Devices appears in Device Manager and look under it as well
=> Your web cam will appear as a device with a yellow icon (probably a question mark)
=> Click on thumbnail to see the full sized image
* How to verify the device you found is your web cam
=> Your web cam device will only appear in Device Manager when the web cam is powered on and connected
=> Disconnect your web cam. Verify the device you had found is no longer displayed in Device Manager

4. Find your web cam’s Hardware Ids

* In Device Manager, select your web cam device, rt click Properties. Click Details tab
* Select Hardware Ids from the pull-down. You’ll see a list of one or more Hardware Id strings

5. Search for a driver based on Hardware Id
The best driver will match the Hardware Id at the top of the list. The next best driver match will match the next Hardware Id on the list, etc

* Start by searching for the Id at the top of the Hardware Id list
* If only due to how different search engines work, recommend you cut USB\ from the search string
=> Example: If the Hardware Id is USB\VID_093A&PID_2468&REV_0001 search for VID_093A&PID_2468&REV_0001
* You can start by clicking Search at the top of your TechSpot window to search TechSpot first
* For more help on how to search for a driver using the webcam’s Hardware IDs see this post

Two final notes:

1) If you should find your driver elsewhere please update our “CIF Single Chip driver for webcam” thread and post your Hardware Id and the matching driver file info so others might also benefit on their next Search

2) as fyi…Vista let’s you easily copy/paste your Hardware Ids. XP does not. However, you can use a handy tool called SysExporter – To grab text data from a window when Windows doesn’t let you