Rebzzel / kiero

Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games.
MIT License
1.03k stars 219 forks source link

kiero::init crashing game, even when using example code #22

Closed ThisIs0xBC closed 4 years ago

ThisIs0xBC commented 4 years ago

Tried writing my own code for a DX11 hook with kiero, it crashed on line 322 of kiero.cpp in kiero::init(). Memory Access Violation.

So I downloaded https://github.com/rdbo/ImGui-DirectX-11-Kiero-Hook and compiled + injected it into my process. Crashed again, same line, same error.

Exception thrown at 0x2E741A8C in Among Us.exe: 0xC0000005: Access violation executing location 0x2E741A8C.

This is the line it crashes on, any ideas?

if (((long(__stdcall*)(
    IDXGIAdapter*,
    D3D_DRIVER_TYPE,
    HMODULE,
    UINT,
    const D3D_FEATURE_LEVEL*,
    UINT,
    UINT,
    const DXGI_SWAP_CHAIN_DESC*,
    IDXGISwapChain**,
    ID3D11Device**,
    D3D_FEATURE_LEVEL*,
    ID3D11DeviceContext**))(D3D11CreateDeviceAndSwapChain))(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, featureLevels, 1, D3D11_SDK_VERSION, &swapChainDesc, &swapChain, &device, &featureLevel, &context) < 0)
{
    ::DestroyWindow(window);
    ::UnregisterClass(windowClass.lpszClassName, windowClass.hInstance);
    return Status::UnknownError;
}

Program I'm trying to hook is Among Us

ThisIs0xBC commented 4 years ago

FIXED IT

ERROR WAS THAT MSI AFTERBURNER + RIVATUNER STATISTICS SERVER WAS ALREADY HOOKING DIRECTX TO OVERLAY GPU STATISTICS ETC. DISABLED THOSE PROGRAMS AND IT WORKS FINE 👍