hProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, pid)
if (hProcess)
{
//OpenProcess called OK
}
else
{
//OpenProcess returned FAIL (possibly privilege issue?)
}
And why are you passing in a string as the 'lpBuffer' ..."1234" (string) is
not the same as 1234 (integer).
1234 as 32 bit integer = 0000000000000000 0000 0100 1101 0010
"1234" as string = ascii value of "1" for first byte, "2" for second byte, etc
anyway, not the same bit representation.
msdn for WriteProcessMemory():
http://msdn.microsof*****m/en-us/libr...=vs.85%29.aspx
BOOL WINAPI WriteProcessMemory(
_In_ HANDLE hProcess,
_In_ LPVOID lpBaseAddress,
_In_ LPCVOID lpBuffer,
_In_ SIZE_T nSize,
_Out_ SIZE_T *lpNumberOfBytesWritten
);
Check the return value from OpenProcess() and update post please.
^^if this is working, please try to change the value you're writing...the type should match (or match enough to be castable) the function declaration above (ie. a pointer type..not a string literal).
edit
Photo attachment hadn't been approved when I made my post.
The several small integers +'d together should have been a hint (...why not just combine them into 1 number..)
but who am I to tell you how to create your integers.
OP said "Adresses are okay" ...
obviously not, and I'm not explaining how to follow a pointer list for the millionth time, to someone who doesn't understand the basics.
GL op.