Re: Query On IoCreateDevice ???

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



the value in IoGetCurrentIrpStackLocation(irp)->FileObject->FileName
is always NULL.

It is non-NULL only in PreCreate path.

Also, if you have symlink like \??\MySymlink pointing to \Device\MyDevice, then
you must pass \\.\MySymlink\MyRefString to CreateFile.

In this case, IoGetCurrentIrpStackLocation(irp)->FileObject->FileName in
PreCreate (MJ_CREATE before IoCallDriver down) will be \MyRefString

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

.