Awesome! Thanks for the info Elysia and laserlight! Got it working now.
I'm now doing this successfully:
Code:
struct vect2d
{
float h;
float v;
};
void getMouse()
{
struct vect2d mVect;
ReadProcessMemory(hand, (void*)0x4BD7D4B8, &mVect.h,4, &bytes);
ReadProcessMemory(hand, (void*)0x4BD7D4BC, &mVect.v,4, &bytes);
}
void setMouse()
{
struct vect2d mVect;
WriteProcessMemory(hand, (void*)0x4BD7AF00, &mVect.h,4, &bytes);
WriteProcessMemory(hand, (void*)0x4BD7AF04, &mVect.v,4, &bytes);
}
//Then in main, call the functions
Just for clarification, do these mean the same thing?:
Code:
void getMouse()
{
struct vect2d mVect;
ReadProcessMemory(hand, (void*)0x4BD7D4B8, &mVect.h,4, &bytes);
ReadProcessMemory(hand, (void*)0x4BD7D4BC, &mVect.v,4, &bytes);
}
Code:
void getMouse(struct vect2d* mVect)
{
ReadProcessMemory(hand, (void*)0x4BD7D4B8, &mVect.h,4, &bytes);
ReadProcessMemory(hand, (void*)0x4BD7D4BC, &mVect.v,4, &bytes);
}