PDA

View Full Version : Errors copiling painkiller


itwasfunny
8th October 2004, 14:47
VS 2003 (not warez)
Painkiller source
Changing Hook
Changing fingerprint

=

1) error C2447: '{' : missing function header (old-style formal list?)

2)error C2039: 'm_bSB' : is not a member of 'CEvilSettings'

3)error C3861: 'HookDDrawCreate': identifier not found, even with argument-dependent lookup

4)error C3861: 'UnHookDDrawCreate': identifier not found, even with argument-dependent lookup

5)error C3861: 'UnHookDDrawCreate': identifier not found, even with argument-dependent lookup

6)error C2039: 'm_bSB' : is not a member of 'CEvilSettings'
c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\../painconfig\EvilSettings.h(28) : see declaration of 'CEvilSettings'

7)error C3861: 'HookDDrawCreate': identifier not found, even with argument-dependent lookup

8)c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\Allocator.cpp(8): warning C4273: 'SetLFH' : inconsistent dll linkage

9)c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\Allocator.cpp(28): warning C4273: 'GetLFH' : inconsistent dll linkage

10)c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\Allocator.cpp(38): warning C4273: 'Find' : inconsistent dll linkage

11)c:\Documents and Settings\Administrator\My Documents\PK HB
Addon\painkiller\Allocator.cpp(51): warning C4273: 'Add' : inconsistent dll linkage

12)c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\Allocator.cpp(63): warning C4273: 'Delete' : inconsistent dll linkage

13)c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\Allocator.cpp(87): warning C4273: 'DeleteAll' : inconsistent dll linkage

14)c:\Documents and Settings\Administrator\My Documents\PK HB Addon\painkiller\Allocator.cpp(100): warning C4273: 'GetAllocationSize' : inconsistent dll linkage





PLEASE HELP ME :dead:

3y3w4nn4ch34t
8th October 2004, 19:56
Those are basic errors. You need to have at least a little knowledge of c++ before trying to make your own hack. Take all the screenshot blocking stuff out and it will compile fine. The inconsistant dll linkage is just a warning. Its nothing to worry about.

itwasfunny
8th October 2004, 20:24
Take all the screenshot blocking stuff out and it will compile fine.

What i need to add at my hookhorks.cpp and painkiller.cpp for change my hook without Punkbuster ScreenShot Stuff???(painkiller source have SS Blocking inclued?)

or

What i need to Take out of SSBlocking?

3y3w4nn4ch34t
8th October 2004, 20:32
Use Visual studios search to find unhookdraw, hookdraw, and PBSB or SB and take it all out. In Hookworks it says what is used for screenshot blocking. So take all that out. Its very easy stuff. We cant do everything for you :bandit:

itwasfunny
8th October 2004, 20:37
In another thread you say "only 2 lines to add in hookworks.cpp"

What lines (without pbsb)??


Delete this=?

//*************************** DDRAW Anti Screenshot patch
void UnHookDDrawCreate()
{
VirtualProtect(pData, 8, PAGE_READWRITE, &OldProtect);
memcpy(pData, OriginalCode, 8);
VirtualProtect(pData, 8, OldProtect, NULL);
}

void __stdcall DirectDrawCreateHook()
{
#ifdef TESTMODE
fprintf(GameInfo.m_pLogFile, "PB SCREENSHOT\n");
#endif
DWORD LogoDisplayTime = GetTickCount() - GameInfo.m_LogoStartTime;
if (LogoDisplayTime > 60000)
GameInfo.m_bSpyWareWarn = true;
}

void HookDDrawCreate()
{
char RedirectionCode[] =
"\x50" // push eax
"\xB8\x00\x00\x00\x00" // mov eax, 0x00000000
"\xFF\xE0" // jmp eax
;

goto skip;
_asm
{
jumper:
pushad
call DirectDrawCreateHook
popad
pop eax
mov eax, FakeError
retn
}
skip:

unsigned int pHook;
_asm mov pHook, offset jumper;

RedirectionCode[2] = pHook & 0xFF;
RedirectionCode[3] = (pHook >> 8) & 0xFF;
RedirectionCode[4] = (pHook >> 16) & 0xFF;
RedirectionCode[5] = (pHook >> 24) & 0xFF;

pData = (unsigned char*)GetProcAddress(GetModuleHandle("DDRAW"), "DirectDrawCreate");

VirtualProtect(pData, 8, PAGE_READWRITE, &OldProtect);
memcpy(OriginalCode, pData, 8);
memcpy(pData, RedirectionCode, 8);
VirtualProtect(pData, 8, OldProtect, NULL);

if (FakeError != 0x00)
return;
srand(time(NULL));
int temp = rand() / (RAND_MAX / 6);

DWORD FakeErrorList[] =
{
DDERR_DIRECTDRAWALREADYCREATED,
DDERR_GENERIC,
DDERR_INVALIDDIRECTDRAWGUID,
DDERR_INVALIDPARAMS,
DDERR_NODIRECTDRAWHW,
DDERR_OUTOFMEMORY,
};

FakeError = FakeErrorList[temp];

}


And add only this:?!

//*************************** D3D8.dll HOOKS
unsigned char *pData;
DWORD OldProtect;
char OriginalCode[8];
DWORD FakeError = 0;
volatile long int bScreenshot = 0;

3y3w4nn4ch34t
8th October 2004, 21:02
Delete all that. Then follow my tutorial. You uncomment two lines.


Hookworks.cpp
Look for.....

DWORD Result = OldFn(lpFileName);
if (wcsstr(lpFileName, _TEXT("D3DDrv")) != 0)
{
// HookAPICalls(&D3DHook, (HMODULE)Result);
// hD3DDrvDll = (HMODULE)Result;
}
if (wcsstr(lpFileName, _TEXT("WinDrv")) != 0)
{
HookAPICalls(&DirectInput8Hook, (HMODULE)Result);
hWinDrvDll = (HMODULE)Result;
}
return Result;
}

And remove the comments ( // )

itwasfunny
8th October 2004, 21:52
**6 Errors**



1)c:\Documents and Settings\All Users\Desktop\PK HB Addon\painkiller\Tweaks.cpp(671): error C2447: '{' : missing function header (old-style formal list?)

I think this is because Fingerprint


2)c:\Documents and Settings\All Users\Desktop\PK HB Addon\painkiller\painkiller.cpp(397): error C2601: 'CheckSanity' : local function definitions are illegal

void CheckSanity()
{ <---SOMETHING WRONG HERE
if (GameInfo.m_Settings.m_CurrentVersion != CURRENT_VERSION)


3)c:\Documents and Settings\All Users\Desktop\PK HB Addon\painkiller\painkiller.cpp(424): error C2561: 'MessageProc' : function must return a value

//Begin Puusilma tweaks
if (!GameInfo.m_bTimerTrap && GameInfo.m_Arty > 0)
return; <--SOMETHING WRONG HERE
//End Puusilma tweaks


4)c:\Documents and Settings\All Users\Desktop\PK HB Addon\painkiller\painkiller.cpp(477): error C2146: syntax error : missing ';' before identifier 'pD3D8'

5)c:\Documents and Settings\All Users\Desktop\PK HB Addon\painkiller\painkiller.cpp(477): error C2065: 'SDKVersion' : undeclared identifier


5) and 4)=IDirect3D8* NewDirect3DCreate8(UINT SDKVersion)
//Set pointer to original device <--SOMETHING WRONG HERE


6)c:\Documents and Settings\All Users\Desktop\PK HB Addon\painkiller\painkiller.cpp(480): error C2440: 'return' : cannot convert from 'NewIDirect3D8 *' to 'LRESULT'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast

//Return pointer to wrapper
return pMyD3D8; [COLOR=Red]<--SOMETHING WRONG HERE
}




:( :( PLEASE HELP ME :( :(

GRrrrrrrrrrrrrrrrrrrr

I try to copile Painconfig folder and 11 ERRORS

Grrrrrrrrrrrrrrrrrrrrr

Forget people!! I give up

Dont help me

shdwwlkr
10th October 2004, 17:35
i got the same errors when i compiled also.i did like u did and created a seperate fingerprint source and header.i also did like eyewannacheat says and ignored the lines.
it compiled and it succeeded.now i have other problems tho but it did work in building.

i think of it this way.......unless I change the code then how could there be errors.read learn and trial with lots of errors i figure.

00kes
11th October 2004, 12:36
i got the same errors when i compiled also.i did like u did and created a seperate fingerprint source and header.i also did like eyewannacheat says and ignored the lines.
it compiled and it succeeded.now i have other problems tho but it did work in building.

i think of it this way.......unless I change the code then how could there be errors.read learn and trial with lots of errors i figure.


which problems do u have?

shdwwlkr
11th October 2004, 17:11
i get "Error creating process" whenever i click the launch button.
sucks cuz i like some of the pk mods.
btw ill be honest and upfront............im a cut and paster.so coding means nothing yet but its heling me learn.

ideas? i appreciate all help and say thanks.

MorganOLD
11th October 2004, 23:24
My painkiller uses bat file to launch. serach for lounch.bat and replace it with ArmyOps.exe. you also have to remove reg chacking function