Mount Manager Registry Entries

How are the ??\Volume{GUID} entries in
hklm\ccs\services\MountedDevices created?

I know the ioctls that the mount manager
uses to create the \DosDevices<letter> entries,
but I’m having problems on some boxes with the
mount manager corrupting the registry if
I don’t return a GUID in response to the
QUERY_UNIQUE_ID ioctl. I also don’t ever
see the volume show up in the ??\Volume{GUID}
registry key. The corruption manifests itself
usually when some thread (like rpc in my case)
closes a registry key. I found that if my
volume manager driver returns an error status
from the QUERY_UNIQUE_ID then all is well.

The driver that controls the volume is a legacy
driver (with no ‘.inf’ installation file) so it
does not have an ‘AddDevice’ routine and therefore
no pdo. However, it does respond to the
mount mgr ioctl requests
and other pnp requests, so I’m a tad confused.

Thanks.

> I don’t return a GUID in response to the

QUERY_UNIQUE_ID ioctl. I also don’t ever

This is not necessary a GUID. This must be any value which identifies the
volume.

For hard disks, FtDisk or DmIo responds to this. FtDisk uses a combination of
MBR signature + partition offset as a unique ID.

For removable disks, Disk.sys responds to this, and uses the PnP ID as a unique
ID.

The only need for this ID uniqueness is to make the drive letter assignment and
the NTFS reparse points targeting persistent across boots and across hard disk
moves from one IDE cable to another.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com