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 bysizeof(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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -