开发者

Getting "execute" permission for an area of memory

开发者 https://www.devze.com 2023-01-07 14:06 出处:网络
I am using C++, and开发者_C百科 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

I am using C++, and开发者_C百科 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.


On Windows the function is VirtualProtect, you'll want to pass in PAGE_EXECUTE_READWRITE to get execute permission.

By default Windows does not allow memory. It's called Data Execute Prevention (DEP).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号