OSRLogo
OSRLogoOSRLogoOSRLogo x Seminar Ad
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Sat, 18 May 2013     98499 members

   Login
   Join


 
 
Contents
  About This Site
What's New?
OSR Dev Blog
The NT Insider
The Basics
File Systems
Downloads
ListServer / Forum
Driver Jobs
Store
  Express Links
  · WdfSend: Are There REALLY Three Useful Variants?
  · Turning a Breakpoint into a Busypoint
  · Investigating a NULL Pointer Dereference
  · Understanding WDFMEMORY Objects
  · Using WinDbg to hunt for strings

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,
            UserMode,
            MmNonCached,
            NULL,
            FALSE,
            NormalPagePriority);

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

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.

Windows Internals and SW Drivers
LAB

Santa Clara, CA
5-9 Aug 2013

Kernel Debugging & Crash Analysis
LAB

Santa Clara, CA
9-13 Sep 2013

Writing WDF Drivers
LAB

Boston/Waltham, MA
7-11 Oct 2013

Developing File Systems
Seattle, WA
5-8 Nov 2013

 
 

Windows Debugger
V6.12.2.633 -- 26 Feb 10

Checked Build Downloads
29-Apr-10

Debugging Symbols

 

WDK Doc Updates
Now updated bi-monthly!

Windows WDK
V7.1.0 -- 26 Feb 10

 
 
x
LetUsHelp
 

Need to develop a Windows file system solution?

We've got a kit for that.

Need Windows internals or kernel driver expertise?

Bring us your most challenging project - we can help!

System hangs/crashes?

We've got a special diagnostic team that's standing by.

Visit the OSR Corporate Web site for more information about how OSR can help!

 
bottom nav links