 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
andonrui Cheater
Reputation: 0
Joined: 22 Apr 2008 Posts: 33
|
Posted: Thu Mar 26, 2009 3:10 pm Post subject: GetDC patched? Msea 0.69 Hackshield Pro |
|
|
Hi,
Maplesea 0.69 getpixel no longer works, since getpixel is already trampoline could it be GetDC this is patch?
thanks
| Code: |
FARPROC fpGetDC = (FARPROC)GetDC + sizeof(ULONG_PTR) + 1;
ULONG_PTR ulGetDC = *(ULONG_PTR*)(GetDC+1);
__declspec(naked) HDC WINAPI xGetDC(HWND hWnd)
{
_asm
{
mov eax, [ulGetDC]
jmp [fpGetDC]
}
} |
i tried this bypass by irwin but got this error while compiling:
1>.\fpGetDC.cpp( : error C2296: '+' : illegal, left operand has type 'FARPROC'
1>.\fpGetDC.cpp(9) : error C2296: '+' : illegal, left operand has type 'HDC (__stdcall *)(HWND)'
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Sat Mar 28, 2009 5:45 pm Post subject: |
|
|
did you include windef.h?
or just windows.h should do the trick.
_________________
|
|
| Back to top |
|
 |
BanMe Master Cheater
Reputation: 0
Joined: 29 Nov 2005 Posts: 375 Location: Farmington NH, USA
|
Posted: Sat Mar 28, 2009 5:59 pm Post subject: |
|
|
| Code: |
#include <windows.h>
#include <tchar.h>
BOOL WINAPI CheckAndPatchGetDC()
{
BOOL bRet = FALSE;
BYTE GetDCAsm[15] = {0xB8,0x91,0x11,0x00,0x00,0xBA,0x00,0x03,0xFE, 0x7F,0xFF,0x12,0xC2,0x04,0x00};
bRet = (memcmp((void*)GetProcAddress(GetModuleHandle(_T("user32.dll")),"GetDC"),GetDCAsm,sizeof(GetDCAsm))== 0) ? TRUE : FALSE;
if(bRet)
{
return bRet;
}
else
{
memcpy((void*)GetProcAddress(GetModuleHandle(_T("user32.dll")),"GetDC"),GetDCAsm,sizeof(GetDCAsm));
bRet = (memcmp((void*)GetProcAddress(GetModuleHandle(_T("user32.dll")),"GetDC"),GetDCAsm,sizeof(GetDCAsm)) == 0) ? TRUE : FALSE;
}
return bRet;
}
|
sorry about the pm i wrote the code without compiling it and had minor syntax and header faults...
regards BanMe
_________________
don't +rep me..i do not wish to have "status" or "recognition" from you or anyone.. thank you. |
|
| Back to top |
|
 |
andonrui Cheater
Reputation: 0
Joined: 22 Apr 2008 Posts: 33
|
Posted: Sun Mar 29, 2009 3:03 am Post subject: |
|
|
Its okie BanMe, thank you so much for your assistance and you've been more than helpful i really appreciate. It compiled fine this time but its still patched, all it does is return -1 when i call Getpixel.
Regards.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|