Re: IRP Create

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Anton's excellent answer explains your question well. To go beyond that be
aware that there is nothing stopping the system for opening the file, doing
a bunch of writes, then doing a rename operation, then do other operations.
Tracking file names is hard, the examples in WDK/IFS kit show a large
amount of effort in handling these cases.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply



<soviet_bloke@xxxxxxxxxxx> wrote in message
news:1164982936.301308.296210@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The I/O Manager knows from the very beginning what it is up to when it
issues the appropriate commands for a specific file operation.

What makes you believe so????

IO Manager issues requests to FS driver in response to native API calls
that are made by the client code, so that IRP_MJ_CREATE is the result
of ZwCreateFile() call, and IRP SET_INFORMATION is result of
ZwSetInformationFile()call. How is IO Manager supposed to know which
particular function the client code is about to call next while it
processes ZwCreateFile() call???


Now my question: Is there a way to find the kind of operation that is
going
to be performed (eg read, write, rename) when an IRP Create operation is
issued?

Hopefully, by now you already understand that the question in itself is
just illogical

Anton Bassov

Beat Muller wrote:
About a month ago I asked how to correctly terminate an IRP Create
operation. Thank you very much for your replies, Don Burn and Maxim
Shatskih! So far they didn't help me a great deal, BUT please read on!

Your remark, Don Burn, that files can be renamed made me pondering a lot
and
for quite a while in our app I didn't come across a situation where that
could happen until I found that download managers indeed do rename files
when downloading is finished. Renaming starts with an IRP Create
operation
but so far I have to wait for an IRP SET_INFORMATION operation in order
to
find out whether a rename op is taking place or not. My app works
perfectly
that way but I'm not so happy with my code.

The I/O Manager knows from the very beginning what it is up to when it
issues the appropriate commands for a specific file operation.

Now my question: Is there a way to find the kind of operation that is
going
to be performed (eg read, write, rename) when an IRP Create operation is
issued?

I didn't find a hint in Walter Oney's Driver book.

Any suggestions would be highly appreciated.

Michael Keller



.



Relevant Pages

  • Re: IRP Create
    ... issues the appropriate commands for a specific file operation. ... IO Manager issues requests to FS driver in response to native API calls ... to be performed (eg read, write, rename) when an IRP Create operation is ...
    (microsoft.public.development.device.drivers)
  • Re: Driver Verfier issue with WDM driver on Windows 7
    ... The IO manager has caught a misbehaving driver. ... Invalid Device object passed to IoCallDriver ... NTSTATUS MySystemControl(IN PDEVICE_OBJECT fdo, IN PIRP Irp) ...
    (microsoft.public.development.device.drivers)
  • Re: Any reason to install update 1 if youre not using C++?
    ... The project manager now supports moving a file outside of its parent directory in order to change the build order. ... Rename Refactoring had known problems when trying to rename components that were managed by the VCL designer. ... Any reason not to? ...
    (borland.public.delphi.non-technical)
  • Re: More status woes
    ... The IO Manager uses the return value and the value in the IO_STATUS block. ... dispatch routine - return ... The originator who sends an IRP, ...
    (microsoft.public.development.device.drivers)
  • Re: Driver Verfier issue with WDM driver on Windows 7
    ... The IO manager has caught a misbehaving driver. ... Invalid Device object passed to IoCallDriver ... NTSTATUS MySystemControl(IN PDEVICE_OBJECT fdo, IN PIRP Irp) ...
    (microsoft.public.development.device.drivers)