Ok i've created basic DLL and DLL Injector/Loader which the DLL calls on a function called CreateRemoteThread inside the target process i was wondering how
to code DLL to read/write to memory

so e.g. lets say my target process is:
int main()
{
int mytest = 2;

system("PAUSE");
return EXIT_SUCCESS;
}

How would i code a DLL to read ''mytest'' variable and display it and also write to it e.g. changing it to lets say 10


Thanks for taking your time reading
Any tips/help would be much appreciated

/PoZ