LUDIX-BoT Forum
 
HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 OpenGL Hook Class

Go down 
AuthorMessage
Shagrath



Posts : 57
Join date : 2009-10-10
Location : Istanbul/Turkey

PostSubject: OpenGL Hook Class   Thu Oct 22, 2009 6:05 am

Wrote this class tonight. Its like other TLS hooks with some important improvements:

- finds offsets automatically
- extended functionality to hook gl functions TLS doesn't contain (i.e. glViewport, glFinish etc.. 50-150+ funcs can't remember clearly)
- already built in functionality to remove hooks

other features:

- Undetected by all? anti-cheats.
- Will hook opengl in any application/game

Edit: made a change, no longer finds the main thread (wasn't a great method). You should call GLInit from inside the main game thread (e.g inside a hook thats being called by the game thread) not your own DllMain if you have injected with a thread method.

Example Usage
Code:
CGLHook glhook;

typedef void (__stdcall *glFinish_t)();
glFinish_t o_glFinish;

void __stdcall h_glFinish()
{
    MessageBox(0, "glFinish hooked!", 0, 0);
    o_glFinish();
}

// after the main game thread is created (leave 8seconds after your dllMain is called or more to be safe)
if(glhook.Init())
{
    o_glFinish = (glFinish_t) glhook.Hook("glFinish", h_glFinish);
}

and to unhook:
Code:
glhook.UnHook("glFinish", o_glFinish);

Click Here to Download
Back to top Go down
View user profile
SUXXX
Admin
Admin


Posts : 66
Join date : 2009-10-10

PostSubject: Re: OpenGL Hook Class   Sat Oct 24, 2009 8:24 am

Thanks alot man .. i would make some tutorials for cuBot Source.
Back to top Go down
View user profile http://ludix-bot.tk
Shagrath



Posts : 57
Join date : 2009-10-10
Location : Istanbul/Turkey

PostSubject: Re: OpenGL Hook Class   Sat Oct 24, 2009 9:00 am

Smile great idea
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: OpenGL Hook Class   

Back to top Go down
 
OpenGL Hook Class
Back to top 
Page 1 of 1
 Similar topics
-
» class, what to choose
» Phoenix-Class PCG Reliant
» SNIPER CLASS FRIGATE
» Clan Repartidores de pizzas nº69 3º in class ES
» Two new ChessGUI books

Permissions in this forum:You cannot reply to topics in this forum
LUDIX-BoT Forum :: Coding :: General Coding-
Jump to: