Re: Don't receive IRP_MJ_CREATE on a CreateFile



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: WinCE USB
    ... do a CreateFile( ... If it's a storage card driver, ... If it's a network USB device, ... SetupDiEnumDeviceInterfaces() ...
    (microsoft.public.windowsce.platbuilder)
  • Re: USB Testing
    ... I have no idea if the port is displayed in a GUI or is in the ... Trying to do a CreateFile in XP...As I said above, ... As for using CreateFilefrom XP, I used the device ID for the USB ... WCEUSBSH driver to load. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CreateFile performance
    ... If many applications are calling driver, ... context need a separate handle or duplicate handle for CreateFile. ... CreateFile() for each process context. ... more than one packet from driver to user mode. ...
    (microsoft.public.development.device.drivers)
  • Re: About the settings in CreateFile
    ... sharing modes really apply to file systems, ... But I still have confusion in sharing mode of CreateFile. ... If the dispatch routine for IRP_MJ_CREATE in my driver always returns ... > called in the driver there is no IOCTL present here. ...
    (microsoft.public.development.device.drivers)
  • Re: WinCE USB
    ... do a CreateFile( ... If it's a storage card driver, ... If it's a network USB device, it should provide an IP to ... SetupDiEnumDeviceInterfaces() ...
    (microsoft.public.windowsce.platbuilder)