Question

I'm basically looking for an example of the API used by, for example, an external USB hard drive driver that adds a new Drive to the file system on Windows.

Thanks!

Was it helpful?

Solution

The file system is really implemented by a stack of drivers. For instance, the USB drive is first handled by the USB Mass Storage driver. Since an USB drive may contain multiple partitions, with different file systems, you can have multiple file system drivers in parallel, and you'd have multiple drives show up in Explorer.

Anyway, the API you'd probably looking for is called IFS, Installable File System. This is necessarily an C API, as file system drivers are quite fundamental to the operation of the kernel. You'll have to deal with paged memory, for instance, and IRQ levels.

OTHER TIPS

IOCTL_DISK_SET_DRIVE_LAYOUT_EX

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top