You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
apex_dma_kvm_pub/vmread/hlapi/pointers.h

28 lines
329 B
C

4 years ago
#ifndef POINTERS_H
#define POINTERS_H
#include "hlapi.h"
template<typename T, WinProcess*& P>
struct vptr
{
uint64_t addr;
T value;
vptr(uint64_t address)
{
Init(address);
}
inline void Init(uint64_t address)
{
addr = address;
}
inline T& operator* () {
value = P->Read<T>(addr);
return value;
}
};
#endif