In a WDM miniport audio driver, I am trying to handle custom IOCTL by
registering a customer interface (using IoRegisterDeviceInterface),
enumerating it via SetupDiXXX functions in user mode and using
CreateFile to open it.
Registration and enumeration all goes well (I verified this via
WinDbg, registry and WinObj).
However, CreateFile() fails with error code 2 (ERROR_FILE_NOT_FOUND).
When examining the custom CreateHandler that intercepts the
IRP_MJ_CREATE call, I was surprised to find out that pIoStackLocation-
>FileObject->FileName.Buffer is NULL.
Why? What would make it NULL?
I thought that it should contain PSP_INTERFACE_DEVICE_DETAIL_DATA's
DevicePath that was passed to CreateFile as the first parameter and
contained fully valid (and verified) symbolic link name:
"\\?\root#media#0000#{GUID-generated-by-GuidGen}"
Any clue to how to even start debugging something like this?
Thanks,
Don