Hi Everybody
I want to merge two (or more) directories virtually.
For that, I am writing a filter driver.
Since I am new to this field, I am facing some problems :
- I’ve added new DUMMY.txt entry in IRP_MJ_DIRECTORY_CONTROL for one specific folder and I’ve redirected (using REPARSE) CREATE for DUMMY.txt to file Text2.txt that actually exists. While introducing DUMMY.txt entry, I am using FileBothDir structure of Text2.txt and appending that to tail in DIR_CONTROL completion.
Explorer shows DUMMY.txt. When I open DUMMY.txt, notepad shows contents of Text2.txt. But when I am right clicking DUMMY.txt and asking for properties, I am not getting information that I’ve filled in my DUMMY entry.
Can somebody explain me what’s the problem? What I am missing over here?
- For merging directories, I have to retrieve info about other dir using standard routine/proc available in dir.c (that creates asynchronous irp & waits for that …).
The doubt I have in mind is : Will it create any problem ,if am querying info about other folder before query operation for one folder is complete or file system driver manages contexts for all queries seperately?
Can somebody help me to solve these problems?
Thanks in advance.
Regards,
Kailas
Yahoo! Mail for Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
- Type of structure to fill in respond to DirControl is dictated
by QueryDirectory.FileInformationClass parameter. You can’t deliberately
choose just one and stick to it. You have to handle all four choices
separately.
- It’s not enough just to provide info in DirControl. You also
need to filter IRP_MJ_QUERY_INFORMATION (AFAIK the main source for file
info used by Win32) to report your file properties, including file
path/name as it’s going to appear in notepad’s caption (for example).
Besides, you also need to filter fast i/o requests (such as
QueryBasic/Standard/NetworkOpenInfo).
- Said that you’re going to face another problem: how to
distinguish between FO opened via your DUMMY.txt and FO opened directly
via Text2.txt (assuming that actual dir where Text2.txt resides is still
visible)? Because you’re using reparse you’re loosing control over FO
that originally addressed DUMMY and you will not be able to distinguish
between create IRPs for Text2.txt that were send as a result of reparse
and create IRPs that were send as a result of direct open of Text2.txt
- As for your second question there is no problem querying another
dir while you’re in another querydir dispatch.
Vladimir Chtchetkine
Principal Engineer
Borland Software is the global leader in platform independent solutions
for Software Delivery Optimization, helping customers address the
constraints of modern day software development to maximize the business
value of their software.
-----Original Message-----
From: Kailas Joshi [mailto:xxxxx@yahoo.com]
Sent: Wednesday, August 10, 2005 11:29 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Problem Regarding File Property Page
Hi Everybody
I want to merge two (or more) directories virtually.
For that, I am writing a filter driver.
Since I am new to this field, I am facing some problems :
- I’ve added new DUMMY.txt entry in IRP_MJ_DIRECTORY_CONTROL for one
specific folder and I’ve redirected (using REPARSE) CREATE for DUMMY.txt
to file Text2.txt that actually exists. While introducing DUMMY.txt
entry, I am using FileBothDir structure of Text2.txt and appending that
to tail in DIR_CONTROL completion.
Explorer shows DUMMY.txt. When I open DUMMY.txt, notepad shows contents
of Text2.txt. But when I am right clicking DUMMY.txt and asking for
properties, I am not getting information that I’ve filled in my DUMMY
entry.
Can somebody explain me what’s the problem? What I am missing over here?
- For merging directories, I have to retrieve info about other dir
using standard routine/proc available in dir.c (that creates
asynchronous irp & waits for that …).
The doubt I have in mind is : Will it create any problem ,if am querying
info about other folder before query operation for one folder is
complete or file system driver manages contexts for all queries
seperately?
Can somebody help me to solve these problems?
Thanks in advance.
Regards,
Kailas
Yahoo! Mail for Mobile
Take Yahoo! Mail with you!
http:
Check email on your mobile phone. — Questions? First check the IFS FAQ
at https://www.osronline.com/article.cfm?id=17 You are currently
subscribed to ntfsd as: xxxxx@borland.com To unsubscribe
send a blank email to xxxxx@lists.osr.com</http:>
Hi
Thanks to Vladimir for his quick reply.
Now I’ve merged folders successfully. Also, I have redirected all
unsuccessful CREATE requests to new folders by manipulating
FileObject->FileName and then using REPARSE.
My .txt and .bmp files are getting redirected properly. I can browse
through subfolders in other(merged) folder very well.
Still, I am facing some problems:
- When I try to open .html file, e-explorer says:Page Cannot be
displyed.
Also, I am not able to run any exes. Whenever I doubleclick on it,
explorer says : File Not Found
I’ve seen some posts earlier on this list but unfortuanately, none of
them cleared my doubt.
Can somebody shed light on this topic?
2)How should I redirect FastIO requests? I guess it will be very
inefficient to fail all of them.
3)Is it necessary to catch IRP_MJ_QUERY_INFORMATION. If I’ve redirected CREATE using reparse, then why IRP_MJ_QUERY_INFORMATION is not recieving info from redirected file?
Thanks in advance.
Regards,
Kailas
Start your day with Yahoo! - make it your home page