#include #include #include /* THIS IS JUST SOME BOILER-PLATE TO ALLOW THE EXAMPLE CODE TO WORK, NOTHING INTERESTING HERE */ template T readMemory(DWORD address) { return *((T*)address); } template T* pointMemory(DWORD address) { return ((T*)address); } template void writeMemory(DWORD address, T value) { *((T*)address) = value; } template DWORD protectMemory(DWORD address, DWORD prot) { DWORD oldProt; VirtualProtect((LPVOID)address, sizeof(T), prot, &oldProt); return oldProt; } struct _creature { _creature(int hb, bool e, bool c) : healthBar(hb), isEnemy(e), isCloaked(c) {} int healthBar; bool isEnemy, isCloaked; }; void NOPExample(); void callHookExample(); void VFHookExample(); void IATHookExample();