forked from Areteic/dsfix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Detouring.h
12 lines (12 loc) · 979 Bytes
/
Detouring.h
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once
#include "main.h"
#include "minhook/MinHook.h"
#pragma comment(lib, "minhook\\libMinhook.x86.lib")
static DWORD (WINAPI * TrueSleepEx)(DWORD dwMilliseconds, BOOL bAlertable) = SleepEx;
typedef HRESULT (WINAPI * D3DXCreateTextureFromFileInMemory_FNType)(_In_ LPDIRECT3DDEVICE9 pDevice, _In_ LPCVOID pSrcData, _In_ UINT SrcDataSize, _Out_ LPDIRECT3DTEXTURE9 *ppTexture);
extern D3DXCreateTextureFromFileInMemory_FNType TrueD3DXCreateTextureFromFileInMemory;
typedef HRESULT (WINAPI * D3DXCreateTextureFromFileInMemoryEx_FNType)(LPDIRECT3DDEVICE9 pDevice, LPCVOID pSrcData, UINT SrcDataSize, UINT Width, UINT Height, UINT MipLevels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, DWORD Filter, DWORD MipFilter, D3DCOLOR ColorKey, D3DXIMAGE_INFO *pSrcInfo, PALETTEENTRY *pPalette, LPDIRECT3DTEXTURE9 *ppTexture);
extern D3DXCreateTextureFromFileInMemoryEx_FNType TrueD3DXCreateTextureFromFileInMemoryEx;
void earlyDetour();
void startDetour();
void endDetour();