OSRLogoOSRLogoOSRLogo x Seminar Ad

Everything Windows Driver Development

GoToHomePage xLoginx

    Thu, 14 Mar 2019     118020 members


  Online Dump Analyzer
OSR Dev Blog
The NT Insider
The Basics
File Systems
ListServer / Forum
  Express Links
  · The NT Insider Digital Edition - May-June 2016 Now Available!
  · Windows 8.1 Update: VS Express Now Supported
  · HCK Client install on Windows N versions
  · There's a WDFSTRING?
  · When CAN You Call WdfIoQueueP...ously

MmMapLockedPages(SpecifyCache) with AccessMode == UserMode

It's seem that there's been some info missing from the DDK documentation for quite a while.

When you call either MmMapLockedPagesSpecifyCache or the (now deprecated) MmMapLockedPages, and you specify UserMode (to map the pages into the user address space), you must wrap this call with an exception handler.

So, for example:

    __try {
        mappedVa = MmMapLockedPagesSpecifyCache(myMdl,

        NTSTATUS code;
        code = GetExceptionCode();
        DbgPrint("Call to MmMapLocked failed due to exception 0x%0x\n",

Related Articles
Change to Allow Page Mapping in XP

User Comments
Rate this article and give us feedback. Do you find anything missing? Share your opinion with the community!
Post Your Comment

Post Your Comments.
Print this article.
Email this article.
bottom nav links