All pastes #338795 Raw Edit

Unnamed

public cpp v1 · immutable
·published 2007-02-03 18:29 UTC
rendered paste body
FARPROC WINAPI Hooked_GetProcAddress( HMODULE hModule, LPCSTR lpProcName ){	FARPROC fpRez = pGetProcAddress( hModule, lpProcName );	char* szLibName = new char[256];	GetModuleFileName( hModule, szLibName, 256 );	if( strstr( szLibName, "client" ) && strstr( lpProcName, "CreateInterface" ) )		add_log( "ClientFactory [0x%X]", fpRez );	if( strstr( szLibName, "client" ) && g_bHookedClient == false )	{		if( !strcmp( lpProcName, "CreateInterface" ) )		{			add_log( "CreateInterface hook" );			g_bHookedClient = true;			g_ClientFactory = ( CreateInterfaceFn )fpRez;			return ( FARPROC )ClientFactory;		}	}	return fpRez;}