Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 12:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



The Gamehacking Foundation Classes [GHF]

Discussion on The Gamehacking Foundation Classes [GHF] within the C/C++ forum part of the Coders Den category.

Reply
 
Old 05/20/2010, 19:57   #16


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by high9 View Post
Make sure that you can unhook without deleting the detours instructions. It annoys me that with ms detours you cannot remove a detour inside the detour because it removes the instructions.
huh? what do you mean by this? unhooking without deleting the instructions? o.O
the E9 instruction? what should I do with them instead of replacing them by the original ones? o.ō
MrSm!th is offline  
Old 05/20/2010, 20:37   #17
 
elite*gold: 0
Join Date: Aug 2009
Posts: 60
Received Thanks: 154
I mean, when you detour you generally copy the instructions (trampoline) you are overwriting with the jump. Don't delete the copied instructions. That way when you unhook it can still execute the copied instructions and get back.
high9 is offline  
Old 05/20/2010, 21:14   #18


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by high9 View Post
I mean, when you detour you generally copy the instructions (trampoline) you are overwriting with the jump. Don't delete the copied instructions. That way when you unhook it can still execute the copied instructions and get back.
ah, so you mean, the trampoline should not be deleted?
ok, this idea is new for me Could you give me an example? In which real world situation you could need this? If you can, I will add a flag for keeping the trampoline.

edit:

Ok, tomorrow I will finish the getOpLen method and I will be able to post the full detours class


edit2:

ah, now I remember!

to the include guards again:

Everything works fine, if the header is only included in one .cpp.
But if I include it in a second file I get an "already defined"-error.
The include guards are only to avoid double defining in one .cpp file and pragma once works global!
MrSm!th is offline  
Old 05/22/2010, 02:04   #19
 
elite*gold: 0
Join Date: Aug 2009
Posts: 60
Received Thanks: 154
Quote:
Originally Posted by MrSm!th View Post
ah, so you mean, the trampoline should not be deleted?
ok, this idea is new for me Could you give me an example? In which real world situation you could need this? If you can, I will add a flag for keeping the trampoline.

edit:

Ok, tomorrow I will finish the getOpLen method and I will be able to post the full detours class


edit2:

ah, now I remember!

to the include guards again:

Everything works fine, if the header is only included in one .cpp.
But if I include it in a second file I get an "already defined"-error.
The include guards are only to avoid double defining in one .cpp file and pragma once works global!
If you delete the trampoline when the hooked function is executing it has no way of returning.
high9 is offline  
Old 05/23/2010, 00:37   #20


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Errm, the tramoline is only deleted, when the function is unhooked, so this is no problem


edit:

Ok, I just added the source.

I hope you will download it and give feedback
MrSm!th is offline  
Old 05/23/2010, 21:07   #21
 
elite*gold: 0
Join Date: Jul 2009
Posts: 10
Received Thanks: 0
hey man i wana join.i no c# and learnt the basics of c++ in a week so was born to code. but i prefer c# so i would like to join. i can already find pointers,detect wherther a program is running etc
skamara is offline  
Old 05/23/2010, 21:41   #22


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
ohhh sorry! i found some critical logical mistakes in the code.

now the GHF:etours class is without any bug (at least i hope so)


Quote:
hey man i wana join.i no c# and learnt the basics of c++ in a week so was born to code. but i prefer c# so i would like to join. i can already find pointers,detect wherther a program is running etc
sorry, but like i said, it is written in c++.
if you have a good knowledge in object oriented techniques, you can help me with design decisions anyway

(we dont need any pointer scanning or something like this)
MrSm!th is offline  
Reply




All times are GMT +1. The time now is 12:36.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.