File system mini-filter:
- Register IoRegisterPlugPlayNotification(EventCategoryTargetDeviceChange, …) from InstanceSetup
- Call IoVolumeDeviceToDosName(…) when GUID_IO_VOLUME_NAME_CHANGE
Steps:
- Start driver
- Mount volume (without any mount points) to empty NTFS directory (c:\dir1)
Сall IoVolumeDeviceToDosName(…) (from GUID_IO_VOLUME_NAME_CHANGE notification) return GUID name (\?\Volume{}). As if volume does not have a mount point. - Remove volume mount point
IoVolumeDeviceToDosName(…) return previous DOS name (c:\dir1) - mount volume (without mount points) to another empty NTFS directory (c:\dir2)
IoVolumeDeviceToDosName(…) return GUID name again (\?\Volume{}) - remove volume mount point
IoVolumeDeviceToDosName(…) return previous DOS name (c:\dir2) - <…>
Reproduced on:
- Windows 10 (build 17134 and 14393)
- Windows 8.1 (build 9600)
- Windows 8 (build 9200)
Or is this the expected behavior for mount points?