Skip to content

Commit 06ed9f3

Browse files
committed
Added DXGIDebugInterfaceGet1 hook.
1 parent 59bfb57 commit 06ed9f3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dxgi/deffile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ EXPORTS
66
CreateDXGIFactory
77
CreateDXGIFactory1
88
CreateDXGIFactory2
9+
DXGIGetDebugInterface1

dxgi/dllmain.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
typedef HRESULT(WINAPI* DXGIFactoryCreate0)(REFIID riid, void** ppFactory);
55
typedef HRESULT(WINAPI* DXGIFactoryCreate1)(REFIID riid, void** ppFactory);
66
typedef HRESULT(WINAPI* DXGIFactoryCreate2)(UINT Flags, REFIID riid, void** ppFactory);
7+
typedef HRESULT(WINAPI* DXGIDebugInterfaceGet1)(UINT Flags, REFIID riid, void** pDebug);
78

89
HMODULE target_lib = 0;
910
const wchar_t* target_lib_name = L"addonLoader.dll";
@@ -36,6 +37,12 @@ HRESULT WINAPI CreateDXGIFactory2(UINT Flags, REFIID riid, void** ppFactory)
3637
return fun(Flags, riid, ppFactory);
3738
}
3839

40+
HRESULT DXGIGetDebugInterface1(UINT Flags, REFIID riid, void** pDebug)
41+
{
42+
DXGIDebugInterfaceGet1 fun = (DXGIDebugInterfaceGet1)getTargetProc("DXGIGetDebugInterface1");
43+
return fun(Flags, riid, pDebug);
44+
}
45+
3946
BOOL APIENTRY DllMain( HMODULE hModule,
4047
DWORD ul_reason_for_call,
4148
LPVOID lpReserved

0 commit comments

Comments
 (0)