How to create a "Block device" in Windows

5.5k Views Asked by At

For those familiar with Linux, it is possible to create a module and register it as a block device. This allows the user to mount it as a regular disk (while all the block I/O is handled by the module, e.g. USB mass storage).

Is there a way to do this in Windows ? (Need to create a volume mountable by Windows. The raw data will come from propriety interface).

3

There are 3 best solutions below

0
On

The easiest way (and it's not easy!) is to write a Storport Miniport driver, you can even do this with KMDF as well. The latest issue of OSR's "The NT Insider" has an article on how to do this, but it's not going to be any kind of easy.

You will learn a ton though, so if you're interested in kernel development, this is a good way to get started!

1
On

You can find some simple block device drivers at http://www.acc.umu.se/~bosse/ . Look at the FileDisk driver, which is a Windows equivalent of /dev/loop

0
On

Take a look at the Truecrypt project. They have a pretty good implementation of a virtual block device.