Can you lock memory mapped file pages for access at Dispatch level

Hi,

I’d like to use a memory mapped file using ZwCreateSection and ZwMapViewOfSection but I have the definite requirement of accessing the memory in the post operation method at dispatch level. Is there a way to use a mdl locking method to lock the desired page(s) in memory for safe access at dispatch level?

Russel McDonald

>Is there a way to use a mdl locking method to lock the desired page(s) in

memory for safe access at dispatch level?

Sure. You can just:

IoAllocateMdl()
MmProbeAndLockPages()
MmGetSystemAddressForMdlSafe()

The MDL APIs are designed to let you lock just about anything. If you think
about it, they HAVE to work this way otherwise you would always have to
“know” what kind of buffer was sent to your driver before building an MDL to
it.

-scott

Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntfsd…

Hi,

I’d like to use a memory mapped file using ZwCreateSection and
ZwMapViewOfSection but I have the definite requirement of accessing the
memory in the post operation method at dispatch level. Is there a way to use
a mdl locking method to lock the desired page(s) in memory for safe access
at dispatch level?

Russel McDonald