Question about writing to memory

Posts 1–3 of 3 · Page 1 of 1
Question about writing to memory
I'm very new to C++ I just recently switched over from C# so I have prior knowledge and know the basics of C++ and a little bit more. Any who I was looking at an example when I was building my application to modify memory as a start and a base for future projects and this was the code used for the example.
if(WriteProcessMemory(hProcess, (LPVOID)0x57C2A4, &newdata, newdatasize, NULL))
Why are they using a reference for newdata instead of a pointer to the buffer like stated on the msdn documentation?
A reference to i.e. some array is basically a pointer.

i.e:
char buff[10];
char * ptr = &buff[0];
char * ptr2 = buff;
then ptr==ptr2
You should import WinAPI via DllImport. From there you can use the same API as in c++ for reading the memory of an other process.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?