Click here to Skip to main content
11,929,675 members (50,208 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ Driver protected WDK
Hi, I am developing driver for automated Win 7 environment. I need to execute some commands within given interval. I would like to achive this using queuing APC routine from my driver to user mode process. But APC fails due to executing code from RW only memory allocated using IoAllocateMdl, locked with MmProbeAndLockPages and mapped into user mode. Is there any way how to change protection of allocated pages?

Posted 9-Jun-12 5:26am
Code-o-mat 10-Jun-12 6:38am
I'm not into driver development, but in user space you would probably use VirtualProtect(Ex) ( ) to achieve this task. You could try finding the corresponding kernel methods for that.
patrik polakovic 10-Jun-12 13:52pm
There is system call ZwProtectVirtualMemory, which is undocumented. But there must be a way how achieve this "properly".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 9 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100