Redirection of Folder including subelements

Hi,

i created a minifilter, where i check for the File-Path in the create routine of a certain folder “A” and redirect that one to another Folder “B”. This works pretty fine for this object but not for its subobjects. So i thought, i also redirect it for every file-object whose path starts with “A”. This works partly:

If i browse “A” i get shown the items of “B”. If i now open a subfolder of “A” (which is actually a subfolder of “B”) i actually get shown the Objects that should be in there, but if i now open one of this files i get a “file not found” error.
If i actually have a subfolder inside “A” (the old “A”) with the same name of the subfolder in “B” i can open it and see the content of the subfolder of “B”.

This lead me to the assumption that there must be some other MajorFunction involved besides create. If i am not mistaking, this should be IRP_MJ_DIRECTORY_CONTROL with IRP_MN_QUERY_DIRECTORY. I tried to get these redirected too, but everytime i checked, the TargetFile was always null.

Do i follow the correct approach? Is IRP_MJ_DIRECTORY really what i need? Why doesnt IRP_MJ_DIRECTORY_CONTROL provide me with FileNames?

Thanks in advance

Gernot

i made a mistake checking the IRP_MJ_DIRECTORY_CONTROL-routine. Actually there is always a TargetFile provided. But since Folder “A” gets already redirected to “B” when it gets created, there never are any IRP_MJ_DIRECTORY-requests to Folder “A”.

But if it aint neither in the create-routine nor in the directorycontrol, then how can i reroute consequently even for subelements?