Hi, I'm writing a network driver based on passthru sample. I want to
add ReadFile function. I saw a sollution in the other sample (called
ndisuio) so I try to do it in the same way. But in ...ServiceReads
funtion Irp->MdlAddress is NULL. I don't have any idea why. I checked
that in Ndisuio there's no function like MmBuildMdlForNonPagedPool or
MmProbeAndLockPages, is it ok (I read DDK and they seem to be
necessary) ? Second question : Irp->UserBuffer isn't NULL - can I use
it instead of MdlAddress?

Re: Irp->MdlAddress is NULL by Maxim

Maxim
Thu Aug 03 04:17:44 CDT 2006

Do not forget to do:

DeviceObject->Flags |= DO_DIRECT_IO;

otherwise, IO manager will not fill ->MdlAddress.

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

"Marvin" <mathias_k14@yahoo.com> wrote in message
news:1154561739.866382.10630@p79g2000cwp.googlegroups.com...
> Hi, I'm writing a network driver based on passthru sample. I want to
> add ReadFile function. I saw a sollution in the other sample (called
> ndisuio) so I try to do it in the same way. But in ...ServiceReads
> funtion Irp->MdlAddress is NULL. I don't have any idea why. I checked
> that in Ndisuio there's no function like MmBuildMdlForNonPagedPool or
> MmProbeAndLockPages, is it ok (I read DDK and they seem to be
> necessary) ? Second question : Irp->UserBuffer isn't NULL - can I use
> it instead of MdlAddress?
>


Re: Irp->MdlAddress is NULL by Marvin

Marvin
Fri Aug 04 09:32:15 CDT 2006

Ok, now it works:)
Thanks a lot Maxim for your help.