HydraHook
Direct3D and Core Audio hooking library for Windows
Loading...
Searching...
No Matches
HydraHookDirect3D10.h
Go to the documentation of this file.
1
14
15/*
16MIT License
17
18Copyright (c) 2018-2026 Benjamin Höglinger-Stelzer
19
20Permission is hereby granted, free of charge, to any person obtaining a copy
21of this software and associated documentation files (the "Software"), to deal
22in the Software without restriction, including without limitation the rights
23to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24copies of the Software, and to permit persons to whom the Software is
25furnished to do so, subject to the following conditions:
26
27The above copyright notice and this permission notice shall be included in all
28copies or substantial portions of the Software.
29
30THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36SOFTWARE.
37*/
38
39
40#ifndef HydraHookDirect3D10_h__
41#define HydraHookDirect3D10_h__
42
43#ifndef HYDRAHOOK_NO_D3D10
44
45#include <dxgi.h>
46#include <d3d10_1.h>
47
49typedef
50_Function_class_(EVT_HYDRAHOOK_D3D10_PRESENT)
51VOID
53 IDXGISwapChain *pSwapChain,
54 UINT SyncInterval,
55 UINT Flags
56);
57
59
61typedef
63VOID
65 IDXGISwapChain *pSwapChain,
66 const DXGI_MODE_DESC *pNewTargetParameters
67);
68
70
72typedef
74VOID
76 IDXGISwapChain *pSwapChain,
77 UINT BufferCount,
78 UINT Width,
79 UINT Height,
80 DXGI_FORMAT NewFormat,
81 UINT SwapChainFlags
82);
83
85
101
108HRESULT
109FORCEINLINE
111 IDXGISwapChain *pSwapChain,
112 ID3D10Device **ppDevice
113)
114{
115 return pSwapChain->GetDevice(__uuidof(ID3D10Device), (PVOID*)ppDevice);
116}
117
118#ifdef __cplusplus
119extern "C" {
120#endif
121
134 _In_
135 IDXGISwapChain *SwapChain
136);
137
138#ifdef __cplusplus
139}
140#endif
141
148)
149{
150 ZeroMemory(Callbacks, sizeof(HYDRAHOOK_D3D10_EVENT_CALLBACKS));
151}
152
153#endif
154
155#endif // HydraHookDirect3D10_h__
IDXGISwapChain vtable indices for D3D10/11/12 hooking.
#define HYDRAHOOK_API
struct _HYDRAHOOK_D3D10_EVENT_CALLBACKS * PHYDRAHOOK_D3D10_EVENT_CALLBACKS
struct _HYDRAHOOK_ENGINE * PHYDRAHOOK_ENGINE
Opaque handle to the HydraHook engine instance.
VOID HYDRAHOOK_D3D10_EVENT_CALLBACKS_INIT(_Out_ PHYDRAHOOK_D3D10_EVENT_CALLBACKS Callbacks)
Initializes Direct3D 10 callback collection (zeros all pointers).
EVT_HYDRAHOOK_D3D10_RESIZE_BUFFERS * PFN_HYDRAHOOK_D3D10_RESIZE_BUFFERS
VOID EVT_HYDRAHOOK_D3D10_PRESENT(IDXGISwapChain *pSwapChain, UINT SyncInterval, UINT Flags)
Callback for IDXGISwapChain::Present (pre/post).
EVT_HYDRAHOOK_D3D10_PRESENT * PFN_HYDRAHOOK_D3D10_PRESENT
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).
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 EVT_HYDRAHOOK_D3D10_RESIZE_TARGET(IDXGISwapChain *pSwapChain, const DXGI_MODE_DESC *pNewTargetParameters)
Callback for IDXGISwapChain::ResizeTarget (pre/post).
EVT_HYDRAHOOK_D3D10_RESIZE_TARGET * PFN_HYDRAHOOK_D3D10_RESIZE_TARGET
Direct3D 10 event callback collection.
PFN_HYDRAHOOK_D3D10_RESIZE_BUFFERS EvtHydraHookD3D10PostResizeBuffers
PFN_HYDRAHOOK_D3D10_RESIZE_BUFFERS EvtHydraHookD3D10PreResizeBuffers
PFN_HYDRAHOOK_D3D10_RESIZE_TARGET EvtHydraHookD3D10PostResizeTarget
PFN_HYDRAHOOK_D3D10_PRESENT EvtHydraHookD3D10PostPresent
PFN_HYDRAHOOK_D3D10_RESIZE_TARGET EvtHydraHookD3D10PreResizeTarget
PFN_HYDRAHOOK_D3D10_PRESENT EvtHydraHookD3D10PrePresent