I write a filter driver to redirect a directory to another.for
example,explorer open D:\XXX,it will show the data of E:\yyy.
now, in winxp explorer, the redirecting work well.Open D:\xxx,will
show the data of E:\yyy. But, when double click a .doc file, the word
can not open the file,says:“file not found”.
In my filter driver,I hold up the IRP_MJ_CREATE and changed the
FileName to new file name when the file is equal to my target file.
Then
Irp->IoStatus.Information = IO_REPARSE;
//ExFreePool( FileNameBuffer);
Irp->IoStatus.Status = STATUS_REPARSE;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_REPARSE;
==========================
I monitor the Files with FileMon, and found, before IRP_MJ_CREATE,
there is a FASTIO_QUERY_OPEN , and if the file is redirected, it
returned “FILE¡¡NOT FOUND”.When ms word open a file such as a .doc,a .
txt, a .html, it get the FASTIO_QUERY_OPEN result “FILE NOT FOUND” ,
then only IRP_MJ_CREATE, and IRP_MJ_CLEAN_UP , IRP_MJ_CLOSE . But,in
notepad.exe, it get the FASTIO_QUERY_OPEN result “FILE NOT FOUND”
will go on doing open.
why word can not open the redirected file? and how can i do?