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.
+1
A:
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).
shf301
2010-07-15 01:37:29