Must Return A Value :S

Posts 1–15 of 17 · Page 1 of 2
Must Return A Value :S
Hi All I Was Wondering If You Guys Know How To Fix My Little Error Here In C++

My Error V
Code:
1>c:\users\cory\documents\visual studio 2010\projects\blahblahblah\blahblahblah\main.cpp(19): error C4716: 'Main' : must return a value
Code:
#include<windows.h>
#include<iostream>

using namespace std;

DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll"); 

DWORD WINAPI Main() {

Sleep(1000);

bool AmmoDamage = true;

if(AmmoDamage) {
for(int i=0 ; i<445 ; i++)
*(float*)( (*(DWORD*)((*(DWORD*)(CShellBase+0xA0F338))+(4*i))) + 0x07F8) = FLT_MAX ;
}

}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
 DisableThreadLibraryCalls(hDll);
 if ( dwReason == DLL_PROCESS_ATTACH ) {
	 MessageBoxA(0, "{Banned}**HACKER**", "CrossFire Hack Z8games", 0);
CreateThread(NULL, 0, 0, Main, 0, NULL);
 } 
return TRUE;
}
Any Help Please :S
-.- go learn something / take a class then come back thanks bye
Learn c++. this is really the basics.
I think that it should be done like this :
[html]
#include<windows.h>
#include<iostream>

using namespace std;

DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll");

DWORD WINAPI Main() {

Sleep(1000);

bool AmmoDamage = true;

if(AmmoDamage) {
for(int i=0 ; i<445 ; i++)
*(float*)( (*(DWORD*)((*(DWORD*)(CShellBase+0xA0F338))+(4*i)) ) + 0x07F8) = FLT_MAX ;
}
return 0;
}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH ) {
MessageBoxA(0, "{Banned}**HACKER**", "CrossFire Hack Z8games", 0);
CreateThread(NULL, 0, 0, Main, 0, NULL);
}
return true;
}
[/html]
Well i am not quite sure.. i have started learning C++ too
Quote Originally Posted by Fly3r View Post
I think that it should be done like this :
[html]
#include<windows.h>
#include<iostream>

using namespace std;

DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll");

DWORD WINAPI Main() {

Sleep(1000);

bool AmmoDamage = true;

if(AmmoDamage) {
for(int i=0 ; i<445 ; i++)
*(float*)( (*(DWORD*)((*(DWORD*)(CShellBase+0xA0F338))+(4*i)) ) + 0x07F8) = FLT_MAX ;
}
return 0;
}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH ) {
MessageBoxA(0, "{Banned}**HACKER**", "CrossFire Hack Z8games", 0);
CreateThread(NULL, 0, 0, Main, 0, NULL);
}
return true;
}
[/html]
Well i am not quite sure.. i have started learning C++ too
I think he's right. On the "WINAPI Main" you must return a value. But I'm not sure...
lol works fine for me? no error
Code:
#include <windows.h>
#include <iostream>

using namespace std;

DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll"); 

DWORD WINAPI Main() {

Sleep(1000);

bool AmmoDamage = true;

if(AmmoDamage) {
for(int i=0 ; i<445 ; i++)
*(float*)( (*(DWORD*)((*(DWORD*)(CShellBase+0xA0F338))+(4*i))) + 0x07F8) = FLT_MAX ;
}
return 0;
}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
 DisableThreadLibraryCalls(hDll);
 if ( dwReason == DLL_PROCESS_ATTACH ) {
	 MessageBoxA(0, "{Banned}**HACKER**", "CrossFire Hack Z8games", 0);
CreateThread(NULL, 0, 0, Main, 0, NULL);
 } 
return true;
}
All this code are old and leeched
Old & Leeched = True .. but He wants to Update it ..
Thank me if my edited Source Code helped U.. the one i posted
Although i am not quite Sure that it is right but ..
It returns a Value in the WINAPI Main
Code:
#include<windows.h>
#include<iostream>

using namespace std;

DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll"); 

DWORD WINAPI Main() {

Sleep(1000);

bool AmmoDamage = true;

if(AmmoDamage) {
for(int i=0 ; i<445 ; i++)
*(float*)( (*(DWORD*)((*(DWORD*)(CShellBase+0xA0F338))+(4*i))) + 0x07F8) = FLT_MAX ;
}
return NULL;
}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
 DisableThreadLibraryCalls(hDll);
 if ( dwReason == DLL_PROCESS_ATTACH ) {
	 MessageBoxA(0, "{Banned}**HACKER**", "CrossFire Hack Z8games", 0);
CreateThread(NULL, 0, 0, Main, 0, NULL);
 } 
return true;
}
i think u need to put return NULL; and btw is this base working? cus i have problems to make base i wasnt active so things from my head like to wanish enjoy if i help!
Quote Originally Posted by ludikrimos View Post
Code:
#include<windows.h>
#include<iostream>

using namespace std;

DWORD CShellBase = (DWORD)GetModuleHandleA("CShell.dll"); 

DWORD WINAPI Main() {

Sleep(1000);

bool AmmoDamage = true;

if(AmmoDamage) {
for(int i=0 ; i<445 ; i++)
*(float*)( (*(DWORD*)((*(DWORD*)(CShellBase+0xA0F338))+(4*i))) + 0x07F8) = FLT_MAX ;
}
return NULL;
}


BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved ) {
 DisableThreadLibraryCalls(hDll);
 if ( dwReason == DLL_PROCESS_ATTACH ) {
	 MessageBoxA(0, "{Banned}**HACKER**", "CrossFire Hack Z8games", 0);
CreateThread(NULL, 0, 0, Main, 0, NULL);
 } 
return true;
}
i think u need to put return NULL; and btw is this base working? cus i have problems to make base i wasnt active so things from my head like to wanish enjoy if i help!
Completely wrong.
why completely? this is not my i need some base too to kill my bored time and why NULL is wrong? than return 0;??
I dont know if i am right but .. i think null isnt a Value
Just do whatever you want as long as the .dll has all of the correct components..
It says it must return a value.. so do it

Try not leeching?

Code:
return 0;

or even the dllmain code...

return true;
not hard
I Debugged 1 error

error C2065: 'FLT_MAX' : undeclared identifier
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Tags for this Thread

None

Talk with us