Windows driver examples (original) (raw)

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 tobosse@accum.se.


Latest news

Milko AFS server: I have updated Milko, the server part from the Arla project, to work on modern systems: https://github.com/bobranten/milko-afs-server.

Ext4: Signed for Windows 10 and Windows 11, see below. I have implemented support for the new ext4 features metadata checksums and 64-bit blocknumbers in the ext2fsd project by Matt Wu.
wdkundoc.h: Subset of ntifs.h to use with the WDK.
ntifs.h: Small update.
RomFs release 24: Implemented relative create.
SwapFs release 3.2: Support for more than one swap partition.
HttpDisk release 10.1: Ksocket is now built as a library.
Khttpd release 2.2: Ksocket is now built as a library.
rfsd release 0.27: Corrected a few memory leaks found by the ReactOS project.
ffsdrv release 0.5.3b: Updated with a number of bug fixes from the ReactOS project including memory leaks, debug printing and pool tags.
nfs41-client release bb3: Can be compiled with Visual Studio Community 2017 and Windows Driver Kit (WDK) for Windows 10 version 1809.


Documentation

My report "High performance kernel mode web server for Windows".


Ext4 filesystem driver for Windows

Updated Ext2Mgr that gives more detailed information on the type of filesystems on the disk. If an on disk filesystem contains new ext4 features that is not supported by the Windows driver it will show a + sign after the filesystem name, e.g EXT4+. You can run this application together with an already installed driver, see below for install programs.
Release 0.71 (2024-03-02)
Signed for Windows 10 and Windows 11: Installation program.
Signed driver files for manual install (ARM/ARM64 also!)
Unsigned for Windows XP, Windows Vista, Windows 7 and Windows 8: Installation program.
Release 0.70 beta 3 (2021-02-02)
Release 0.70 beta 2 (2020-04-23)
I am helping Matt Wu to develop support for the new features metadata checksums and 64-bit block numbers in the ext2fsd project. If you want to help to test this work here is an install program for the new driver Ext2Fsd-0.71-setup.exe for Windows 10 and Windows 11 and Ext2Fsd-0.71-setup-xp.exe for Windows XP, Windows Vista, Windows 7 and Windows 8. Now you can read and write ext4 filesystems using the latest features from Windows.
Source code: https://github.com/bobranten/Ext4Fsd


Wdkundoc.h

Release 3 (2015-06-11)
Information that is undocumented in the Microsoft Windows Driver Kit (WDK).
wdkundoc.h
wdkundoc.html
wdkundoc.zip
wdkundoc.rar
Old versions of wdkundoc.h.


Ntifs.h

Release 58 (2015-06-11)
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.html
ntifs.zip
ntifs.rar
Old versions of ntifs.h.


RomFs

Release 24 (2019-03-07)
romfs-24.zipI 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.Disk images to test the driver. You can use a virtual disk like FileDisk. Note that Romfs is slow over HttpDisk.
Old versions of romfs.


Ext2Fsd by Matt Wu is an ext2, ext3 and ext4 file system driver for Windows 10.
WinBtrfs by Mark Harmstone is an Btrfs driver for Windows 10.
ZFSin by Jörgen Lundman is an ZFS driver for Windows 10.
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 Driverfor 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.
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 was a project to create a framework for usermode file system drivers on Windows but it is now unmaintained. Dokan is similar to FUSE (Linux file system in user space) but works on Windows.
DokanX and DokanY is two forked projects that continue the development of Dokan.


SwapFs

Release 3.3 (2020-03-26)
swapfs-3.3.zipis 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.
Note: You can allow Windows to load testsigned drivers with the command "bcdedit /set testsigning on".
New in release 3.2: Support for more than one swap partition.
New in release 3.1: Support for disks with GUID Partition Table (GPT).
New in release 3: Support for swap partitions bigger than 4GB.
New in release 2: Support for standby and hibernation.
SwapFs release 2.1 for Windows 2000 and later.
SwapFs release 1 for Windows NT 4.0.
Old versions of swapfs.


FileDisk

Release 22 (2020-03-26)
filedisk-22.zipis 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. FileDisk can also use ISO images from optical disks.
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 volume of 4GB. When you copy files to it the used disk space will automatically increase.
Note: To be sure to take advantage of sparse image files you should use "Quick Format" when formating them.
Note: To be able to see the virtual disks in Explorer on later versions of Windows you should run the mount program filedisk.exe as a normal user and not from a command prompt run as administrator.
Note: You can allow Windows to load testsigned drivers with the command "bcdedit /set testsigning on".
filedisk-17p3.zipis a version of FileDisk contributed by Anton Zechner that lets you use an disk image of a full harddisk with partitions.
filedisk-15-signed.zipSigned by Matt Wu so that it can be loaded on 64-bit versions of Windows without pressing F8 at boot and select "Disable enforce driver signing".
FileDiskwith support for .bin CD-ROM images by Gilles Vollant.
Disk images to test the driver.
Old versions of filedisk.


HttpDisk

Release 10.2 (2020-05-27)
httpdisk-10.2.zipis a virtual disk driver for Windows that uses the HTTP protocol to mount disk images from a web server. It is also a demonstration on how to do network communication from kernel mode on Windows using the transport driver interface (TDI).
Screenshot of an example of use.
Note: To be able to see the virtual disks in Explorer on later versions of Windows you should run the mount program httpdisk.exe as a normal user and not from a command prompt run as administrator.
Note: You can allow Windows to load testsigned drivers with the command "bcdedit /set testsigning on".
New in release 10.1: Ksocket is now built as a library, this will make it easier to maintain and use for more than one project.
Example: Installing the Windows Server 2003 Service Pack 1 (SP1) Driver Development Kit (DDK) and the Windows Driver Kit (WDK) 7.1.0 direct from Microsoft by mounting the ISO images over HTTP.

C:> httpdisk /mount 0 http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso /cd f: C:> httpdisk /mount 1 http://download.microsoft.com/download/4/a/2/4a25c7d5-efbe-4182-b6a9-ae6850409a78/grmwdk_en_7600_1.iso /cd h: C:> f:\setup.exe && h:\kitsetup.exe

Disk images to test the driver.
Old versions of httpdisk.


Khttpd

Release 2.3 (2020-03-27)
khttpd-2.3.zipis a kernel mode web server for Windows that demonstrates how to do network communication from kernel mode using the transport driver interface (TDI) and how to use the MDL interface to the filesystem (IRP_MN_MDL and IRP_MN_COMPLETE_MDL). Using chained MDLs the HTTP header and the first file data can be sent in one network packet without any memory copy operation — so called zero-copy networking.
Note: You can allow Windows to load testsigned drivers with the command "bcdedit /set testsigning on".
New in release 2.2: Ksocket is now built as a library, this will make it easier to maintain and use for more than one project.
New in release 2.1: Can be compiled with Visual Studio Community 2015 and Windows Driver Kit (WDK) 10.
New in release 2: Support for 64-bit systems.
Old versions of khttpd.


Maintained drivers

I maintain a few open source file system drivers for Windows that was developed by other open source groups:

ReiserFS file system driver for Windows

Release 0.27b (2024-06-24)
rfsd-0.27b.zip
New in release 0.27b: Updated to build with newer WDK.
New in release 0.27: Corrected a few memory leaks found by the ReactOS project.
New in release 0.26: Can be compiled with Visual Studio Community 2015 and Windows Driver Kit (WDK) 10.
Note: Users can continue to install 0.25.5-signed if they need a signed version.
rfsd-0.25.5.zipandrfsd-0.25.5-signed.zipis 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. This driver was originally developed by Mark W Piper markwpiper@users.sourceforge.net
Disk images to test the driver. You can use a virtual disk like FileDisk or HttpDisk.
Old versions of rfsd.

FFS/UFS file system driver for Windows

Release 0.5.3c (2024-06-24)
ffsdrv-0.5.3c.zipis a file system driver for Windows that allows you to get read access to FreeBSD, NetBSD and OpenBSD FFS/UFS partitions. This driver has been updated by me to fix bugs and support newer versions of Windows. This driver was originally developed by Lee Jae-Hong pyrasis@gmail.com
Note: To be able to see the file system in Explorer on later versions of Windows you should run the mount program as a normal user and not as an administrator.
New in release 0.5.3c: Updated to build with newer WDK.
New in release 0.5.3b: Updated with a number of bug fixes from the ReactOS project including memory leaks, debug printing and pool tags.
New in release 0.5.3a: Corrected an bug in the reg file used when manually installing the driver.
New in release 0.5.3: Allow to mount without administrative privileges. Can be compiled with Visual Studio Community 2015 and Windows Driver Kit (WDK) 10.
New in release 0.5.2: Support for both normal partitions and BSD type partitions that contain one or more logical partitions.
Disk images to test the driver. You can use a virtual disk like FileDisk or HttpDisk.
Old versions of ffsdrv.

NFS version 4.1 file system driver for Windows

This driver is now maintained again at https://github.com/kofemann/ms-nfs41-client with regular releases at http://www.nrubsig.org/people/gisburn/work/msnfs41client/releases/testing/.
This is an NFS version 4.1 client for Windows developed by the Center for Information Technology Integration at the University of Michigan. This driver has been updated by me to support more versions of Windows and to be able to be compiled with the latest versions of Visual Studio and the Windows Driver Kit (WDK).
New in release bb4: Updated to build with newer WDK.
New in release bb3: Can be compiled with Visual Studio Community 2017 and Windows Driver Kit (WDK) for Windows 10 version 1809.
New in release bb2: Build separate versions for Windows Vista and later versions of Windows.
New in release bb1: Support for Windows Vista, before the client only supported Windows 7 and later versions of Windows. Can be compiled with Visual Studio Community 2015 and Windows Driver Kit (WDK) 10.
Old versions of nfs41-client.


Mirrors

Mirror of some files from the Arla project at stacken.kth.se.
Mirror of ext2fsd.com by Matt Wu.


Svensk Press av Berit Branten en uppsats i Statskunskap från 1960-talet där mamma undersöker Östersunds-Posten och Karlskoga Tidningen.
Ritning på SMHIs klassiska termometerbur i trä.
OSR Online by Open Systems Resources, Inc.
WinImage by Gilles Vollant.
Tools and utilities for Windows by Olof Lagerkvist.
VirtualNetwork by Anton Zechner. A virtual network card, wich simulates a network card on mac level.
Birger Sjölins samling om släkten Hjertstedt (page in swedish on genealogy)


Last modified: Sunday, 06-Oct-2024 14:25:31 CEST