DWORD_PTR* Present_V = ( DWORD_PTR* )( GetAddress( "gameoverlayrenderer.dll", "FF 15 ? ? ? ? 8B F8 85 DB 74 1F" ) + 2 );
// Present_T is:
// using Present_T = void( __stdcall* )( void*, const RECT*, RECT*, HWND, RGNDATA* );
// These are externs because they are stored in another cpp file
extern Present_T Present_O;
extern HRESULT _stdcall Present_H( LPDIRECT3DDEVICE9 pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion );
// Save the original, this is used at the end of our hooked function
Present_O = ( Present_T )( *Present_V );
// Set steam's hook to ours
*Present_V = ( DWORD_PTR )( &Present_H );
В Present сделай хук
C++:DWORD_PTR* Present_V = ( DWORD_PTR* )( GetAddress( "gameoverlayrenderer.dll", "FF 15 ? ? ? ? 8B F8 85 DB 74 1F" ) + 2 ); // Present_T is: // using Present_T = void( __stdcall* )( void*, const RECT*, RECT*, HWND, RGNDATA* ); // These are externs because they are stored in another cpp file extern Present_T Present_O; extern HRESULT _stdcall Present_H( LPDIRECT3DDEVICE9 pDevice, RECT* pSourceRect, RECT* pDestRect, HWND hDestWindowOverride, RGNDATA* pDirtyRegion ); // Save the original, this is used at the end of our hooked function Present_O = ( Present_T )( *Present_V ); // Set steam's hook to ours *Present_V = ( DWORD_PTR )( &Present_H );
HRESULT __stdcall hkPresent(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags)
{
if (!init)
{
if (SUCCEEDED(pSwapChain->GetDevice(__uuidof(ID3D11Device), (void**)&pDevice)))
{
pDevice->GetImmediateContext(&pContext);
DXGI_SWAP_CHAIN_DESC sd;
pSwapChain->GetDesc(&sd);
window = sd.OutputWindow;
ID3D11Texture2D* pBackBuffer;
pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);
pDevice->CreateRenderTargetView(pBackBuffer, NULL, &mainRenderTargetView);
pBackBuffer->Release();
oWndProc = (WNDPROC)SetWindowLongPtr(window, GWLP_WNDPROC, (LONG_PTR)WndProc);
InitImGui();
init = true;
load_styles();
}
else
return oPresent(pSwapChain, SyncInterval, Flags);
}
да там хукается игровой рендер в пресентУ меня знакомый делал obs bypass через отрисовку дискорд оверлея
в Presentизвините но я не понял как байпаснуть все равно, куда чево вставлять? меню на базе киеро хука dx11