Click here to Skip to main content
Rate this: bad
good
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?
 
~PP~
Posted 9-Jun-12 5:26am
Comments
Code-o-mat at 10-Jun-12 6:38am
   
I'm not into driver development, but in user space you would probably use VirtualProtect(Ex) ( http://msdn.microsoft.com/en-us/library/windows/desktop/aa366898%28v=vs.85%29.aspx ) to achieve this task. You could try finding the corresponding kernel methods for that.
patrik polakovic at 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
0 Richard MacCutchan 269
1 Aajmot Sk 252
2 Marcin Kozub 235
3 Sergey Alexandrovich Kryukov 185
4 Praneet Nadkar 167
0 OriginalGriff 7,913
1 Sergey Alexandrovich Kryukov 7,232
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,865


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 9 Jun 2012
Copyright © CodeProject, 1999-2014
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