How attach process through PID

Hello

I want attach process through PID (Process id),

For Example:
if user enter PID in program then require process automatically attached..
and this ( 0014D5 and 0014D6 and 0014D7 ) is address Change "Nop's" (write) From memory,

Please Help Me,

write a source code program for me,,


i have already try this code but this work on take process via process name, i want this program work via enter process PID, user can enter pid, then change the address,

#include <iostream>
#include <windows.h>

int main()
{
int newValue = 500;
HWND hWnd = FindWindow(0, TEXT("sfrXWBJ") );

if (hWnd == 0) {
fprintf(stderr, "Cannot find window.");
} else {
DWORD pId;
GetWindowThreadProcessId(hWnd, &pId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

if (!hProc) {
fprintf(stderr, "Cannot open process.");
} else {
int isSuccessful = WriteProcessMemory(hProc, (LPVOID)0x0177520E, &newValue, (DWORD)sizeof(newValue), NULL);

if (isSuccessful > 0) {
puts("Process memory written.");
} else {
fprintf(stderr, "Cannot write process memory.");
}

CloseHandle(hProc);
}
}
getchar();
return 0;
}



my English is not goog
Just because you post twice doesnt mean you'll get more response, in fact most likely because of this you won't get any response.
http://www.cplusplus.com/forum/general/265089/
Last edited on
Topic archived. No new replies allowed.