Injecting but NULL... :D

Posts 1–5 of 5 · Page 1 of 1
Injecting but NULL... :D
Hi, guys! First of all the code down is not mine and the names of variables and shit are totaly mesh. I compile it without problems but when i try to inject with aouto injection nothing happenes the injector is w8ing for crossfire.exe. When i swich to munual inject the resul is injecting but nothing happens mo msg box . WTF why ? is the base the problem bcs it is from 2010 ? Acctualy no erros with xtrap... or the injector sucks... so here is the code : The text down is forrbiden for Z8Games so if you, Z8Games read this su** my *** and dont read down
Code:
#include <windows.h>

#define weaponMgr	0xA68F80
#define noWeaponChangeDelay  0x26A0



BOOL WINAPI BR (LPVOID)
{
	bool nwcd = true;
while(true)
{
			DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
			DWORD pWeaponMgr = *(DWORD*)(CShell + weaponMgr);
		
			if(nwcd)
			{
			if (pWeaponMgr)
			{
			for(int i=0; i<576; i++)
			{
			if((*(DWORD*)((*(DWORD*)(pWeaponMgr))+(4*i)) ) != NULL)
			*(float*)((*(DWORD*)((*(DWORD*)(pWeaponMgr)) +(4*i))) + noWeaponChangeDelay) = 9999;
			}
			}
			}

		Sleep(100);
	}
}

bool EY(void)
{
    if( GetModuleHandleA("CShell.dll")!= NULL)
        return true;
    return false;
}

DWORD WINAPI aR(LPVOID)
{
	while (!EY())
		Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)BR, NULL, NULL, NULL);
	return 0;
}

BOOL WINAPI DllMain ( HMODULE TP, DWORD aF, LPVOID lpReserved )
{
	DisableThreadLibraryCalls(TP);
	if ( aF == DLL_PROCESS_ATTACH )
	{
		MessageBoxA(0, "Test old base", "Injected", 0);
		CreateThread(NULL, NULL, aR, NULL, NULL, NULL);
	}
	return TRUE;
}
try renaming it to mlang.dll and put it in cf folder
it works like sxs.dll
@kmanev073

Are you using code::blocks?
if you are, change this:
Code:
BOOL WINAPI DllMain ( HMODULE TP, DWORD aF, LPVOID lpReserved )
to this:
Code:
extern "C" __declspec(dllexport) BOOL APIENTRY DllMain ( HMODULE TP, DWORD aF, LPVOID lpReserved )
Give that a try. Hope it helps
if u use injector, all ways run as admin and start patcher
ofc i use injector but i am xp and @_corn_ i use Microsoft Visual C++ 2010 Express

---------- Post added at 05:46 PM ---------- Previous post was at 05:33 PM ----------

BTW i injected it with mlang.dll and it gaves me a send error report These errors usually appear bcs of wrong addresses . but maybe the code inject somewhere else not in the correct place ?
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us