首页
社区
课程
招聘
[求助]求教 VirtualProtetct相关
发表于: 2014-5-25 20:47 3161

[求助]求教 VirtualProtetct相关

2014-5-25 20:47
3161
唔VirtualProtetct对内存的修改是不是以页位单位啊  我对某个地址修改1个字节为PAGE_NOACCESS  结果在这个地址前面好远就直接触发了访问违规?

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 90
活跃值: (92)
能力值: ( LV5,RANK:60 )
在线值:
发帖
回帖
粉丝
2
The region of affected pages includes all pages containing one or more bytes in the range from the lpAddress parameter to (lpAddress+dwSize). This means that a 2-byte range straddling a page boundary causes the protection attributes of both pages to be changed.
某个页面只要有一个字节在lpAddress到lpAddress+dwSize范围内,这个页面就会受到影响,不过The pages cannot span adjacent reserved regions that were allocated by separate calls to VirtualAlloc or VirtualAllocEx using MEM_RESERVE.不能跨过两次分配的不同的内存区域。
2014-5-25 21:39
0
雪    币: 74
活跃值: (243)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
果然是按页分配的么....那只能用PAGE_GUARD试试了   谢谢了的说
2014-5-25 21:50
0
游客
登录 | 注册 方可回帖
返回
//