крючок d3d9 у меня есть работа на некоторых компьютерах и сбой на некоторых других компьютерах

Мне нужно это исправить или создать устройство d3d, кто-нибудь может мне помочь с этим? заранее спасибо.

void** GetOriginalD3DVTable()
{
// may be more reliable to create a new d3d device and get the vt ptr from that instead of relying on a pattern
static void** VT = nullptr;

if (VT == nullptr)
{
HMODULE d3d9Module = NULL;

while (!d3d9Module)
{
d3d9Module = GetModuleHandleA("d3d9.dll");
Sleep(100);
}

const void* tempadd = FindPattern(d3d9Module, 0x128000, reinterpret_cast<const unsigned char*>("\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86"), "xx????xx????xx");
if (tempadd != nullptr)
{
VT = *reinterpret_cast<void***>(reinterpret_cast<uintptr_t>(tempadd) + 2);
}
else
{
//maybe we should try to find another pattern?
}
}

return VT;
}

0

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …