2

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).

phuclv
  • 37,963
  • 15
  • 156
  • 475
Boris
  • 3,163
  • 5
  • 37
  • 46

3 Answers3

2

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!

Ana Betts
  • 73,868
  • 16
  • 141
  • 209
2

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

Maxim Razin
  • 9,114
  • 7
  • 34
  • 33
  • I think the HttpDisk driver on the same page is an even better fit if you want to create a block device whose contents are generated programmatically somehow (rather than coming from an existing file). I was very impressed to see that in 2018 on Windows 10, after following the simple installation instructions, the example command line, which mounts an .iso provided by a Microsoft webserver as a local disk, just worked! :) – j_random_hacker Oct 26 '18 at 20:38
0

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

KIV
  • 745
  • 8
  • 12