|
HydraHook
Direct3D and Core Audio hooking library for Windows
|
Main hook worker thread entry point. More...
Go to the source code of this file.
Classes | |
| struct | D3D12ResizePreExtension |
| struct | D3D12ResizeCallbackScope |
| struct | ScopedSuppressD3D12QueueCapture |
| Suppresses ExecuteCommandLists queue observation on this thread (readback, worker probes). More... | |
Functions | |
| ID3D12CommandQueue * | GetUniformD3D12PresentQueue (UINT bufferCount, IUnknown *const *presentQueues) |
| ID3D12CommandQueue * | GetD3D12CommandQueueForSwapChain (IDXGISwapChain *pSwapChain, bool requireVerifiedQueue=false) |
| Returns the D3D12 command queue associated with a swap chain. | |
| DWORD | HydraHookMainThread (LPVOID Params) |
| Main hook worker thread; probes and hooks render and audio APIs. | |
Variables | |
| bool | g_suppressD3D12QueueCapture = false |
Main hook worker thread entry point.
HydraHookMainThread runs in a dedicated thread, probing for Direct3D and Core Audio APIs, then installing hooks and dispatching callbacks.
Definition in file Game.h.
| ID3D12CommandQueue * GetD3D12CommandQueueForSwapChain | ( | IDXGISwapChain * | pSwapChain, |
| bool | requireVerifiedQueue = false ) |
Returns the D3D12 command queue associated with a swap chain.
Checks the recorded association, then the current back buffer's queue on a supported DXGI build, then the device map filled by the ExecuteCommandLists hook.
| pSwapChain | The swap chain to query. May be null. |
| requireVerifiedQueue | Only accept an exact association for the current back buffer. |
pSwapChain is null. Definition at line 2188 of file Game.cpp.
References g_d3d12DeviceToQueue, g_d3d12QueueMapLock, g_d3d12SwapChainToQueue, and GetD3D12CommandQueueForSwapChain().
Referenced by GetD3D12CommandQueueForSwapChain(), HydraHookEngineGetD3D12CommandQueue(), and HydraHookEngineGetVerifiedD3D12CommandQueue().
| ID3D12CommandQueue * GetUniformD3D12PresentQueue | ( | UINT | bufferCount, |
| IUnknown *const * | presentQueues ) |
Definition at line 2077 of file Game.cpp.
References GetUniformD3D12PresentQueue().
Referenced by GetUniformD3D12PresentQueue().
| DWORD HydraHookMainThread | ( | LPVOID | Params | ) |
Main hook worker thread; probes and hooks render and audio APIs.
Installs the configured hooks, waits for cancellation, then uninstalls them. The worker does not own the unload. When the host calls FreeLibrary, that hook runs cleanup and its caller exits with FreeLibraryAndExitThread, while the worker exits with ExitThread. On any other shutdown the worker exits with FreeLibraryAndExitThread after cleanup.
| Params | PHYDRAHOOK_ENGINE cast to LPVOID. |
Definition at line 451 of file Game.cpp.
References Hook< cc, retn, args >::apply(), BindChannelLoggers(), ResettableOnce::call(), Hook< cc, retn, args >::call_orig(), Direct3D9Hooking::EndScene, HookAnnouncements::endScene9, engine, ExitProcessHook, g_announce, g_exitProcessHook, g_freeLibraryHook, g_freeLibraryHost, g_freeLibraryTarget, g_logD3D9, g_logGame, g_postQuitMessageHook, HYDRAHOOK_ERROR_NONE, HydraHookCrashHandlerInstallThreadSEH(), HydraHookDirect3DVersion9, HydraHookEngineDestroyBeforeUnload(), HydraHookLoggingEnableAsync(), HydraHookMainThread(), HookActivityTracker::Guard::invoke, INVOKE_D3D9_CALLBACK, INVOKE_HYDRAHOOK_GAME_HOOKED, PerformShutdownCleanup(), PostQuitMessageHook, Direct3D9Hooking::Present, HookAnnouncements::present9, Direct3D9Hooking::PresentEx, HydraHook::Core::Util::process_name(), Direct3D9Hooking::Reset, HookAnnouncements::reset9, HookAnnouncements::reset9Ex, HookAnnouncements::reset_all(), ResetDxgiModuleCache(), Direct3D9Hooking::ResetEx, stdcall_t, and StoreRenderPipelinePtr().
Referenced by HydraHookEngineCreate(), HydraHookEngineRehook(), and HydraHookMainThread().
|
inlinethread_local |
Definition at line 69 of file Game.h.
Referenced by ScopedSuppressD3D12QueueCapture::ScopedSuppressD3D12QueueCapture(), and ScopedSuppressD3D12QueueCapture::~ScopedSuppressD3D12QueueCapture().