|
HydraHook
Direct3D and Core Audio hooking library for Windows
|
Direct3D 10 hook callbacks and helpers. More...
Go to the source code of this file.
Classes | |
| struct | PHYDRAHOOK_D3D10_EVENT_CALLBACKS |
| Direct3D 10 event callback collection. More... | |
Typedefs | |
| typedef VOID | EVT_HYDRAHOOK_D3D10_PRESENT(IDXGISwapChain *pSwapChain, UINT SyncInterval, UINT Flags) |
| Callback for IDXGISwapChain::Present (pre/post). | |
| typedef EVT_HYDRAHOOK_D3D10_PRESENT * | PFN_HYDRAHOOK_D3D10_PRESENT |
| typedef VOID | EVT_HYDRAHOOK_D3D10_RESIZE_TARGET(IDXGISwapChain *pSwapChain, const DXGI_MODE_DESC *pNewTargetParameters) |
| Callback for IDXGISwapChain::ResizeTarget (pre/post). | |
| typedef EVT_HYDRAHOOK_D3D10_RESIZE_TARGET * | PFN_HYDRAHOOK_D3D10_RESIZE_TARGET |
| typedef VOID | EVT_HYDRAHOOK_D3D10_RESIZE_BUFFERS(IDXGISwapChain *pSwapChain, UINT BufferCount, UINT Width, UINT Height, DXGI_FORMAT NewFormat, UINT SwapChainFlags) |
| Callback for IDXGISwapChain::ResizeBuffers (pre/post). | |
| typedef EVT_HYDRAHOOK_D3D10_RESIZE_BUFFERS * | PFN_HYDRAHOOK_D3D10_RESIZE_BUFFERS |
Functions | |
| HRESULT | D3D10_DEVICE_FROM_SWAPCHAIN (IDXGISwapChain *pSwapChain, ID3D10Device **ppDevice) |
| Retrieves ID3D10Device from IDXGISwapChain. | |
| PHYDRAHOOK_ENGINE | HydraHookEngineGetHandleFromD3D10SwapChain (_In_ IDXGISwapChain *SwapChain) |
| Resolves the engine handle from the swap chain passed to a Direct3D 10 callback. | |
| VOID | HYDRAHOOK_D3D10_EVENT_CALLBACKS_INIT (_Out_ PHYDRAHOOK_D3D10_EVENT_CALLBACKS Callbacks) |
| Initializes Direct3D 10 callback collection (zeros all pointers). | |
Direct3D 10 hook callbacks and helpers.
Defines event callbacks for Present, ResizeTarget, and ResizeBuffers. Use HydraHookEngineSetD3D10EventCallbacks to register.
D3D10, D3D11, and D3D12 share unified DXGI swap-chain hooks (Present/Present1, ResizeTarget, ResizeBuffers/ResizeBuffers1) that dispatch per call to the callback table matching the swap chain's enabled device runtime.
Definition in file HydraHookDirect3D10.h.
| typedef VOID EVT_HYDRAHOOK_D3D10_PRESENT(IDXGISwapChain *pSwapChain, UINT SyncInterval, UINT Flags) |
Callback for IDXGISwapChain::Present (pre/post).
Definition at line 52 of file HydraHookDirect3D10.h.
| typedef VOID EVT_HYDRAHOOK_D3D10_RESIZE_BUFFERS(IDXGISwapChain *pSwapChain, UINT BufferCount, UINT Width, UINT Height, DXGI_FORMAT NewFormat, UINT SwapChainFlags) |
Callback for IDXGISwapChain::ResizeBuffers (pre/post).
Definition at line 75 of file HydraHookDirect3D10.h.
| typedef VOID EVT_HYDRAHOOK_D3D10_RESIZE_TARGET(IDXGISwapChain *pSwapChain, const DXGI_MODE_DESC *pNewTargetParameters) |
Callback for IDXGISwapChain::ResizeTarget (pre/post).
Definition at line 64 of file HydraHookDirect3D10.h.
Definition at line 58 of file HydraHookDirect3D10.h.
Definition at line 84 of file HydraHookDirect3D10.h.
Definition at line 69 of file HydraHookDirect3D10.h.
|
inline |
Retrieves ID3D10Device from IDXGISwapChain.
| [in] | pSwapChain | Valid swap chain. |
| [out] | ppDevice | Receives device pointer. |
Definition at line 110 of file HydraHookDirect3D10.h.
References D3D10_DEVICE_FROM_SWAPCHAIN().
Referenced by D3D10_DEVICE_FROM_SWAPCHAIN().
|
inline |
Initializes Direct3D 10 callback collection (zeros all pointers).
| [out] | Callbacks | Callback structure to initialize. |
Definition at line 146 of file HydraHookDirect3D10.h.
References HYDRAHOOK_D3D10_EVENT_CALLBACKS_INIT().
Referenced by HYDRAHOOK_D3D10_EVENT_CALLBACKS_INIT().
| PHYDRAHOOK_ENGINE HydraHookEngineGetHandleFromD3D10SwapChain | ( | _In_ IDXGISwapChain * | SwapChain | ) |
Resolves the engine handle from the swap chain passed to a Direct3D 10 callback.
Direct3D 10 callbacks carry no extension, so this is the way to reach HydraHookEngineGetCustomContext() from them. The engine tracks the swap chain of the most recent D3D10 Present or Present1 it dispatched. When that does not match (the game owns several swap chains) and the module hosts exactly one engine, that engine is returned.
| [in] | SwapChain | Swap chain received by the callback. |
SwapChain is NULL or not tracked by any engine. References HYDRAHOOK_API, and HydraHookEngineGetHandleFromD3D10SwapChain().
Referenced by HydraHookEngineGetHandleFromD3D10SwapChain(), and HydraHookEngineGetHandleFromD3D10SwapChain().