FltCreateFileEx2 and mount points

Hello,

in this thread (http://www.osronline.com/showthread.cfm?link=233607) I was told that FltCreateFileEx2 should fail with STATUS_MOUNT_POINT_NOT_RESOLVED for path which contains mount point. That was true for CSV volume on Win 2012 server 64bit where mount point “\Device\HarddiskVolume1\ClusterStorage\Volume0” pointed to “\Device\CSVVolume0”.

Now I observe different behavior on Win7 32bit, where I have mount point “c:\mount” to FAT32 volume. In PreCreate callback of minifilter I see fileobject for “\Device\HarddiskVolume1\mount\test.txt” but when I call FltCreateFileEx2 for that path I get handle and file object for “\Device\HarddiskVolume3\test.txt”. So it means FltCreateFileEx2 didn’t fail with STATUS_MOUNT_POINT_NOT_RESOLVED, but resolved the mount point to destination file on FAT32 volume. Why?

Thanks.

I found the difference. Important is if I put Instance param to FltCreateFileEx2. If it is NULL, then STATUS_SUCCESS is returned and mount point is resolved. Returned handle and FileObject is dedicated to target volume. If Instance is one that FltMgr provided me in PreCreate callback, then FltCreateFileEx2 returns STATUS_MOUNT_POINT_NOT_RESOLVED.