得到“执行".内存区域的权限 [英] Getting "execute" permission for an area of memory
本文介绍了得到“执行".内存区域的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用C ++,并且想获得在内存区域执行的许可.有办法吗?现在,当我尝试执行它时,会出现访问冲突错误.
I am using C++, and would like to get the permission to execute on an area of memory. Is there a way I can do this? Right now when I just try to execute it, I get an access violation error.
推荐答案
在Windows上,该功能为 PAGE_EXECUTE_READWRITE 以获得执行权限.
On Windows the function is VirtualProtect, you'll want to pass in PAGE_EXECUTE_READWRITE to get execute permission.
默认情况下,Windows不允许内存.它称为数据执行保护(DEP)
By default Windows does not allow memory. It's called Data Execute Prevention (DEP).
这篇关于得到“执行".内存区域的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文