Home
Products
Support
Order
Press

DFC for Windows 95

See the DFC Information page for general information on DFC components and features. This topic covers details particular to Windows 95/98.

VxD architecture today...
The DFC library is the only driver library that supports creating both an NT .SYS module and a Windows 9x VxD module from common source. The DFC library implements partial emulation of the Windows NT I/O manager and provides NT driver mechanisms for VxD developers.

...WDM tomorrow
Microsoft has announced that they will support a common driver model for both Windows and Windows NT called the Win32 Driver Model (see http://www.microsoft.com/hwdev for more details). WDM is currently shipping in a limited form with OEM systems but will not be widely available until the release of the next major Windows update. The DFC library will continue to support the VxD architecture allowing you to support both the new and older versions of Windows from one source base.

I/O Request Packets (IRPs) and Asynchronous I/O
The heart of DFC for Windows 95 is its emulation of the NT I/O manager and handling of I/O request packets or IRPs. When the DFC library catches CreateFile, DeviceIoControl, and CloseHandle requests from applications, the library allocates IRP structures from an IRP cache. The library then sets up and passes the allocated IRP to the dispatch member function of a user's device class in a manner similar to what the user sees on NT.

As on NT, a dispatch member function can mark a request pending and release the calling thread while the VxD processes the request. At a later time, a VxD can complete the request and the DFC library will signal the calling thread.

The DFC library handles the buffers associated with DeviceIoControl calls based on the flags in an IOCTL code. For METHOD_BUFFERED IOCTL requests, the DFC library double-buffers the DeviceIoControl request buffers using a system-space buffer just like the NT I/O manager does. For METHOD_IN/OUT_DIRECT requests, the DFC library page locks the DeviceIoControl output buffer and double-buffers the input buffer-again like on NT.

Cancel and Cleanup Logic
On NT, if a thread issues an asynchronous request to a driver and then exits before the request has been completed, the NT I/O Manager calls a user-defined routine to cancel processing of the request. The DFC library emulates these mechanisms in a Windows 95 VxD. The library links all allocated IRPs in an internal list. When the library catches a Terminate_Thread system control message, it walks the list and cancels any pending IRPs which originated from the dying thread. The DFC library also emulates cleanup logic by catching close handle requests and translating them into calls to the user device's DispatchCleanup member function.

Plug & Play Integration
The DFC library fully supports Plug & Play configuration of legacy and Plug & Play hardware using the Windows 95 Configuration Manager. The library implements the complex handling of Plug & Play system control messages. In these message handlers, the library creates instances of the user's device class and automatically configures the device resources from a Configuration Manager-assigned resource set.

Back to main DFC page...