HydraHook
Direct3D and Core Audio hooking library for Windows
Toggle main menu visibility
Loading...
Searching...
No Matches
Direct3D10.h
Go to the documentation of this file.
1
/*
2
MIT License
3
4
Copyright (c) 2018-2026 Benjamin Höglinger-Stelzer
5
6
Permission is hereby granted, free of charge, to any person obtaining a copy
7
of this software and associated documentation files (the "Software"), to deal
8
in the Software without restriction, including without limitation the rights
9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
copies of the Software, and to permit persons to whom the Software is
11
furnished to do so, subject to the following conditions:
12
13
The above copyright notice and this permission notice shall be included in all
14
copies or substantial portions of the Software.
15
16
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
SOFTWARE.
23
*/
24
25
26
#pragma once
27
28
#include <
dxgi.h
>
29
// ReSharper disable CppUnusedIncludeDirective
30
#include <d3d10_1.h>
31
// ReSharper restore CppUnusedIncludeDirective
32
#include <d3d10.h>
33
#include "
Direct3DBase.h
"
34
35
namespace
Direct3D10Hooking
36
{
37
enum
D3D10DeviceVTbl
:
short
38
{
39
// IUnknown
40
QueryInterface
= 0,
41
AddRef
= 1,
42
Release
= 2,
43
44
// ID3D10Device
45
VSSetConstantBuffers
= 3,
46
PSSetShaderResources
= 4,
47
PSSetShader
= 5,
48
PSSetSamplers
= 6,
49
VSSetShader
= 7,
50
DrawIndexed
= 8,
51
Draw
= 9,
52
PSSetConstantBuffers
= 10,
53
IASetInputLayout
= 11,
54
IASetVertexBuffers
= 12,
55
IASetIndexBuffer
= 13,
56
DrawIndexedInstanced
= 14,
57
DrawInstanced
= 15,
58
GSSetConstantBuffers
= 16,
59
GSSetShader
= 17,
60
IASetPrimitiveTopology
= 18,
61
VSSetShaderResources
= 19,
62
VSSetSamplers
= 20,
63
SetPredication
= 21,
64
GSSetShaderResources
= 22,
65
GSSetSamplers
= 23,
66
OMSetRenderTargets
= 24,
67
OMSetBlendState
= 25,
68
OMSetDepthStencilState
= 26,
69
SOSetTargets
= 27,
70
DrawAuto
= 28,
71
RSSetState
= 29,
72
RSSetViewports
= 30,
73
RSSetScissorRects
= 31,
74
CopySubresourceRegion
= 32,
75
CopyResource
= 33,
76
UpdateSubresource
= 34,
77
ClearRenderTargetView
= 35,
78
ClearDepthStencilView
= 36,
79
GenerateMips
= 37,
80
ResolveSubresource
= 38,
81
VSGetConstantBuffers
= 39,
82
PSGetShaderResources
= 40,
83
PSGetShader
= 41,
84
PSGetSamplers
= 42,
85
VSGetShader
= 43,
86
PSGetConstantBuffers
= 44,
87
IAGetInputLayout
= 45,
88
IAGetVertexBuffers
= 46,
89
IAGetIndexBuffer
= 47,
90
GSGetConstantBuffers
= 48,
91
GSGetShader
= 49,
92
IAGetPrimitiveTopology
= 50,
93
VSGetShaderResources
= 51,
94
VSGetSamplers
= 52,
95
GetPredication
= 53,
96
GSGetShaderResources
= 54,
97
GSGetSamplers
= 55,
98
OMGetRenderTargets
= 56,
99
OMGetBlendState
= 57,
100
OMGetDepthStencilState
= 58,
101
SOGetTargets
= 59,
102
RSGetState
= 60,
103
RSGetViewports
= 61,
104
RSGetScissorRects
= 62,
105
GetDeviceRemovedReason
= 63,
106
SetExceptionMode
= 64,
107
GetExceptionMode
= 65,
108
GetPrivateData
= 66,
109
SetPrivateData
= 67,
110
SetPrivateDataInterface
= 68,
111
ClearState
= 69,
112
Flush
= 70,
113
CreateBuffer
= 71,
114
CreateTexture1D
= 72,
115
CreateTexture2D
= 73,
116
CreateTexture3D
= 74,
117
CreateShaderResourceView
= 75,
118
CreateRenderTargetView
= 76,
119
CreateDepthStencilView
= 77,
120
CreateInputLayout
= 78,
121
CreateVertexShader
= 79,
122
CreateGeometryShader
= 80,
123
CreateGemoetryShaderWithStreamOutput
= 81,
124
CreatePixelShader
= 82,
125
CreateBlendState
= 83,
126
CreateDepthStencilState
= 84,
127
CreateRasterizerState
= 85,
128
CreateSamplerState
= 86,
129
CreateQuery
= 87,
130
CreatePredicate
= 88,
131
CreateCounter
= 89,
132
CheckFormatSupport
= 90,
133
CheckMultisampleQualityLevels
= 91,
134
CheckCounterInfo
= 92,
135
CheckCounter
= 93,
136
GetCreationFlags
= 94,
137
OpenSharedResource
= 95,
138
SetTextFilterSize
= 96,
139
GetTextFilterSize
= 97
140
};
141
142
class
Direct3D10
:
public
Direct3DHooking::Direct3DBase
143
{
144
ID3D10Device* pDevice;
145
IDXGISwapChain* pSwapChain;
146
147
public
:
148
Direct3D10
();
149
~Direct3D10
();
150
static
const
int
VTableElements
= 98;
151
152
std::vector<size_t>
vtable
()
const override
;
153
};
154
}
DXGI.h
IDXGISwapChain vtable indices for D3D10/11/12 hooking.
Direct3DBase.h
Abstract base for Direct3D version-specific hook implementations.
Direct3D10Hooking::Direct3D10::vtable
std::vector< size_t > vtable() const override
Returns vtable indices for hookable methods (Present, Reset, etc.).
Definition
Direct3D10.cpp:141
Direct3D10Hooking::Direct3D10::Direct3D10
Direct3D10()
Definition
Direct3D10.cpp:35
Direct3D10Hooking::Direct3D10::VTableElements
static const int VTableElements
Definition
Direct3D10.h:150
Direct3DHooking::Direct3DBase
Abstract base for Direct3D hook implementations.
Definition
Direct3DBase.h:48
Direct3D10Hooking
Definition
Direct3D10.h:36
Direct3D10Hooking::D3D10DeviceVTbl
D3D10DeviceVTbl
Definition
Direct3D10.h:38
Direct3D10Hooking::CreatePixelShader
@ CreatePixelShader
Definition
Direct3D10.h:124
Direct3D10Hooking::PSGetConstantBuffers
@ PSGetConstantBuffers
Definition
Direct3D10.h:86
Direct3D10Hooking::CreateQuery
@ CreateQuery
Definition
Direct3D10.h:129
Direct3D10Hooking::CreateTexture2D
@ CreateTexture2D
Definition
Direct3D10.h:115
Direct3D10Hooking::RSSetViewports
@ RSSetViewports
Definition
Direct3D10.h:72
Direct3D10Hooking::SetPrivateDataInterface
@ SetPrivateDataInterface
Definition
Direct3D10.h:110
Direct3D10Hooking::VSSetSamplers
@ VSSetSamplers
Definition
Direct3D10.h:62
Direct3D10Hooking::PSGetSamplers
@ PSGetSamplers
Definition
Direct3D10.h:84
Direct3D10Hooking::CopySubresourceRegion
@ CopySubresourceRegion
Definition
Direct3D10.h:74
Direct3D10Hooking::SetExceptionMode
@ SetExceptionMode
Definition
Direct3D10.h:106
Direct3D10Hooking::SetTextFilterSize
@ SetTextFilterSize
Definition
Direct3D10.h:138
Direct3D10Hooking::GSSetShader
@ GSSetShader
Definition
Direct3D10.h:59
Direct3D10Hooking::CreateInputLayout
@ CreateInputLayout
Definition
Direct3D10.h:120
Direct3D10Hooking::CreateRenderTargetView
@ CreateRenderTargetView
Definition
Direct3D10.h:118
Direct3D10Hooking::DrawIndexed
@ DrawIndexed
Definition
Direct3D10.h:50
Direct3D10Hooking::DrawIndexedInstanced
@ DrawIndexedInstanced
Definition
Direct3D10.h:56
Direct3D10Hooking::RSGetState
@ RSGetState
Definition
Direct3D10.h:102
Direct3D10Hooking::Flush
@ Flush
Definition
Direct3D10.h:112
Direct3D10Hooking::RSSetScissorRects
@ RSSetScissorRects
Definition
Direct3D10.h:73
Direct3D10Hooking::SOSetTargets
@ SOSetTargets
Definition
Direct3D10.h:69
Direct3D10Hooking::CreateBuffer
@ CreateBuffer
Definition
Direct3D10.h:113
Direct3D10Hooking::ClearState
@ ClearState
Definition
Direct3D10.h:111
Direct3D10Hooking::VSSetConstantBuffers
@ VSSetConstantBuffers
Definition
Direct3D10.h:45
Direct3D10Hooking::OpenSharedResource
@ OpenSharedResource
Definition
Direct3D10.h:137
Direct3D10Hooking::GetCreationFlags
@ GetCreationFlags
Definition
Direct3D10.h:136
Direct3D10Hooking::CreateVertexShader
@ CreateVertexShader
Definition
Direct3D10.h:121
Direct3D10Hooking::OMGetRenderTargets
@ OMGetRenderTargets
Definition
Direct3D10.h:98
Direct3D10Hooking::DrawInstanced
@ DrawInstanced
Definition
Direct3D10.h:57
Direct3D10Hooking::IAGetPrimitiveTopology
@ IAGetPrimitiveTopology
Definition
Direct3D10.h:92
Direct3D10Hooking::DrawAuto
@ DrawAuto
Definition
Direct3D10.h:70
Direct3D10Hooking::CheckCounter
@ CheckCounter
Definition
Direct3D10.h:135
Direct3D10Hooking::IAGetIndexBuffer
@ IAGetIndexBuffer
Definition
Direct3D10.h:89
Direct3D10Hooking::VSSetShaderResources
@ VSSetShaderResources
Definition
Direct3D10.h:61
Direct3D10Hooking::PSSetSamplers
@ PSSetSamplers
Definition
Direct3D10.h:48
Direct3D10Hooking::VSSetShader
@ VSSetShader
Definition
Direct3D10.h:49
Direct3D10Hooking::GetTextFilterSize
@ GetTextFilterSize
Definition
Direct3D10.h:139
Direct3D10Hooking::CreateDepthStencilView
@ CreateDepthStencilView
Definition
Direct3D10.h:119
Direct3D10Hooking::GSGetConstantBuffers
@ GSGetConstantBuffers
Definition
Direct3D10.h:90
Direct3D10Hooking::AddRef
@ AddRef
Definition
Direct3D10.h:41
Direct3D10Hooking::RSGetViewports
@ RSGetViewports
Definition
Direct3D10.h:103
Direct3D10Hooking::GSSetShaderResources
@ GSSetShaderResources
Definition
Direct3D10.h:64
Direct3D10Hooking::PSSetShader
@ PSSetShader
Definition
Direct3D10.h:47
Direct3D10Hooking::CheckMultisampleQualityLevels
@ CheckMultisampleQualityLevels
Definition
Direct3D10.h:133
Direct3D10Hooking::CreateSamplerState
@ CreateSamplerState
Definition
Direct3D10.h:128
Direct3D10Hooking::ClearRenderTargetView
@ ClearRenderTargetView
Definition
Direct3D10.h:77
Direct3D10Hooking::UpdateSubresource
@ UpdateSubresource
Definition
Direct3D10.h:76
Direct3D10Hooking::IAGetInputLayout
@ IAGetInputLayout
Definition
Direct3D10.h:87
Direct3D10Hooking::IASetVertexBuffers
@ IASetVertexBuffers
Definition
Direct3D10.h:54
Direct3D10Hooking::CheckFormatSupport
@ CheckFormatSupport
Definition
Direct3D10.h:132
Direct3D10Hooking::ResolveSubresource
@ ResolveSubresource
Definition
Direct3D10.h:80
Direct3D10Hooking::SOGetTargets
@ SOGetTargets
Definition
Direct3D10.h:101
Direct3D10Hooking::GSGetShader
@ GSGetShader
Definition
Direct3D10.h:91
Direct3D10Hooking::OMGetBlendState
@ OMGetBlendState
Definition
Direct3D10.h:99
Direct3D10Hooking::GetPrivateData
@ GetPrivateData
Definition
Direct3D10.h:108
Direct3D10Hooking::OMSetDepthStencilState
@ OMSetDepthStencilState
Definition
Direct3D10.h:68
Direct3D10Hooking::CreatePredicate
@ CreatePredicate
Definition
Direct3D10.h:130
Direct3D10Hooking::Draw
@ Draw
Definition
Direct3D10.h:51
Direct3D10Hooking::CreateShaderResourceView
@ CreateShaderResourceView
Definition
Direct3D10.h:117
Direct3D10Hooking::Release
@ Release
Definition
Direct3D10.h:42
Direct3D10Hooking::GSGetSamplers
@ GSGetSamplers
Definition
Direct3D10.h:97
Direct3D10Hooking::SetPredication
@ SetPredication
Definition
Direct3D10.h:63
Direct3D10Hooking::CreateDepthStencilState
@ CreateDepthStencilState
Definition
Direct3D10.h:126
Direct3D10Hooking::SetPrivateData
@ SetPrivateData
Definition
Direct3D10.h:109
Direct3D10Hooking::OMSetRenderTargets
@ OMSetRenderTargets
Definition
Direct3D10.h:66
Direct3D10Hooking::QueryInterface
@ QueryInterface
Definition
Direct3D10.h:40
Direct3D10Hooking::CheckCounterInfo
@ CheckCounterInfo
Definition
Direct3D10.h:134
Direct3D10Hooking::IAGetVertexBuffers
@ IAGetVertexBuffers
Definition
Direct3D10.h:88
Direct3D10Hooking::IASetPrimitiveTopology
@ IASetPrimitiveTopology
Definition
Direct3D10.h:60
Direct3D10Hooking::ClearDepthStencilView
@ ClearDepthStencilView
Definition
Direct3D10.h:78
Direct3D10Hooking::CreateTexture1D
@ CreateTexture1D
Definition
Direct3D10.h:114
Direct3D10Hooking::PSGetShader
@ PSGetShader
Definition
Direct3D10.h:83
Direct3D10Hooking::VSGetConstantBuffers
@ VSGetConstantBuffers
Definition
Direct3D10.h:81
Direct3D10Hooking::CreateGeometryShader
@ CreateGeometryShader
Definition
Direct3D10.h:122
Direct3D10Hooking::GenerateMips
@ GenerateMips
Definition
Direct3D10.h:79
Direct3D10Hooking::OMSetBlendState
@ OMSetBlendState
Definition
Direct3D10.h:67
Direct3D10Hooking::CopyResource
@ CopyResource
Definition
Direct3D10.h:75
Direct3D10Hooking::PSGetShaderResources
@ PSGetShaderResources
Definition
Direct3D10.h:82
Direct3D10Hooking::CreateCounter
@ CreateCounter
Definition
Direct3D10.h:131
Direct3D10Hooking::OMGetDepthStencilState
@ OMGetDepthStencilState
Definition
Direct3D10.h:100
Direct3D10Hooking::PSSetConstantBuffers
@ PSSetConstantBuffers
Definition
Direct3D10.h:52
Direct3D10Hooking::RSGetScissorRects
@ RSGetScissorRects
Definition
Direct3D10.h:104
Direct3D10Hooking::VSGetShader
@ VSGetShader
Definition
Direct3D10.h:85
Direct3D10Hooking::GetExceptionMode
@ GetExceptionMode
Definition
Direct3D10.h:107
Direct3D10Hooking::CreateBlendState
@ CreateBlendState
Definition
Direct3D10.h:125
Direct3D10Hooking::VSGetSamplers
@ VSGetSamplers
Definition
Direct3D10.h:94
Direct3D10Hooking::IASetIndexBuffer
@ IASetIndexBuffer
Definition
Direct3D10.h:55
Direct3D10Hooking::VSGetShaderResources
@ VSGetShaderResources
Definition
Direct3D10.h:93
Direct3D10Hooking::CreateTexture3D
@ CreateTexture3D
Definition
Direct3D10.h:116
Direct3D10Hooking::CreateGemoetryShaderWithStreamOutput
@ CreateGemoetryShaderWithStreamOutput
Definition
Direct3D10.h:123
Direct3D10Hooking::GSSetConstantBuffers
@ GSSetConstantBuffers
Definition
Direct3D10.h:58
Direct3D10Hooking::GetPredication
@ GetPredication
Definition
Direct3D10.h:95
Direct3D10Hooking::IASetInputLayout
@ IASetInputLayout
Definition
Direct3D10.h:53
Direct3D10Hooking::CreateRasterizerState
@ CreateRasterizerState
Definition
Direct3D10.h:127
Direct3D10Hooking::GetDeviceRemovedReason
@ GetDeviceRemovedReason
Definition
Direct3D10.h:105
Direct3D10Hooking::GSGetShaderResources
@ GSGetShaderResources
Definition
Direct3D10.h:96
Direct3D10Hooking::RSSetState
@ RSSetState
Definition
Direct3D10.h:71
Direct3D10Hooking::GSSetSamplers
@ GSSetSamplers
Definition
Direct3D10.h:65
Direct3D10Hooking::PSSetShaderResources
@ PSSetShaderResources
Definition
Direct3D10.h:46
src
HydraHook
Game
Hook
Direct3D10.h
Generated by
1.18.0