Solved Injections fail under Windows 10

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Icew0lf

Software Ninjaneer
Dank Tier VIP
Fleep Tier Donator
Aug 20, 2013
603
17,558
43
Hi!

i have a problem.
since i upgraded from windows 7 to Windows 10 some weeks ago i have a problem. i cant inject some of my hacks anymore. i wanted to work further on a project and now the game instantly crashes on inject. i installed all Visual Studio C++ 2015 redistributables. its a project with D3D9 ingame menu, i wonder if this could cause the problem? some internal trainers with own C++ Windowsform work. just no ingame menu hacks.

or do i need a different injector?! im using newest version of Extreme Injector and Xenos. i wanted to try the kernel manual map version from xenos but i dont have the blackbone driver.

any ideas why Windows 10 makes trouble?

edit: if i disable the line in DLLMain: CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)D3Dinit, NULL, NULL, NULL);

which executes:
C++:
int D3Dinit(void)
{
	DWORD		hD3D, adr, *vtbl;
	hD3D = 0;
	do {
		hD3D = (DWORD)GetModuleHandle(D3Ddllname);
		Sleep(10);
	} while (!hD3D);
	adr = FindPattern(hD3D, 0x128000, (PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", "xx????xx????xx");
	if (adr) {
		memcpy(&vtbl, (void *)(adr + 2), 4);
		pReset = (oReset)DetourCreate((PBYTE)vtbl[RESET], (PBYTE)myReset, 5);
		pEndScene = (oEndScene)DetourCreate((PBYTE)vtbl[ENDSCENE], (PBYTE)myEndScene, 5);
	}
	return 0;
}
it works...any known problems with detours on windows 10?

thanks..it drives me crazy
Spectre
 
Last edited:

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
A better way to get the address for EndScene is to create a dummy device.

This code is everywhere... I believe I saw it first on CodeProject (for dx11 iirc) and Broihon also posted pretty much the same thing in a separate thread, this isn't my idea.
This is the last adaptation of the code that I've used, I pull the address from the vtable and setup a function pointer object thing then call the original function from the hook.

C++:
D3D* g_pD3D;

typedef HRESULT(__stdcall * _EndScene)(IDirect3DDevice9* pDevice);
_EndScene oEndScene;

HRESULT __stdcall hEndScene(IDirect3DDevice9* pDevice)
{
	if (g_pD3D)g_pD3D->Update(pDevice);
	return oEndScene(pDevice);
}

bool D3D::HookDX()
{
	IDirect3D9* pD3D = Direct3DCreate9(D3D_SDK_VERSION);
	D3DPRESENT_PARAMETERS d3dPP = { 0 };
	d3dPP.SwapEffect = D3DSWAPEFFECT_DISCARD;
	d3dPP.hDeviceWindow = GetForegroundWindow();
	d3dPP.Windowed = TRUE;

	IDirect3DDevice9* pDummy = nullptr;
	
	HRESULT hr = pD3D->CreateDevice(
		D3DADAPTER_DEFAULT,
		D3DDEVTYPE_HAL,
		d3dPP.hDeviceWindow,
		D3DCREATE_HARDWARE_VERTEXPROCESSING,
		&d3dPP, &pDummy);

	void** vTable = *(void***)(pDummy);

	oEndScene = (_EndScene)vTable[42]; //init our function pointer to call the orig function later.
	uintptr_t base = (uintptr_t)GetModuleHandle(0);
	
	return mem.Hook((void*)(base + 0xFC8B4), hEndScene, CALL, 6); //Hook where pDevice->EndScene() is being CALLED.
}
I doubt it's detours... I've used both 1.5 and 3.0 on Win10 successfully with no issues before.
 

Icew0lf

Software Ninjaneer
Dank Tier VIP
Fleep Tier Donator
Aug 20, 2013
603
17,558
43
i tried this one too. it have nothing to do with an injector obviously.

question is if the d3d9.dll from windows 7 and the same file under windows/system32 in windows 10 are DIFFERENT files? some 1 knows if i would need a different signature when using windows 10 ?
 

Roman_Ablo

Banned
Feb 27, 2017
355
2,402
1
pretty sure win10 doesnt favor dx9 anymore, but dx11 or some shit like that.
many people had that problem and i doubt theres one specific way to fix it, just try some stuff (there are some patches online) and see if it worx mate.
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,745
40,528
316
What Traxin said. The pattern method is unreliable as fuck.
And Axion, what on earth makes you think that Windows 10 doesn't support DirectX9
 

Roman_Ablo

Banned
Feb 27, 2017
355
2,402
1
What Traxin said. The pattern method is unreliable as fuck.
And Axion, what on earth makes you think that Windows 10 doesn't support DirectX9
didnt mean to say its not supported but that it may have issues now that dx11 or some shit like that is the standard on win10
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods