need help with dll main

Posts 1–6 of 6 · Page 1 of 1
need help with dll main
Code:
bool Ready2Hook()
{
    if(GetModuleHandleA("CShell.dll")   != NULL
    && GetModuleHandleA("ClientFx.fxd") != NULL)
        return 1;
    return 0;
}
if i use this code to check the CShell.dll and ClientFx.fxd it dont works but if
if use this code with out ClientFx.fxd it makes the next step but then dont works crossfire more.
Quote Originally Posted by steffen123456789 View Post
bool Ready2Hook()
{
if((GetModuleHandleA("CShell.dll")) && (GetModuleHandleA("ClientFx.fxd")))
return 1;
return 0;
}
you forgot ) after CShell and ( before second GetModuleHandle
i have fixed it now
press thanks
i test it ^^
edit: no sorry but waht is false hmm her is the complet code
*i user win7 x64 c++ 2010

Code:
#include <iostream>
#include <windows.h>



#define WeaponMgr       0xA2A7E8
#define NoReload        0x2424

DWORD WINAPI Hacks(LPVOID)
{
    bool reload = true;
 

    while(1)
    {
        DWORD CShell     = (DWORD)GetModuleHandleA("CShell.dll");
	DWORD pWeaponMgr = *(DWORD*)(CShell + 0xA2A7E8);

	if(GetAsyncKeyState(VK_F2) || GetAsyncKeyState(VK_F3) &1) { reload = true; Beep((457, 180)); }


	if(reload)
	{
	    if (pWeaponMgr)
	    {
	        for(int i=0; i<445; i++)
		{
		    if((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) != NULL)
		        *(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) + 0x2424) = 999999; //scheinbarer standart 100
		}
	    }
	}

	Sleep(100);
    }
}

//i mean her is the problem [
bool Ready2Hook()
{
if(GetModuleHandleA("CShell.dll"))
   return 1;
return 0;
}
//]
DWORD WINAPI Wait(LPVOID)
{
    while(!Ready2Hook()) Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
    return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
    DisableThreadLibraryCalls(hDll);
    
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
	 MessageBoxA(0, "tt","tt", 0);

	CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0,0);
    }
    return 1;
}
Quote Originally Posted by steffen123456789 View Post
i test it ^^
edit: no sorry but waht is false hmm her is the complet code
*i user win7 x64 c++ 2010

Code:
#include <iostream>
#include <windows.h>



#define WeaponMgr       0xA2A7E8
#define NoReload        0x2424

DWORD WINAPI Hacks(LPVOID)
{
    bool reload = true;
 

    while(1)
    {
        DWORD CShell     = (DWORD)GetModuleHandleA("CShell.dll");
	DWORD pWeaponMgr = *(DWORD*)(CShell + 0xA2A7E8);

	if(GetAsyncKeyState(VK_F2) || GetAsyncKeyState(VK_F3) &1) { reload = true; Beep((457, 180)); }


	if(reload)
	{
	    if (pWeaponMgr)
	    {
	        for(int i=0; i<445; i++)
		{
		    if((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) != NULL)
		        *(float*)((*(DWORD*)((*(DWORD*)(CShell+0xA2A7E8))+(4*i))) + 0x2424) = 999999; //scheinbarer standart 100
		}
	    }
	}

	Sleep(100);
    }
}

//again here is the fix
bool Ready2Hook()
{
if((GetModuleHandleA("CShell.dll")) && (GetModuleHandleA("ClientFx.fxd")))
   return 1;
return 0;
}
//]
DWORD WINAPI Wait(LPVOID)
{
    while(!Ready2Hook()) Sleep(200);
	CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hacks, NULL, NULL, NULL);
    return 0;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
    DisableThreadLibraryCalls(hDll);
    
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
	 MessageBoxA(0, "tt","tt", 0);

	CreateThread(0,0,(LPTHREAD_START_ROUTINE)Wait,0,0,0);
    }
    return 1;
}
/msg2short
and it dont works at me *to giniyat202
no one have an idea?
Delete Dllmain from source file's.

Leecher using swiftshit base

Delete Dllmain from source file's.

Leecher using swiftshit base
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Talk with us