MmMapLockedPages... Fails !!!!

Hi all,

I am trying to map device memory to user level…
'am facing the following problem…

First, I call mmMapIoSpace() to get Kernel Virtual Address for the device
mem…(till this point i think it’s o.k.)

then i call IoCreateMdl()… following which I call MmProbeAndLockPages()…
all these calls return success…

After this I call MmMapLockedPages(){or MmMapLockedPagesSpecifyCache()}
but these routines hang the system…
The Error code (which I get on debugger) is => 0xC0000141
(Which is INVALID_ADDRESS)… ???

Can anyone help me out of this???
Does any document clearly explain the flow of these calls ???

Thanx …

SP.