I have to do some memory reading in a game and some injection. However, to avoid race conditions, I need to inject my ASM code into the endscene.
Previously I have used this 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 the Dx9 device, and find the endscene using reversed offsets.
However, in windows 7, directx 11 is forced, which means that this read fails and gives a null object.
Any idea how I might perform a hook into the endscene of a game when DirectX 11 is in use?