Hello and thank you very much for your help!
In my c++ code I have some embedded assembler code and at the line [mov ecx,1AF858h] an error message keeps popping up saying “Access violation”. It works perfectly with Windows XP but unfortunately not with Windows 7.
I don’t understand what causes the problem and I would like to know what I need to do to fix it.
Kind Regards, David
You need to use VirtualProtect/VirtualProtectEx to mark your byte array as executable or allocate it with VirtualAlloc using the correct flags (probably
PAGE_READWRITEwhen writing the code and thenPAGE_EXECUTE_READ). Note that it will probably need to be done on a page basis.