Dark_Byte's Speedhack source code

Posts 61–75 of 86 · Page 5 of 6
I'm not interested in using it as much as figuring out how it works. I'm still having a hard time trying to understand the pointer to a function, but I'll figure it out soon enough. Plz don't give me anymore hints otherwise that would defeat the point, but thanks for the help. I mean hell you wrote the whole thing... xD


Actually one more question:
Where in the hell did you find DetourFunction. I've tried looking through MSDN. And I can't find it, but then again... I'm not that good with looking through MSDN. It's not nearly as organized as the JAVA API. :L
This explains how that Enrique dude "edited" the speed hack... Encase you don't know, it's the guy with the avatar of a fat dude wearing a bra...
LMAO, thats basicly the old CE speedhack with a few graphical changes.
Hmmm... what's this o_O? This code posted in this thread will not compile immediately It needs some slight changes made to it. And secondly you would have to compile it in Delphi. We are still working on completely translating the code to C++. Almost done though thanks to Hell_Demon
I'm once again sorry for the late reply, I dont visit around here often ^^

You'll need Detours Library(I am using 1.5, i think the latest version is 2.1 correct me if im wrong)

Sorry, you'll have to google for it since I just saw linking to stuff outside these forums is not allowed.
Quote Originally Posted by Hell_Demon View Post
I'm once again sorry for the late reply, I dont visit around here often ^^

You'll need Detours Library(I am using 1.5, i think the latest version is 2.1 correct me if im wrong)

Sorry, you'll have to google for it since I just saw linking to stuff outside these forums is not allowed.
Pfff I link to stuff all the time It's really just advertising that's not allowed.
Anyway I'm still really confused. I might come back to this later on after I learn about pointers to functions and how the Dll Main thing works @.@
Quote Originally Posted by why06 View Post
Pfff I link to stuff all the time It's really just advertising that's not allowed.
Anyway I'm still really confused. I might come back to this later on after I learn about pointers to functions and how the Dll Main thing works @.@
HURR DURR DURR :P

DllMain info
Quote Originally Posted by why06 View Post
Pfff I link to stuff all the time It's really just advertising that's not allowed.
Anyway I'm still really confused. I might come back to this later on after I learn about pointers to functions and how the Dll Main thing works @.@
TBH I'd laugh so hard if you got a 1 day ban for that xD.
Quote Originally Posted by zeco View Post
TBH I'd laugh so hard if you got a 1 day ban for that xD.
Lol. i do have a habit of getting banned quite often on about any forum I joined. I was perma-banned the first week on MPGH :P I don't even remember exactly why now???

Anyway I usually get unbanned eventually. And if HD gets in trouble i'll take the rap for him ;P And thanks for the link.

EDIT:

After a bit of searching I found the data types HD was using in his code: http://msdn.microsoft.com/en-us/libr...51(VS.85).aspx
I have seen these pre-typedefined types used in a lot of hack codes and I was always wondering what they meant. When I saw u write PBYTE I was like: "wdf does he mean Petabyte! o_O?!" but apparently it's just a pointer to a BYTE (BYTE*) or a pointer to an unsigned char (unsigned char*)
Quote Originally Posted by Hell_Demon View Post
if(GetAsyncKeyState(VK_NUMPAD0)&1)
More questions I know... but why did you test the 0th bit here? is it nccessary?
if the MSB is set for GetAsyncKeyState that means the Key Is Pressed
the LSB means the key has been pressed since the last time GetAsyncKeyState was called... not recommend by MS since another app could in theory call it and clear it.
Quote Originally Posted by why06 View Post
More questions I know... but why did you test the 0th bit here? is it nccessary?
well, see for yourself why I use it:

Code:
#include <windows.h>
#include <iostream>
using namespace std;

int main()
{
	while(1)
	{
		if(GetAsyncKeyState(VK_NUMPAD0)&1)
		{
			cout<<"numpad 0 is pressed :)\n";
		}
		if(GetAsyncKeyState(VK_NUMPAD1))
		{
			cout<<"numpad 1 is pressed :)\n";
		}
		if(GetAsyncKeyState(VK_NUMPAD5))
		{
			break;
		}
		Sleep(1);
	}
	return 0;
}
press numpad 0 and 1 once and see the difference

numpad0 will output it once for a single press, unless you hold it down for a few seconds
numpad 1 spam the text.

Therefor I prefer using &1 for toggles since it doesnt get switched back over a million times
Use Registerhotkey instead of GetAsyncKeystate.
Quote Originally Posted by Micheltjuh View Post
Use Registerhotkey instead of GetAsyncKeystate.
Why? Just curious of the benefits over getasynckeystate
Omg I'm God In Delphi Im'a Totally Re-wire This Hack! Thanks...
Posts 61–75 of 86 · Page 5 of 6
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us