c - change a pointer of address of another application -
i need edit title, can't find better title.
assume have simple program called source.exe
:
#include <stdio.h> int main() { int = 5; printf("%p", &a); return 0; }
i want write application, change.exe
, changes a
in above.
i tried this:
int main() { int * p = (int*) xxx; // xxx have printed above *p = 1; printf("%d", *p); return 0; }
it doesn't work. assuming have administrator rights, there way i've tried above? thanks.
in first place, when run second program, a
in first long gone (or loaded in different position). in second place, many os's protect programs loading them in separate spaces.
what seem looking inter-process communication (ipc) mechanisms, shared memory or memory-mapped files.
Comments
Post a Comment