Re: Don't receive IRP_MJ_CREATE on a CreateFile



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

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Thierry Murail" <yarglah@xxxxxxxxxxx> wrote in message
news:45640757$0$1993$426a74cc@xxxxxxxxxxxxxxx
Gianluca Varenni wrote:

I use CreateFile on my device to DeviceIoControl on it.
But AFAI understand I should receive IRP_MJ_CREATE on CreateFile and
CLEANUP
& CLOSE on CloseHandle (am I right ?) but my driver does not receive
these events. But it receive these from other time (maybe explorer.exe).

How do you know that you are receiving IRP_MJ_CREATE requests from
explorer.exe?

It's a DEVICE_DISK and I supposed explorer try to access it.
In fact it's "System" that make these IRP every 5 minutes (IrpTracker is
my
friend :-)

What kind of driver are you working on?

FILE_DEVICE_DISK (based on Ramdisk sample)

You are saying that you are calling CreateFile on your device (e.g.
\\.\Global\MyDriver), and you don't see the corresponding MJ_CREATE
request. Is createfile succeeding?

Yes, and Ioctl requests too.
I CreateFile on the symlink created by the driver, (the drive letter \\
\H:). Another user program ("consumer") just read/write on the device and
there's also no IRP_MJ_CREATE/CLEANUP/CLOSE.





.



Relevant Pages

  • Re: CreateFile failed in limited user account with error code 5(Access Denied)??
    ... Please do not send e-mail directly to this alias. ... > I have my own Driver and Application. ... > The CreateFile Fails with Error Code 0xC0000005, ... > Is this something to change in the CreateFile or IoCreateDevice. ...
    (microsoft.public.development.device.drivers)
  • Re: CreateFile failed in limited user account with error code 5(Access Denied)??
    ... Please do not send e-mail directly to this alias. ... I have my own Driver and Application. ... The CreateFile Fails with Error Code 0xC0000005, ... Is this something to change in the CreateFile or IoCreateDevice. ...
    (microsoft.public.development.device.drivers)
  • Re: Dont receive IRP_MJ_CREATE on a CreateFile
    ... & CLOSE on CloseHandle but my driver does not receive ... Is createfile succeeding? ... Yes, and Ioctl requests too. ...
    (microsoft.public.development.device.drivers)
  • Re: Failed to open USB device using CreateFile: ERROR_FILE_NOT_FOUND
    ... are you sure your driver is processing IRP_MJ_CREATE and completing it with status_success? ... Please do not send e-mail directly to this alias. ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Can any body tell me why my CreateFile failed? ...
    (microsoft.public.development.device.drivers)
  • Re: WdfRequestForwardToIoQueue
    ... WdfIoQueueGetState will tell you how many requests are in the queue, how many are owned by the driver, etc. ... Please do not send e-mail directly to this alias. ...
    (microsoft.public.development.device.drivers)