From: rech on
Hi friend

I hava a question about MmGetSystemAddressForMdlSafe function.
This Function can translate a virtual address range, which is
described by the MDL at Irp->MdlAddress, for a user buffer to a system-space
address range.
The Question is after I map the user buffer to kernal space by this
function, do I need to unmap the buffer and how to do that?
On my understand ,Mapping a buffer means allocate system page
entries to discribe the relationship of virtual address and phycial address.
if we don't need the map ,we must free the system page entries ,unmapping.
But after search the DDK, I find the DDK does not metain the unmapping
in this case:

it said the call sequence is:

MmProbeAndLockPages

MmGetSystemAddressForMdlSafe

MmUnlockPages

IoFreeMdl

Can somebody explain for me ?


thanks very much!!



rech

From: Maxim S. Shatskih on
> The Question is after I map the user buffer to kernal space by this
> function, do I need to unmap the buffer and how to do that?

Usually no, MDL destruction will do this.

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

 | 
Pages: 1
Prev: WinXp DTM Client
Next: slow boot windows xp