ND
Tue May 06 07:44:07 CDT 2008
Hi,
I found following reply.
Yes i can know through IRP_MJ_WRITE..But how to pre-determine number of
IRP_MJ_WRITE requests .Since ,I need to lock a file when write operation
starts and need to free at end of write operation.
Simply,I need to lock a file until copy or write operation ends.Otherwise
how to avoid dispatch routine to be called many times for single copy
operation.
Looking forward to hear from you.
Thanks
ND
"Don Burn" wrote:
> You have no way of knowing about copy operations, all you can know is that
> something is being read or written. Even if you figured out for the shell
> what the copy rules were, they would be different for CMD.EXE and then for
> any other program.
>
>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Website:
http://www.windrvr.com
> Blog:
http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "ND" <ND@discussions.microsoft.com> wrote in message
> news:1BCB184F-5028-40A1-8B73-885DDF98B0BE@microsoft.com...
> >
> > I am writing a virtual disk driver which uses a file as a virtual disk.
> >
> > The disk file can be mounted with a drive letter and normally used.
> > Internally,
> > ZwReadFile and ZwWriteFile in the dispatch routine for IRP_MJ_READ and
> > IRP_MJ_WRITE do
> > the job to write on and read from "disk". As far, everything works
> > fine.
> >
> > In this ,after mounting in explorer window if i make any file copy
> > operation,IRP_MJ_WRITE was called.
> >
> > Also,IRP_MJ_WRITE was called many times after i copied a single file.So my
> > question is,
> > How many IRPs will be sent for file copy operation.How the IRPs are formed
> > by IO manager.
> > How i can trace start and end of copy operation.
> >
> > since,in IRP_MJ_WRITE ,I am writing into a file.Also this file is shared
> > between two driver instances.
> >
> > Looking forward to get reply.
> >
> > Thanks ,
> > ND
> >
> >
>
>
>