Hijack Bandicam's overlay for rendering onto the screen with DirectX11.
- Compile the DLL with Visual Studio 2022.
- Open Bandicam (admin, default), and select the third blue rectangle at the top ('Game Recording Mode.')
- Select the tab 'FPS', and select 'Show FPS Overlay' to ensure the overlay is working for your game.
- Load the module into the game.
Bandicam will load a trusted (signed) module into the game based on the architecture. If the game is 64-bit, Bandicam will load bdcam64.dll. If the game is 32-bit, Bandicam will load bdcam32.dll. These dlls are responsible for hooking present, and rendering the overlay from the present function in IDXGISwapChain::Present. To hook a function, you must have an input function to redirect code to. Because of this, we can 'hijack' Bandicam's redirect function that's a parameter in their hooking function, and thus getting our rendering hook to work. We hook both IDXGISwapChain::Present, and IDXGISwapChain::ResizeBuffers. Present is responsible for drawing, and ResizeBuffers is responsible for fixing the renderer when we re-size the screen.
- Bandicam's in-game overlay is beneath the Steam & NVIDIA Geforce Experience overlay.
- Only supports DirectX11.