Tien un très bon injecteur pour toi made by me :p
#include < iostream >
#include < windows.h >
bool InjectDLL( HANDLE handle, const char* pathOfDLL )
{
void *Lib, *Str;
Lib = ( void* )GetProcAddress( GetModuleHandle(L"kernel32.dll"), "LoadLibraryA");
Str = ( void* )VirtualAllocEx( handle, NULL, strlen( pathOfDLL ), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
WriteProcessMemory( handle, ( void* )Str, pathOfDLL, strlen( pathOfDLL ), NULL);
CreateRemoteThread( handle, NULL, NULL, (LPTHREAD_START_ROUTINE)Lib, ( void* )Str, NULL, NULL);
return true;
}
int main( int ArgCount, char** Args )
{
STARTUPINFO startupInfo;
PROCESS_INFORMATION processInfo;
memset( &startupInfo, 0x00, sizeof( STARTUPINFO ) );
memset( &processInfo, 0x00, sizeof( PROCESS_INFORMATION ) );
startupInfo.cb = sizeof( STARTUPINFO );
if( CreateProcess( L"./gta_sa.exe", L" ICI les argument et tout :p", NULL, NULL, true, CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &startupInfo, &processInfo ) == false )
{
// ICI GTA ne s'est pas lancé
return 0;
}
InjectDLL ( processInfo.hProcess, "samp.dll" );
return 0;
}