#shaderapidx9.dll error and proxy loader (d3d9.dll i made)

7 messages · Page 1 of 1 (latest)

lusty helmBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

cerulean merlin
#

#include <Windows.h>
#include <d3d9.h>

HMODULE realDll1 = NULL;
HMODULE realDll2 = NULL;

void LoadOriginalDLLs() {
if (!realDll1)
realDll1 = LoadLibraryA("ReShade32.dll");

if (!realDll2)
    realDll2 = LoadLibraryA("d3d9_bypass.dll");

}

LPDIRECT3D9 WINAPI MyProxy_Direct3DCreate9(UINT SDKVersion) {
LoadOriginalDLLs();

if (!realDll2) return NULL;

auto func = (decltype(Direct3DCreate9)*)GetProcAddress(realDll2, "Direct3DCreate9");
if (!func) return NULL;

return func(SDKVersion);

}

BOOL WINAPI DllMain(HINSTANCE hInst, DWORD reason, LPVOID) {
if (reason == DLL_PROCESS_ATTACH)
LoadOriginalDLLs();
return TRUE;
}

#

this is my cpp

#

and my def

#

LIBRARY d3d9 EXPORTS Direct3DCreate9 = d3d9_real.Direct3DCreate9 D3DPERF_BeginEvent = d3d9_real.D3DPERF_BeginEvent D3DPERF_EndEvent = d3d9_real.D3DPERF_EndEvent D3DPERF_GetStatus = d3d9_real.D3DPERF_GetStatus D3DPERF_QueryRepeatFrame = d3d9_real.D3DPERF_QueryRepeatFrame D3DPERF_SetMarker = d3d9_real.D3DPERF_SetMarker D3DPERF_SetOptions = d3d9_real.D3DPERF_SetOptions D3DPERF_SetRegion = d3d9_real.D3DPERF_SetRegion DebugSetLevel = d3d9_real.DebugSetLevel DebugSetMute = d3d9_real.DebugSetMute Direct3DCreate9Ex = d3d9_real.Direct3DCreate9Ex Direct3DShaderValidatorCreate9 = d3d9_real.Direct3DShaderValidatorCreate9 PSGPError = d3d9_real.PSGPError PSGPSampleTexture = d3d9_real.PSGPSampleTexture