I'd like to read memory process in C#. I made something similar in C++, but i don't see function in C#? Can someone give simple read process memory example? Do i need to add some usings or references?
.NET has a Process class but it doesn't offer any read/write process memory functionality. You will have to PInvoke the Win32 functions ReadProcessMemory / WriteProcessMemory.
You likely need to add the following using
because that's the namespace where DllImportAttribute is declared.
In addition you should use IntPtr for dwSize and lpNumberOfBytesRead because in Win32 they are SIZE_T, this means 32 bit on x86 and 64 bit on x64.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?