Re: Don't receive IRP_MJ_CREATE on a CreateFile




"Thierry" <yarglah@xxxxxxxxxxx> wrote in message
news:45656b6e$0$2291$426a74cc@xxxxxxxxxxxxxxx

"Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx> a écrit dans le message
de news: ufFl64qDHHA.3396@xxxxxxxxxxxxxxxxxxxxxxx
if there is a filesystem mounted on the driver, you will not see create
irps, the FS will. you will only see absolute reads/writes to the
disk/volume

Ok, so the CREATE/CLOSE I see are from the FS ?

I use shared memory between user and kernel
(http://www.osronline.com/article.cfm?id=39) and I have to unmap the
buffer when the app. gone... I can't rely on a "release" IOCTL because
app can crash or be killed by user so do you see the best way I can
unmap/clean without IRP_MJ_CLEANUP/CLOSE ?


Welcome to one of the many reasons not to use shared memory. Instead of
shared memory use an IOCTL, to communicate, then you will recieve a cancel
for the IRP to be notified. Note: while it still has all the other
problems (besides process termination notification) you can use an IOCTL to
fake shared memory. The IOCTL is defined with METHOD_OUT_DIRECT and the
buffer passed in is "the shared memory region" you use to communicate.


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



.



Relevant Pages

  • Re: share memory between user and kernel?
    ... > Is possible to share memory between user and kernel? ... But user thread isn't fast enough so I accumulate a lot of data ... If I can somehow copy the data into a shared memory then I ... > don't need to worry about slow read IRPs. ...
    (microsoft.public.development.device.drivers)
  • Re: kvm_read() vs ioctl performance
    ... overhead, assuming that the ioctl call is to a ... tried a shared memory page? ... same result with a stable API which is not libkvm... ...
    (freebsd-current)
  • Re: kvm_read() vs ioctl performance
    ... overhead, assuming that the ioctl call is to a ... tried a shared memory page? ... (which is why a shared page might give the same result with a stable API which is not libkvm... ...
    (freebsd-current)
  • Re: Dont receive IRP_MJ_CREATE on a CreateFile
    ... shared memory use an IOCTL, to communicate, then you will recieve a cancel ... problems (besides process termination notification) you can use an IOCTL ... the buffer passed in is "the shared memory region" you use to communicate. ...
    (microsoft.public.development.device.drivers)