Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 11:06

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

Advertisement



[C++]Metin2 How to Hook Game Function(Basic)

Discussion on [C++]Metin2 How to Hook Game Function(Basic) within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2013
Posts: 28
Received Thanks: 61
[C++]Metin2 How to Hook Game Function(Basic)

Here is a video :


Source :

Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include <detours.h>

// int sub_56E1B0(const char*)

typedef int(*tHook)(const char*) ;
tHook oHook; // our original function

int hHook(const char* a)
{
	return oHook("Hooked when original function called!");
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		oHook = (tHook) DetourFunction((PBYTE) 0x0056E1B0, (PBYTE) hHook);
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}
That offset for revision 26070 , you have to update it.
Its basic dont write silly comments.
LoveCpp is offline  
Thanks
9 Users
Old 08/27/2013, 23:52   #2
 
elite*gold: 260
Join Date: Jan 2013
Posts: 178
Received Thanks: 104
Thanks man you rock !!
Metin2 Team is offline  
Thanks
1 User
Old 08/28/2013, 00:41   #3
 
[The]Domco's Avatar
 
elite*gold: 45
Join Date: Mar 2011
Posts: 253
Received Thanks: 238
Yea nice :-) but some more explanation for some functions will be good :P
[The]Domco is offline  
Old 08/28/2013, 00:47   #4
 
elite*gold: 0
Join Date: Aug 2013
Posts: 28
Received Thanks: 61
which function that you wanna explanation?
LoveCpp is offline  
Old 08/28/2013, 09:05   #5
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
This is basic C++ and has nothing to do with Metin2.
#moverequest
Mi4uric3 is offline  
Thanks
1 User
Old 08/28/2013, 14:33   #6
 
elite*gold: 0
Join Date: Aug 2013
Posts: 28
Received Thanks: 61
i dont think metin2 developers dont hang out with c++ section and its about metin2 lol
LoveCpp is offline  
Old 08/28/2013, 15:15   #7
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by LoveCpp View Post
i dont think metin2 developers dont hang out with c++ section
Well that doesn't make your threads correct in the metin2-section.
Quote:
Originally Posted by LoveCpp View Post
and its about metin2 lol
No it's not. All your tutorials are like "how to call a function in memory", "how to hook a function in memory". This is not metin2-specific.
Mi4uric3 is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
[C++]Hook all Recv function Problem
08/21/2010 - C/C++ - 5 Replies
Hi Leute wenn ich send hooke egal welches läuft das alles super nur wenn ich irgendein recv hooke habe ich immer eine Packet size von 1000 bis 10000. sry das ich schon wieder nerve #include "WinSock2.h" #include <cstdio> #include <ctime> #include <fstream> #include <iomanip>
Hshield send function hook
10/11/2008 - Kal Online - 12 Replies
ey kann mir wer nen tipp geben wie man die addressen rauskriegt von int vom hshield für recv und send funktion damit die gehooked wird??
hilfe bei function hook verständnis
11/13/2006 - General Coding - 1 Replies
nvm.



All times are GMT +1. The time now is 11:06.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.