locked
windows driver create disk RRS feed

  • Question

  • I need to map a hard drive to a file similar to ImDisk(just not as sophisticated as it). However, I can't seem to create a drive and have it show up in My Computer. I have considered using ZwCreatefile and iocreatedevice but I haven't had any luck what so ever. Am I going in the right direction using these? Also this is using the WDM. I have also considered using the WDF. Is this a better option? Thanks in advance.
    Monday, April 18, 2011 2:11 AM

Answers

  • Have you looked at the ramdisk sample in the WDK at src\storage\ramdisk?   This should give you the basics you need.  It is WDF which is a better choice for this work.
    Don Burn (MVP, Windows DKD) Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr
    Monday, April 18, 2011 12:17 PM

All replies

  • Have you looked at the ramdisk sample in the WDK at src\storage\ramdisk?   This should give you the basics you need.  It is WDF which is a better choice for this work.
    Don Burn (MVP, Windows DKD) Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr
    Monday, April 18, 2011 12:17 PM
  • There are two ways to go about this:

    1. Use an Explorer extension
    2. Write a device driver

    The Explorer extension has the virtue of being a user-mode DLL, and there are many samples on how to go about writing one in the SDK (although not specifically for exactly what you want). If you write a driver, RAMDISK would be a good starting point, as Don pointed out. It is likely that you will need quite a bit of additional infrastructure around such a driver, in order to specify which file is acting as the backing store, mounting and unmounting, etc.

    -Brian

     


    Azius Developer Training, Windows driver, internals, and security training See www.azius.com for information
    Monday, April 18, 2011 8:23 PM