Read file in create dispatch routine

Hi all,

I need to read a file’s data in it’s create dispatch routine by creating my
own

read IRP. However, the question is that the size of the file is unknow in
create dispatch,

and I don’t know how to set the read.length parameter.

What will happen if I set the read.length big enough(I am able to know the
upper bound of the file’s size)?

Can I get the right data?

Thanks in advance!

why? can’t u query the fs for the file size first before sending the read
down?

You wish to read file data in pre-create? If your idea is to use the
FileObject you find in the create there for sure are problems with this
idea. For example here the FileObject is not ready to be used for anything
but the create; it has not been seen by the FSD.

“Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
Hi all,

I need to read a file’s data in it’s create dispatch routine by creating my
own

read IRP. However, the question is that the size of the file is unknow in
create dispatch,

and I don’t know how to set the read.length parameter.

What will happen if I set the read.length big enough(I am able to know the
upper bound of the file’s size)?

Can I get the right data?

Thanks in advance!

Like what you said, I wish to read file data in pre-create.

I have thought of that there may be problems, however, I need the

data in the file during pre-create.

actually the data is the full path name of another file which I want to

redirect the current file to. I just store this target file’s path in the
source

file, and in pre-create I wish to get it and redirect the source file to the

target file.

I just have no idea if there is anywhere else I could store the path, do

anybody have a better idea?( there are a great amount of such files need

to be redirected, so buffer would be helpless)

3x to all.

On 4/10/06, Lyndon J. Clarke wrote:
>
> You wish to read file data in pre-create? If your idea is to use the
> FileObject you find in the create there for sure are problems with this
> idea. For example here the FileObject is not ready to be used for anything
> but the create; it has not been seen by the FSD.
>
> “Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
> Hi all,
>
> I need to read a file’s data in it’s create dispatch routine by creating
> my
> own
>
> read IRP. However, the question is that the size of the file is unknow in
> create dispatch,
>
> and I don’t know how to set the read.length parameter.
>
> What will happen if I set the read.length big enough(I am able to know the
> upper bound of the file’s size)?
>
> Can I get the right data?
>
> Thanks in advance!
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

If the only thing in the file is the path to another file, this sounds
just like a reparse point. Have you considered using those instead?

Otherwise, you’ll have to open the file yourself (either with
FltCreateFile/FltCreateFileEx or with
IoCreateFileSpecifyDeviceObjectHint) and then read the data contents
yourself (build an IRP, use FltReadFile, or ZwReadFile). But as Lyndon
said, there’s nothing to use in the file object in pre-create for a read
operation.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in
Boston, MA April 18-21, 2006.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Xiong Weiwei
Sent: Monday, April 10, 2006 6:03 AM
To: ntfsd redirect
Subject: Re: [ntfsd] Read file in create dispatch routine

Like what you said, I wish to read file data in pre-create.

I have thought of that there may be problems, however, I need the

data in the file during pre-create.

actually the data is the full path name of another file which I want to

redirect the current file to. I just store this target file’s path in
the source

file, and in pre-create I wish to get it and redirect the source file to
the

target file.

I just have no idea if there is anywhere else I could store the path, do

anybody have a better idea?( there are a great amount of such files
need

to be redirected, so buffer would be helpless)

3x to all.

On 4/10/06, Lyndon J. Clarke wrote:

You wish to read file data in pre-create? If your idea is to use the
FileObject you find in the create there for sure are problems with this
idea. For example here the FileObject is not ready to be used for
anything
but the create; it has not been seen by the FSD.

“Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
Hi all,

I need to read a file’s data in it’s create dispatch routine by creating
my
own

read IRP. However, the question is that the size of the file is unknow
in
create dispatch,

and I don’t know how to set the read.length parameter.

What will happen if I set the read.length big enough(I am able to know
the
upper bound of the file’s size)?

Can I get the right data?

Thanks in advance!


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed
to ntfsd as: unknown lmsubst tag argument: ‘’ To unsubscribe send a
blank email to xxxxx@lists.osr.com

Have you looked at reparse points?

“Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
Like what you said, I wish to read file data in pre-create.

I have thought of that there may be problems, however, I need the

data in the file during pre-create.

actually the data is the full path name of another file which I want to

redirect the current file to. I just store this target file’s path in the
source

file, and in pre-create I wish to get it and redirect the source file to the

target file.

I just have no idea if there is anywhere else I could store the path, do

anybody have a better idea?( there are a great amount of such files need

to be redirected, so buffer would be helpless)

3x to all.

On 4/10/06, Lyndon J. Clarke wrote:
You wish to read file data in pre-create? If your idea is to use the
FileObject you find in the create there for sure are problems with this
idea. For example here the FileObject is not ready to be used for anything
but the create; it has not been seen by the FSD.

“Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
Hi all,

I need to read a file’s data in it’s create dispatch routine by creating my
own

read IRP. However, the question is that the size of the file is unknow in
create dispatch,

and I don’t know how to set the read.length parameter.

What will happen if I set the read.length big enough(I am able to know the
upper bound of the file’s size)?

Can I get the right data?

Thanks in advance!


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thank you so much!

I know little about reparse point. Could you please make a introduction,

or offer me some useful information about such topic?

best regards

On 4/10/06, Lyndon J. Clarke wrote:
>
> Have you looked at reparse points?
>
> “Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
> Like what you said, I wish to read file data in pre-create.
>
> I have thought of that there may be problems, however, I need the
>
> data in the file during pre-create.
>
> actually the data is the full path name of another file which I want to
>
> redirect the current file to. I just store this target file’s path in the
> source
>
> file, and in pre-create I wish to get it and redirect the source file to
> the
>
> target file.
>
> I just have no idea if there is anywhere else I could store the path, do
>
> anybody have a better idea?( there are a great amount of such files need
>
> to be redirected, so buffer would be helpless)
>
> 3x to all.
>
>
>
>
> On 4/10/06, Lyndon J. Clarke wrote:
> You wish to read file data in pre-create? If your idea is to use the
> FileObject you find in the create there for sure are problems with this
> idea. For example here the FileObject is not ready to be used for anything
> but the create; it has not been seen by the FSD.
>
> “Xiong Weiwei” wrote in message news:xxxxx@ntfsd…
> Hi all,
>
> I need to read a file’s data in it’s create dispatch routine by creating
> my
> own
>
> read IRP. However, the question is that the size of the file is unknow in
> create dispatch,
>
> and I don’t know how to set the read.length parameter.
>
> What will happen if I set the read.length big enough(I am able to know the
> upper bound of the file’s size)?
>
> Can I get the right data?
>
> Thanks in advance!
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

I would suggest using your favorite web search engine and typing
“reparse point” as the search term - it will turn up a number of
articles about reparse points, including this one
http://www.osronline.com/article.cfm?article=203 that was printed in The
NT Insider several years ago.

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com

Looking forward to seeing you at the next OSR File Systems class in
Boston, MA April 18-21, 2006.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Xiong Weiwei
Sent: Monday, April 10, 2006 6:55 AM
To: ntfsd redirect
Subject: Re: [ntfsd] Read file in create dispatch routine

Thank you so much!

I know little about reparse point. Could you please make a introduction,

or offer me some useful information about such topic?

best regards

On 4/10/06, Lyndon J. Clarke wrote:

Have you looked at reparse points?

“Xiong Weiwei” < xxxxx@gmail.com mailto:xxxxx > wrote in
message news:xxxxx@ntfsd…
Like what you said, I wish to read file data in pre-create.

I have thought of that there may be problems, however, I need the

data in the file during pre-create.

actually the data is the full path name of another file which I want to

redirect the current file to. I just store this target file’s path in
the
source

file, and in pre-create I wish to get it and redirect the source file to
the

target file.

I just have no idea if there is anywhere else I could store the path, do

anybody have a better idea?( there are a great amount of such files
need

to be redirected, so buffer would be helpless)

3x to all.

On 4/10/06, Lyndon J. Clarke wrote:
You wish to read file data in pre-create? If your idea is to use the
FileObject you find in the create there for sure are problems with this
idea. For example here the FileObject is not ready to be used for
anything
but the create; it has not been seen by the FSD.

“Xiong Weiwei” < xxxxx@gmail.com > wrote in message
news:xxxxx@ntfsd…
Hi all,

I need to read a file’s data in it’s create dispatch routine by creating
my
own

read IRP. However, the question is that the size of the file is unknow
in
create dispatch,

and I don’t know how to set the read.length parameter.

What will happen if I set the read.length big enough(I am able to know
the
upper bound of the file’s size)?

Can I get the right data?

Thanks in advance!


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

— Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17 You are currently subscribed
to ntfsd as: unknown lmsubst tag argument: ‘’ To unsubscribe send a
blank email to xxxxx@lists.osr.com</mailto:xxxxx>