IoCreateFile Invalid Parameter

Hello,

I am getting a sporadic failure in IoCreateFile call, with Invalid
Parameter status. The call is identical to a ZwCreateFile call that
succeeds.

The parameters are the bare minimum:
Generic Read (tried File Read Data, to same effect)
Share Read
Sync/NonDir, OpenOnly, NULL for unneeded parameters.

Any idea what is up? The path is a local one, and as mentioned, a
ZwCreateFile call works with the same parameters.

The reason for IoCreateFile is that I want share access ignored, but
the flag is not set up yet, so it is not the reaaon of the failure.

Dejan.

I usually go for the status debugging trick in cases like this:

https://www.osr.com/blog/2018/10/17/ntfs-status-debugging/

If it doesn’t fire then the I/O Manager must be the unhappy one