Showing the value of Readprocessmemory C++

Asked

Viewed 155 times

0

once I used the function below:

  BOOL readyProcessMe = ReadProcessMemory(process, (LPCVOID)memory, &value, 4, 0);

How can I show the correct value on a label?

  • It seems that the Value will be in the value variable, after the function is called, if the BOOL return is TRUE

  • yes. this I know. now I want to know how to show . pq to doing LPCWSTR(value) in a messagebox but comes empty with nothing :(

  • When debugging there, is the value value filled there? Then add to the question the code that calls the messagebox, to see what there is.

1 answer

1

When you do LPCWSTR(value) you are the variable value as a pointer, and therefore starts referencing a memory address.

You have to convert value, which must be a 32-bit integer, for a string, for example, using the function sprintf, and then put this string on the label.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.