
Use the find pattern function in order to get the device pointer. This works in all test environments, and d3d9 games.DWORD devptr;
devptr = FindPattern((DWORD)GetModuleHandle("d3d9.dll"), 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
