Yes, in C you do (C is evil). So the code is correct.
Additionally, as others have told you, you may want to return a value to indicate success or failure:
If the reads/writes succeed, it will return TRUE, otherwise FALSE. That way you know if they failed. Even if you don't use it in your code, you can use it to debug your app if you think the read/writes are wrong.Code:BOOL getMouse(struct vect2d* mVect)
{
return ( ReadProcessMemory(hand, (void*)0x4BD7D4B8, &mVect->h,4, &bytes) &&
ReadProcessMemory(hand, (void*)0x4BD7D4BC, &mVect->v,4, &bytes) );
}
BOOL setMouse(struct vect2d* mVect)
{
return ( WriteProcessMemory(hand, (void*)0x4BD7AF00, &mVect->h,4, &bytes) &&
WriteProcessMemory(hand, (void*)0x4BD7AF04, &mVect->v,4, &bytes) );
}