emartel
emartel

Reputation: 7773

Visual Studio 2010 - Memory Window - Edit Value

I tried looking on MSDN, Google and Stack Overflow and I couldn't find an answer to what I'm looking for.

Is there a way to edit, through the Memory Window, the code at a given address? I use the Disassembly Window to get the address of the instruction I would like to overwrite, find it in the Memory Window but "Edit Value" is grayed out. Any reason why? Is it because my code gets cached and VS prevents me to edit it? Is there a way to change that through project settings?

Thank you

Upvotes: 2

Views: 696

Answers (1)

Dialecticus
Dialecticus

Reputation: 16761

The application is consisted of data parts and executable parts of code. Windows forbids the changes to executable parts by default, but this can be changed from the code with VirtualProtect function (also pay attention to remarks and FlushInstructionCache).

Maybe your ultimate goal is not to change some code from debugger, but something else that can be achieved differently. What do you really want?

Upvotes: 2

Related Questions