Click here to Skip to main content
13,191,877 members (41,925 online)
Rate this:
Please Sign up or sign in to vote.
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 4: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 |
Web04 | 2.8.171017.2 | Last Updated 9 Jun 2012
Copyright © CodeProject, 1999-2017
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