Hi Experts,

I am getting an exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
This exception is occuring in VS2010 and method is Marshal.Copy(address, code, 0, 32);

Can you any one help in this regard.

Thanks

Recommended Answers

Are you trying to access a memory address that is outside of the scope of your application and any loaded dlls?

Jump to Post

All 2 Replies

Need to see some more of you code in order to help, but it might be the case that the address is pointing to a memory location to which there is no access. Have you checked if this is the case?

Are you trying to access a memory address that is outside of the scope of your application and any loaded dlls?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.