HydraHook
Direct3D and Core Audio hooking library for Windows
Toggle main menu visibility
Loading...
Searching...
No Matches
Direct3D11.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 "
Direct3DBase.h
"
29
#include <
dxgi.h
>
30
#include <d3d11.h>
31
32
namespace
Direct3D11Hooking
33
{
34
enum
D3D11DeviceVTbl
:
short
35
{
36
// IUnknown
37
QueryInterface
= 0,
38
AddRef
= 1,
39
Release
= 2,
40
41
// ID3D11Device
42
CreateBuffer
= 3,
43
CreateTexture1D
= 4,
44
CreateTexture2D
= 5,
45
CreateTexture3D
= 6,
46
CreateShaderResourceView
= 7,
47
CreateUnorderedAccessView
= 8,
48
CreateRenderTargetView
= 9,
49
CreateDepthStencilView
= 10,
50
CreateInputLayout
= 11,
51
CreateVertexShader
= 12,
52
CreateGeometryShader
= 13,
53
CreateGeometryShaderWithStreamOutput
= 14,
54
CreatePixelShader
= 15,
55
CreateHullShader
= 16,
56
CreateDomainShader
= 17,
57
CreateComputeShader
= 18,
58
CreateClassLinkage
= 19,
59
CreateBlendState
= 20,
60
CreateDepthStencilState
= 21,
61
CreateRasterizerState
= 22,
62
CreateSamplerState
= 23,
63
CreateQuery
= 24,
64
CreatePredicate
= 25,
65
CreateCounter
= 26,
66
CreateDeferredContext
= 27,
67
OpenSharedResource
= 28,
68
CheckFormatSupport
= 29,
69
CheckMultisampleQualityLevels
= 30,
70
CheckCounterInfo
= 31,
71
CheckCounter
= 32,
72
CheckFeatureSupport
= 33,
73
GetPrivateData
= 34,
74
SetPrivateData
= 35,
75
SetPrivateDataInterface
= 36,
76
GetFeatureLevel
= 37,
77
GetCreationFlags
= 38,
78
GetDeviceRemovedReason
= 39,
79
GetImmediateContext
= 40,
80
SetExceptionMode
= 41,
81
GetExceptionMode
= 42
82
};
83
84
class
Direct3D11
:
85
public
Direct3DHooking::Direct3DBase
86
{
87
ID3D11Device* pd3dDevice;
88
ID3D11DeviceContext* pd3dDeviceContext;
89
IDXGISwapChain* pSwapChain;
90
public
:
91
Direct3D11
();
92
~Direct3D11
();
93
static
const
int
VTableElements
= 43;
94
95
std::vector<size_t>
vtable
()
const override
;
96
};
97
}
DXGI.h
IDXGISwapChain vtable indices for D3D10/11/12 hooking.
Direct3DBase.h
Abstract base for Direct3D version-specific hook implementations.
Direct3D11Hooking::Direct3D11::vtable
std::vector< size_t > vtable() const override
Returns vtable indices for hookable methods (Present, Reset, etc.).
Definition
Direct3D11.cpp:139
Direct3D11Hooking::Direct3D11::Direct3D11
Direct3D11()
Definition
Direct3D11.cpp:32
Direct3D11Hooking::Direct3D11::VTableElements
static const int VTableElements
Definition
Direct3D11.h:93
Direct3DHooking::Direct3DBase
Abstract base for Direct3D hook implementations.
Definition
Direct3DBase.h:48
Direct3D11Hooking
Definition
Direct3D11.h:33
Direct3D11Hooking::D3D11DeviceVTbl
D3D11DeviceVTbl
Definition
Direct3D11.h:35
Direct3D11Hooking::GetExceptionMode
@ GetExceptionMode
Definition
Direct3D11.h:81
Direct3D11Hooking::AddRef
@ AddRef
Definition
Direct3D11.h:38
Direct3D11Hooking::CreatePredicate
@ CreatePredicate
Definition
Direct3D11.h:64
Direct3D11Hooking::CreateInputLayout
@ CreateInputLayout
Definition
Direct3D11.h:50
Direct3D11Hooking::CreateDepthStencilView
@ CreateDepthStencilView
Definition
Direct3D11.h:49
Direct3D11Hooking::CreateClassLinkage
@ CreateClassLinkage
Definition
Direct3D11.h:58
Direct3D11Hooking::CreateCounter
@ CreateCounter
Definition
Direct3D11.h:65
Direct3D11Hooking::CreateUnorderedAccessView
@ CreateUnorderedAccessView
Definition
Direct3D11.h:47
Direct3D11Hooking::GetImmediateContext
@ GetImmediateContext
Definition
Direct3D11.h:79
Direct3D11Hooking::CreateRenderTargetView
@ CreateRenderTargetView
Definition
Direct3D11.h:48
Direct3D11Hooking::CheckMultisampleQualityLevels
@ CheckMultisampleQualityLevels
Definition
Direct3D11.h:69
Direct3D11Hooking::OpenSharedResource
@ OpenSharedResource
Definition
Direct3D11.h:67
Direct3D11Hooking::Release
@ Release
Definition
Direct3D11.h:39
Direct3D11Hooking::GetDeviceRemovedReason
@ GetDeviceRemovedReason
Definition
Direct3D11.h:78
Direct3D11Hooking::CheckCounter
@ CheckCounter
Definition
Direct3D11.h:71
Direct3D11Hooking::CreateQuery
@ CreateQuery
Definition
Direct3D11.h:63
Direct3D11Hooking::CreateRasterizerState
@ CreateRasterizerState
Definition
Direct3D11.h:61
Direct3D11Hooking::CreateComputeShader
@ CreateComputeShader
Definition
Direct3D11.h:57
Direct3D11Hooking::GetPrivateData
@ GetPrivateData
Definition
Direct3D11.h:73
Direct3D11Hooking::CreateDomainShader
@ CreateDomainShader
Definition
Direct3D11.h:56
Direct3D11Hooking::CheckCounterInfo
@ CheckCounterInfo
Definition
Direct3D11.h:70
Direct3D11Hooking::GetFeatureLevel
@ GetFeatureLevel
Definition
Direct3D11.h:76
Direct3D11Hooking::SetPrivateData
@ SetPrivateData
Definition
Direct3D11.h:74
Direct3D11Hooking::CreateVertexShader
@ CreateVertexShader
Definition
Direct3D11.h:51
Direct3D11Hooking::SetExceptionMode
@ SetExceptionMode
Definition
Direct3D11.h:80
Direct3D11Hooking::SetPrivateDataInterface
@ SetPrivateDataInterface
Definition
Direct3D11.h:75
Direct3D11Hooking::CreateDeferredContext
@ CreateDeferredContext
Definition
Direct3D11.h:66
Direct3D11Hooking::CreateTexture3D
@ CreateTexture3D
Definition
Direct3D11.h:45
Direct3D11Hooking::CreateGeometryShader
@ CreateGeometryShader
Definition
Direct3D11.h:52
Direct3D11Hooking::CreateTexture2D
@ CreateTexture2D
Definition
Direct3D11.h:44
Direct3D11Hooking::GetCreationFlags
@ GetCreationFlags
Definition
Direct3D11.h:77
Direct3D11Hooking::QueryInterface
@ QueryInterface
Definition
Direct3D11.h:37
Direct3D11Hooking::CreateHullShader
@ CreateHullShader
Definition
Direct3D11.h:55
Direct3D11Hooking::CreateBuffer
@ CreateBuffer
Definition
Direct3D11.h:42
Direct3D11Hooking::CheckFormatSupport
@ CheckFormatSupport
Definition
Direct3D11.h:68
Direct3D11Hooking::CreateBlendState
@ CreateBlendState
Definition
Direct3D11.h:59
Direct3D11Hooking::CreateSamplerState
@ CreateSamplerState
Definition
Direct3D11.h:62
Direct3D11Hooking::CreatePixelShader
@ CreatePixelShader
Definition
Direct3D11.h:54
Direct3D11Hooking::CreateGeometryShaderWithStreamOutput
@ CreateGeometryShaderWithStreamOutput
Definition
Direct3D11.h:53
Direct3D11Hooking::CreateTexture1D
@ CreateTexture1D
Definition
Direct3D11.h:43
Direct3D11Hooking::CreateShaderResourceView
@ CreateShaderResourceView
Definition
Direct3D11.h:46
Direct3D11Hooking::CheckFeatureSupport
@ CheckFeatureSupport
Definition
Direct3D11.h:72
Direct3D11Hooking::CreateDepthStencilState
@ CreateDepthStencilState
Definition
Direct3D11.h:60
src
HydraHook
Game
Hook
Direct3D11.h
Generated by
1.18.0