*/
public static int writeIntToAddress(HANDLE handle, int address, int value) {
Memory memory = new Memory(4);
memory.setInt(0, value);
IntByReference readByteNumber = new IntByReference();
KERNEL.WriteProcessMemory(handle, ateConstant(address), memory, 4, readByteNumber);
Value();
}
/**
* 读取指定地址的int值
* @param handle    程序句柄
* @param address  地址
* @return  值
*/
public static int readIntOfAddress(HANDLE handle, int address) {
Memory memory = new Memory(4);
IntByReference readByteNumber = new IntByReference();
KERNEL.ReadProcessMemory(handle, ateConstant(address), memory, 4, readByteNumber);
Int(0);
}
/**
* 读取指定地址的int值
* @param handle    程序句柄
* @param pointer  地址
* @return  值
*/
public static int readIntOfPointer(HANDLE handle, Pointer pointer) {
Memory memory = new Memory(4);
IntByReference readByteNumber = new IntByReference();
KERNEL.ReadProcessMemory(handle, pointer, memory, 4, readByteNumber);
Int(0);
}
/**
* 读取指定地址的int值
* @param pointer  地址
* @return  值
*/
public static int readIntOfExPointer(ExPointer pointer) {
Memory memory = new Memory(4);
IntByReference readByteNumber = new IntByReference();
KERNEL.Handle(), Pointer(), memory, 4, readByteNumber);
Int(0);
}
/**
* 读取指定地址的double值
* @param exPointer  地址
* @return  值
*/
public static double readDoubleOfExPointer(ExPointer exPointer) {
Memory memory = new Memory(8);
IntByReference readByteNumber = new IntByReference();
KERNEL.Handle(), Pointer(), memory, 8, readByteNumber);        Double(0);
}
/**
* 读取指定地址的float值
* @param exPointer  地址
* @return  值
*/
public static float readFloatOfExPointer(ExPointer exPointer) {
Memory memory = new Memory(8);
IntByReference readByteNumber = new IntByReference();
KERNEL.Handle(), Pointer(), memory, 8, readByteNumber);        Float(0);
}reference group

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。