#define __RwD3DDevice 0x00C97C28
#define DIRECTX_VT_FUNC(offset) (reinterpret_cast<void**>(*reinterpret_cast<void***>(*reinterpret_cast<DWORD*>(__RwD3DDevice)))[offset])
HRESULT __stdcall hkReset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters) {
HRESULT hres = hook_d3dReset.call<urmem::calling_convention::stdcall, HRESULT>(pDevice, pPresentationParameters);
return hres;
}
hook_d3dReset.install(urmem::get_func_addr(DIRECTX_VT_FUNC(16)), urmem::get_func_addr(&hkReset));