Hi,
When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
it needs to apply this operation to two files in some cases. It seems that
to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
update the FileObject’s name for different files. Is it possible to resend
the IRP two times like this:
update fileobject name for file1;
update IRP parameters;
set completion routine1;
call IoCallDriver(lower-device);
wait event;
update fileobject name for file2;
update IRP parameters;
clear completion routine;
call IoCallDriver(lower-device);
return status;
Thank you very much for your important comments,
Shangwu
You can’t use the same file object for both create requests. What is wrong
with just using ZwCreateFile for the second file?
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 8:15 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Is it working to resend an IRP two times?
Hi,
When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
it needs to apply this operation to two files in some cases. It seems that
to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
update the FileObject’s name for different files. Is it possible to resend
the IRP two times like this:
update fileobject name for file1;
update IRP parameters;
set completion routine1;
call IoCallDriver(lower-device);
wait event;
update fileobject name for file2;
update IRP parameters;
clear completion routine;
call IoCallDriver(lower-device);
return status;
Thank you very much for your important comments,
Shangwu
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@vmware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Hi Alexei,
Thank you for the response. I tried to use ZwCreateFile for the second file.
The problem is that I cannot set the exact flags and options for the
function call. I want to propagate the original CreateOptions and
CreateDispositions to the second request. But I cannot find the mapping
between ZwCreateFile parameters and IRP parameters. Do you have any
information about this?
Best regards,
Shangwu
“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
You can’t use the same file object for both create requests. What is wrong
with just using ZwCreateFile for the second file?
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 8:15 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Is it working to resend an IRP two times?
Hi,
When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
it needs to apply this operation to two files in some cases. It seems that
to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
update the FileObject’s name for different files. Is it possible to resend
the IRP two times like this:
update fileobject name for file1;
update IRP parameters;
set completion routine1;
call IoCallDriver(lower-device);
wait event;
update fileobject name for file2;
update IRP parameters;
clear completion routine;
call IoCallDriver(lower-device);
return status;
Thank you very much for your important comments,
Shangwu
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@vmware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Shangwu,
You can try IoCreateFile. It gives you more control over the options you can
set.
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 11:03 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Is it working to resend an IRP two times?
Hi Alexei,
Thank you for the response. I tried to use ZwCreateFile for the second file.
The problem is that I cannot set the exact flags and options for the
function call. I want to propagate the original CreateOptions and
CreateDispositions to the second request. But I cannot find the mapping
between ZwCreateFile parameters and IRP parameters. Do you have any
information about this?
Best regards,
Shangwu
“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
You can’t use the same file object for both create requests. What is wrong
with just using ZwCreateFile for the second file?
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 8:15 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Is it working to resend an IRP two times?
Hi,
When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
it needs to apply this operation to two files in some cases. It seems that
to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
update the FileObject’s name for different files. Is it possible to resend
the IRP two times like this:
update fileobject name for file1;
update IRP parameters;
set completion routine1;
call IoCallDriver(lower-device);
wait event;
update fileobject name for file2;
update IRP parameters;
clear completion routine;
call IoCallDriver(lower-device);
return status;
Thank you very much for your important comments,
Shangwu
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@vmware.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@vmware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
It seems the two functions are same. My question is how I can set
ZwCreateFile option parameters based on a IRP_MJ_CREATE IRP. Is the
following mapping correct?
CreateDispositions = (IrpSp->Parameters.Create.Options >> 24) & 0x000000ff
CreateOptions = IrpSp->Parameters.Create.Options & 0x00ffffff
Thanks,
Shangwu
“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
Shangwu,
You can try IoCreateFile. It gives you more control over the options you can
set.
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 11:03 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Is it working to resend an IRP two times?
Hi Alexei,
Thank you for the response. I tried to use ZwCreateFile for the second file.
The problem is that I cannot set the exact flags and options for the
function call. I want to propagate the original CreateOptions and
CreateDispositions to the second request. But I cannot find the mapping
between ZwCreateFile parameters and IRP parameters. Do you have any
information about this?
Best regards,
Shangwu
“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
You can’t use the same file object for both create requests. What is wrong
with just using ZwCreateFile for the second file?
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 8:15 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Is it working to resend an IRP two times?
Hi,
When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
it needs to apply this operation to two files in some cases. It seems that
to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
update the FileObject’s name for different files. Is it possible to resend
the IRP two times like this:
update fileobject name for file1;
update IRP parameters;
set completion routine1;
call IoCallDriver(lower-device);
wait event;
update fileobject name for file2;
update IRP parameters;
clear completion routine;
call IoCallDriver(lower-device);
return status;
Thank you very much for your important comments,
Shangwu
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@vmware.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@vmware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
These functions are not the same. You have missed the last parameter in the
IoCreateFile that allows you to set such Flags in the StackLocation like
“SL_OPEN_TARGET_DIRECTORY”. You can’t do it with ZwCreateFile.
If you are not concerned about Flags field then you can use ZwCreateFile.
Your mappings for CreateDisposition/CreateOptions are correct.
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 11:30 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Is it working to resend an IRP two times?
It seems the two functions are same. My question is how I can set
ZwCreateFile option parameters based on a IRP_MJ_CREATE IRP. Is the
following mapping correct?
CreateDispositions = (IrpSp->Parameters.Create.Options >> 24) & 0x000000ff
CreateOptions = IrpSp->Parameters.Create.Options & 0x00ffffff
Thanks,
Shangwu
“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
Shangwu,
You can try IoCreateFile. It gives you more control over the options you can
set.
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 11:03 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] Is it working to resend an IRP two times?
Hi Alexei,
Thank you for the response. I tried to use ZwCreateFile for the second file.
The problem is that I cannot set the exact flags and options for the
function call. I want to propagate the original CreateOptions and
CreateDispositions to the second request. But I cannot find the mapping
between ZwCreateFile parameters and IRP parameters. Do you have any
information about this?
Best regards,
Shangwu
“Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
You can’t use the same file object for both create requests. What is wrong
with just using ZwCreateFile for the second file?
Alexei.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
Sent: Tuesday, March 08, 2005 8:15 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Is it working to resend an IRP two times?
Hi,
When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
it needs to apply this operation to two files in some cases. It seems that
to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
update the FileObject’s name for different files. Is it possible to resend
the IRP two times like this:
update fileobject name for file1;
update IRP parameters;
set completion routine1;
call IoCallDriver(lower-device);
wait event;
update fileobject name for file2;
update IRP parameters;
clear completion routine;
call IoCallDriver(lower-device);
return status;
Thank you very much for your important comments,
Shangwu
—
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@vmware.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@vmware.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@vmware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
I think using ZwCreateFile u will have to handle the “infinite
recursion” problems. Just check out for some discussion about opening
a file in IRP_MJ_CREATE in the mailing list
On Tue, 8 Mar 2005 12:08:27 -0800, Alexei Jelvis wrote:
> These functions are not the same. You have missed the last parameter in the
> IoCreateFile that allows you to set such Flags in the StackLocation like
> “SL_OPEN_TARGET_DIRECTORY”. You can’t do it with ZwCreateFile.
> If you are not concerned about Flags field then you can use ZwCreateFile.
> Your mappings for CreateDisposition/CreateOptions are correct.
>
> Alexei.
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
> Sent: Tuesday, March 08, 2005 11:30 AM
> To: Windows File Systems Devs Interest List
> Subject: Re:[ntfsd] Is it working to resend an IRP two times?
>
> It seems the two functions are same. My question is how I can set
> ZwCreateFile option parameters based on a IRP_MJ_CREATE IRP. Is the
> following mapping correct?
> CreateDispositions = (IrpSp->Parameters.Create.Options >> 24) & 0x000000ff
> CreateOptions = IrpSp->Parameters.Create.Options & 0x00ffffff
>
> Thanks,
>
> Shangwu
>
> “Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
> Shangwu,
>
> You can try IoCreateFile. It gives you more control over the options you can
> set.
>
> Alexei.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
> Sent: Tuesday, March 08, 2005 11:03 AM
> To: Windows File Systems Devs Interest List
> Subject: Re:[ntfsd] Is it working to resend an IRP two times?
>
> Hi Alexei,
>
> Thank you for the response. I tried to use ZwCreateFile for the second file.
> The problem is that I cannot set the exact flags and options for the
> function call. I want to propagate the original CreateOptions and
> CreateDispositions to the second request. But I cannot find the mapping
> between ZwCreateFile parameters and IRP parameters. Do you have any
> information about this?
>
> Best regards,
>
> Shangwu
>
> “Alexei Jelvis” wrote in message news:xxxxx@ntfsd…
> You can’t use the same file object for both create requests. What is wrong
> with just using ZwCreateFile for the second file?
>
> Alexei.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Shangwu
> Sent: Tuesday, March 08, 2005 8:15 AM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] Is it working to resend an IRP two times?
>
> Hi,
>
> When my filter’s Create-Dispatch routine receives an IRP_MJ_CREATE request,
> it needs to apply this operation to two files in some cases. It seems that
> to build a new IRP of IRP_MJ_CREATE is very complicated. My filter can
> update the FileObject’s name for different files. Is it possible to resend
> the IRP two times like this:
>
> update fileobject name for file1;
> update IRP parameters;
> set completion routine1;
> call IoCallDriver(lower-device);
> wait event;
>
> update fileobject name for file2;
> update IRP parameters;
> clear completion routine;
> call IoCallDriver(lower-device);
> return status;
>
> Thank you very much for your important comments,
>
> Shangwu
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@vmware.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@vmware.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@vmware.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
>
–
The reasonable man adapts himself to the world;
The unreasonable one persists in trying to adapt the world to himself.
Therefore all progress depends on the unreasonable man.
–George Bernard Shaw