Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Redirection Between Volumes

cc_vvcc_vv Member Posts: 3

hello everyone,
This may be a simple mistake, but I could not find the reason.
Microsoft's demo simrep redirects the operation of the same volume's \Device\HarddiskVolume4\x\y directory to \Device\HarddiskVolume4\a\b, now I change it to The form that can be cross-volume is also like \Device\HarddiskVolume4\x\y to \Device\HarddiskVolume3\a\b.
Now I don't want to redirect only the files in a specific directory, but redirect all operations of the E: disk to the D: disk, including the root directory, I originally thought that I just need to replace the previous volume name part when I call the ReplaceFileNameFunction, but the situation seems not so simple, I don't know what went wrong.
By the way, the volume that I really want to redirect is not a physical volume, it is virtual, its volume name is \Device\Mup, the root directory is \; WinFsp.Mup\memfs64\share2, which is specific to The directory redirection is successful (that is, \Device\HarddiskVolume4\x\y to \Device\Mup\;WinFsp.Mup\memfs64\share2\a\b), so I don't think the problem is related to this..

thanks!

Comments

  • ntdeveloper31ntdeveloper31 Member Posts: 23

    Yes, you just need to change the filename (new filename should be absolute path including new volume name etc.) in the TargetFileObject using IoReplaceFileName function and do the usual reparsing stuff. Having said that there are number of scenarios / edge cases that needs special handling, e.g. rename operation, directory enumeration etc.

    Perhaps if you can share what exactly is not working - that would help us to understand your problem.

    thanks

  • cc_vvcc_vv Member Posts: 3

    @ntdeveloper31 said:
    Yes, you just need to change the filename (new filename should be absolute path including new volume name etc.) in the TargetFileObject using IoReplaceFileName function and do the usual reparsing stuff. Having said that there are number of scenarios / edge cases that needs special handling, e.g. rename operation, directory enumeration etc.

    Perhaps if you can share what exactly is not working - that would help us to understand your problem.

    thanks

    thank you for your repley.
    This is just my mistake,This is a bug
    Logic is correct, In fact, According to me, Not only need to change the file name in the TargetFileObject, but also change the TargetInstance

  • ntdeveloper31ntdeveloper31 Member Posts: 23

    Logic is correct, In fact, According to me, Not only need to change the file name in the TargetFileObject, but also change the TargetInstance

    I don't think so. Just changing the name in TargetFileObject should be enough as long as its an absolute path.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE