volume device objects and virtual file system

Hi all,

I am building a virtual file system to expose the contents of a proprietary
file. I have done the following:

  • I have built my driver, but with only a few entry points defined (I just
    really started): Create, cleanup, close, device control, file system
    control, shutdown

  • I have registered my driver with the SCM under the key “Pifsk” like this:
    Group is “File system”, Type is FILE_DEVICE_DISK_FILE_SYSTEM, start is
    manual start, error control is 1

  • In a dos box, I type “net start pifsk”. My driver starts, I am able to
    step through DriverEntry(). DriverEntry() calls IoCreateDevice() with the
    name “\Pifs”. Once this is done, I see two objects in the object manager,
    the driver object is located at “\FileSystem\Pifsk”, and the device object
    is at “\Pifs”

  • I wrote DriverEntry() so that it also creates a symbolic link to my device
    object here: " \GLOBAL??\Pifs0". I use this so that user-mode apps can send
    i/o controls to my driver by doing CreateFile( “\.\Pifs0”, … )

I notice that I don’t get any “mount volume” requests. I suppose this makes
sense since I don’t have a storage device. But this means that my file
system won’t have a volume device stack (nor a VDO), a storage device stack,
nor a VPB. So my file system only has a CDO. Is this OK?

I wrote a user-mode app that calls DefineDosDevice() to map “Q:” to
“\.\Pifs0” (in kernel space, this maps “\Sessions\0\DosDevices\xxx\Q:” to
“??\Pifs0”). I immediately noticed that explorer opens my file system,
probes for things like “\autorun.inf” and "". So it seems like thing are
working, or are they?

I am testing on XP SP2, checked build.

Thanks.

=================================================
Roger Tawa
http://tawacentral.net/
[One thing about paradigms: shift happens.]
[When you stop, you’re done.]