c# - Hooking Direct X Endscene in Direct X 11 game -
i have memory reading in game , injection. however, avoid race conditions, need inject asm code endscene.
previously have used code:
uint d3d9_device; d3d9_device = memory.read<uint>(memory.baseaddress + direct3d9__device); d3d9_device = memory.read<uint>(d3d9_device + direct3d9__device__offseta); d3d9_device = memory.read<uint>(d3d9_device); d3d9_device = memory.read<uint>(d3d9_device + direct3d9__device__offsetb);
to access dx9 device, , find endscene using reversed offsets.
however, in windows 7, directx 11 forced, means read fails , gives null object.
any idea how might perform hook endscene of game when directx 11 in use?
you should iat hooking getprocaddress
, calls d3dcreate, capturing device pointer , hooking vftable there. dunno how 'reversedthe com vftable offsets(these predefined how com dlls build, need count virtual methods defined in dx sdk headers, start @ 0, multiply by
sizeof(int_ptr)` offset), way reading them looks wrong too(you've got 1 many indirections).
try having @ msdetours, has example on com object hooking. can give this question read through too
Comments
Post a Comment