Windows driver examples

Windows driver examples with free source code related to file systems, virtual disks and network communication from kernel mode. Published by Bo Brantén.
Please send comments, suggestions and corrections to bosse@acc.umu.se.

Mirror sites

http://www.acc.umu.se/~bosse/
http://branten.se/nt/

News

SwapFs-3.0 Support for FAT32 and swap partitions bigger than 4GB.

Ntifs.h-56 Updated so you can compile Matt Wu's ext2fsd with it.

FileDisk-17 Allow to mount images without administrative privileges by Konstantin Vlasov, works better on Windows Vista and Windows 7, support for 64-bit systems.
FileDisk-15-signed Signed by Matt Wu so that it can be loaded on 64-bit versions of Windows without pressing F8 at boot and select "Disable driver signing".

HttpDisk-7 Allow to mount images without administrative privileges by Konstantin Vlasov, works better on Windows Vista and Windows 7, support for 64-bit systems.

Khttpd-2 Simple kernel mode web server for Windows that demonstrates how to do network communication from kernel mode and how to use the MDL interface to the filesystem.

Rfsd-0.25.5 I have updated the unmaintained ReiserFs file system driver. Signed version: Rfsd-0.25.5-signed.

New: Matt Wu has made a new release 0.50 at ext2fsd.com.Ext2fsd-0.48-bb8-signed Support for ext4 extents and fix for BSOD on Windows 7.

If you are interested in network communication from kernel mode on Windows, so called TDI clients, you may want to read my report High performance kernel mode web server for Windows.


Ntifs.h

Release 56 (2008-07-31)
I maintain a free version of the file ntifs.h. It is a collection of information of interrest to people building file system and file system filter drivers for Windows NT, Windows 2000 and Windows XP. The information has been found in books, magazines, on the Internet and received from contributors.
ntifs.h
ntifs.zip
ntifs.html

RomFs

Release 15 (2009-04-19)
I want to provide an example file system driver for Windows NT/2000/XP. For some time I have worked on an implementation of RomFs. RomFs is a small filesystem originally implemented in Linux, because of its simple disk layout its a good choice for an example driver. The current status is a working read-only driver that supports caching of file data, the create functionallity still needs some work but I'm releasing it due to the high public demand. Also included is a file system recognizer for romfs, a file system recognizer is a small driver that loads the real file system driver when it recognizes a file system it can handle on a disk partition or removable media.
romfs-15.zip
Here is a romfs floppy image that you can write to a floppy using RaWriteNT to test the driver.
Screenshot showing the debug prints from the driver when executing the command 'type a:\hello.c' on the floppy image above.

Links to other file system drivers for Windows with free source code

Ext2Fsd by Matt Wu is an ext2 file system driver for Windows NT/2000/XP.
FSDEXT2 by Peter van Sebille is an ext2fs driver for Windows 95/98.
EXT2IFS by John Newbigin is an ext2fs driver for Windows NT.
Ext2 File System Driver for Windows NT 4.0 by Manoj Paul Joseph.
Win2fs by Satish kumar Janarthanan is an Ext2 file system driver for the Microsoft Windows 2000 family of operating systems.
The arla project by Stacken at KTH is a free AFS implementation for many platforms including Windows.
OpenAFS is a free and portable AFS implementation. It contains an native network redirector for Windows that is in beta stage in the repository branch openafs-windows-kdfs-ifs-branch.
Creating User-Mode Device Drivers with a Proxy by Galen C. Hunt.
FIFS A Fremework for Implementing User-Mode File Systems in Windows NT by Danilo Almeida.
FFS File System Driver for Windows by Lee Jae-Hong allows you to get a read access to FreeBSD, NetBSD and OpenBSD FFS partitions.
ReiserDriver is an Installable File System Driver (IFSD) that allows ReiserFS partitions to be accessed under Windows. This driver has been updated by me to fix bugs and support newer versions of Windows.
Dokan is a user mode file system for windows.

SwapFs

Release 3.0 (2010-07-21)
SwapFs-3.0 is a driver for Windows that let you use a Linux swap partition for temporary storage like a RAM-disk. It is possible to put Windows page file on it and it has support for Plug and Play and Power Management so that standby and hibernation works. SwapFs is implemented as a disk filter driver.
Latest news: Support for FAT32 and swap partitions bigger than 4GB.

FileDisk

Release 17 (2009-10-21)
FileDisk is a virtual disk driver for Windows that uses one or more files to emulate physical disks. A console application is included that let you dynamically mount and unmount files. An example of use for this driver is if you have made plans spending the weekend writing an RAID driver for NT but find you are short of disks. FileDisk can also use CD/DVD images.
Latest news: Allow to mount images without administrative privileges, works better on Windows Vista and Windows 7, support for 64-bit systems.
Screenshot of an example of use.
FileDisk will use sparse files as disk images if the underlying file system supports it. A sparse file is a file were suficiently large blocks of zeros isn't allocated disk space. To see how much disk space a file actually uses right click on the file and choose properties. If you for example create a sparse file of 4GB, mounts it in FileDisk and formats it to NTFS, it will only take up 24MB on disk but look like a normal disk of 4GB. When you copy files to it the used disk space will automatically increase.
FileDisk with support for .bin CD-ROM images.

HttpDisk

Release 7 (2009-10-21)
HttpDisk is a virtual disk driver for Windows that uses HTTP to mount disk or CD/DVD images from a web server. It is also a demonstration on how to do network communication from kernel mode on Windows using the TDI interface.
Latest news: Allow to mount images without administrative privileges, works better on Windows Vista and Windows 7, support for 64-bit systems.
I have put a small CD image here to make it easy to try HttpDisk, use the following command:
httpdisk /mount 0 http://www.acc.umu.se/~bosse/fdbootcd.iso /cd f:
...
httpdisk /umount f:

Khttpd

Release 2 (2009-10-21)
Khttpd is a simple kernel mode web server for Windows that demonstrates how to do network communication from kernel mode and how to use the MDL interface to the filesystem (IRP_MN_MDL and IRP_MN_COMPLETE_MDL). Using chained MDL:s the HTTP header and file data can be sent in one packet without any memory copy operation - so called zero-copy networking.
Latest news: Support for 64-bit systems.

Other links

Tools and utilities for Windows by Olof Lagerkvist.

Number of visitors:
542
Last modified: Saturday, 02-Jul-2011 21:19:40 CEST