Disk Driver (Sector Level) - Newbie

Hi, I’m interested in writing a Windows driver to emulate a local hard disk. All I want from the driver is to request which disk sectors to read and I’ll return a populated buffer. Same with writing. In other words I want this driver to work at a really low level. So low in fact that I don’t even want to give it information about partitions, it should do that by itself as it will have full access to the sectors. Can someone please give me some advice or maybe a sample that I can modify. This seems like a simple thing to do and I’d like some input from you clever blokes out there. I want this “drive” to appear with other LOCAL hard disks to give you the maximum functions such as Scandisk etc.

Thanks again. Oh yes, know of any GOOD books on the subject before I just do a search on Amazon for “Windows Drivers”. Cheers!

Search the list archives. There are several billion posts on the topic.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, October 25, 2006 11:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk Driver (Sector Level) - Newbie

Hi, I’m interested in writing a Windows driver to emulate a local hard disk. All I want from the driver is to request which disk sectors to read and I’ll return a populated buffer. Same with writing. In other words I want this driver to work at a really low level. So low in fact that I don’t even want to give it information about partitions, it should do that by itself as it will have full access to the sectors. Can someone please give me some advice or maybe a sample that I can modify. This seems like a simple thing to do and I’d like some input from you clever blokes out there. I want this “drive” to appear with other LOCAL hard disks to give you the maximum functions such as Scandisk etc.

Thanks again. Oh yes, know of any GOOD books on the subject before I just do a search on Amazon for “Windows Drivers”. Cheers!


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

> Can someone please give me some advice or maybe a sample

that I can modify…I want this “drive” to appear with other LOCAL
hard disks to give you the maximum functions such as Scandisk etc.

The KMDF ramdisk sample on the DDK is free and meets the requirement of getting absolute sector i/o. But I am not sure as written it meets your maximum functionality need as it is not part of the proper storage stack, can’t be reformatted, can’t be shared, can’t be used with disk administrator, can’t be used with 3rd party filter drivers, requires a reboot to appear and disappear in explorer, and has a 32MB size limit.

If you want a drive to look *exactly* like a physical disk drive to the system, you need something lower level and there are not any samples in the DDK for this. You can find 3rd party source out there such as http://www.perisoft.net/miniport/index.htm where your driver gets SCSI commands which Windows thinks is talking to real hardware but you can map them to do anything you want.

eof