Slot5.obj : error LNK2005: _DllMain@12 already defined in dllmain.obj
When I press the Build Solution i got this Error can someone help me ?
Code:
// Slot51.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include <stdio.h>
#include <Windows.h>
#include "Pointers.h"
#include "Offsets.h"
HANDLE Warrock;
DWORD* Player = ( DWORD* ) PlayerPointer;
DWORD* Server = ( DWORD* ) ServerPointer;
void NoFallDamage()
{
*(float*) ( Player + FallDamage ) = -20000;
}
void Slot()
{
*(long*)( ServerPointer + Slot_5)=1;
}
void CodeThread()
{
for(;;)
{
if ( *Player )
{
NoFallDamage();
}
if ( *Server )
{
Slot();
}
Sleep ( 200 );
}
}
BOOL WINAPI DllMain ( HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved )
{
if ( dwReason == DLL_PROCESS_ATTACH )
{
MessageBoxA ( NULL, "DLL was injected successfully.", "SeptFicelle", MB_OK );
MessageBoxA ( NULL, "Thanks for using my source code. =)", "SeptFicelle", MB_OK );
CreateThread ( 0, 0, ( LPTHREAD_START_ROUTINE ) CodeThread, 0, 0, 0 );
}
return TRUE;
}
Code:
Offsets.h
#define FallDamage 0x103A4
#define Slot_5 0x1021A4
Pointers.h
#define PlayerPointer 0xC62388
#define ServerPointer 0xB5D0F8