Making Trainers Using C++ And ASM [Maple Story]
So yea guys, I'm bored.
Well most of you want to make trainers, but you must know that in the beggining it's hard to learn the syntax of a language.
I wanted to become a good coder but I usually had no way to start, So I know how it feels...
That's why I am writing this tutorial for those of you who want to create/make trainers.
In this part (Part 1) I will be covering the injection method that I use to inject trainers into MapleStory. In the end of this tutorial you should be able to inject your .DLL into MapleStory process using any Injector program.
Okey, Let's start:
First you need to download
Visual C++ 2010
After you have it downloaded
Run your Visual C++ 2010 And select this:

After the selection of New Project.. you should see this window:

Select Win32 Project and name it whatever you want, for this tutorial I will be using:
"Tutorial" as project name or namespace.
After clicking next, should pop-up a window with "Previous", "Next", "Finish", "Cancel", click Next.
Select .DLL and Empty Project like this:

And click "Finish"
If all went right you should have something like this:

Right Click > Source Files > Add > New Item > And Select A .cpp type, name it MainDLL
This will be your Main DLL, the thing that will inject your trainer into MapleStory Process.
Now, Right Click > Header Files > Add > New Item > New Form, name it Form1 and proceed, a new window should pop up. Click YES
If all went right you should have something like this:

To keep it neat and clean, I usually move Form1.cpp to Source Files.
Anyway, Let's start with our code.
Double click Main DLL & add this:
This will be your code to inject into MapleStory Process, now move to your Form1.h > Right Click > View Code
Under #pragma once, write
This will call our Windows API for Win32 Projects.
Now Double click your Form1.cpp and add this under #include "Form1.h":

Now press F7 and If everything went fine, you should have a .DLL file in your Release Folder of your project.
Pick it up, inject into MapleStory Process and it should pop up normally .
Well most of you want to make trainers, but you must know that in the beggining it's hard to learn the syntax of a language.
I wanted to become a good coder but I usually had no way to start, So I know how it feels...
That's why I am writing this tutorial for those of you who want to create/make trainers.
In this part (Part 1) I will be covering the injection method that I use to inject trainers into MapleStory. In the end of this tutorial you should be able to inject your .DLL into MapleStory process using any Injector program.
Okey, Let's start:
First you need to download
Visual C++ 2010
After you have it downloaded
Run your Visual C++ 2010 And select this:

After the selection of New Project.. you should see this window:

Select Win32 Project and name it whatever you want, for this tutorial I will be using:
"Tutorial" as project name or namespace.
After clicking next, should pop-up a window with "Previous", "Next", "Finish", "Cancel", click Next.
Select .DLL and Empty Project like this:

And click "Finish"
If all went right you should have something like this:

Right Click > Source Files > Add > New Item > And Select A .cpp type, name it MainDLL
This will be your Main DLL, the thing that will inject your trainer into MapleStory Process.
Now, Right Click > Header Files > Add > New Item > New Form, name it Form1 and proceed, a new window should pop up. Click YES
If all went right you should have something like this:

To keep it neat and clean, I usually move Form1.cpp to Source Files.
Anyway, Let's start with our code.
Double click Main DLL & add this:
Code:
#include <windows.h>
extern void Main(void);
::BOOL WINAPI DllWork ( __in ::HMODULE hModule )
{
Main();
return true;
}
::BOOL WINAPI DllMain ( __in ::HMODULE hModule, __in ::DWORD dwReason, __in __reserved ::LPVOID lpvReserved )
{
::HANDLE hThread = NULL;
if ( dwReason == DLL_PROCESS_ATTACH )
{
if (( hThread = ::CreateThread(NULL, 0, (::LPTHREAD_START_ROUTINE)&DllWork, (::HMODULE)hModule, 0, NULL) ) == NULL )
{
return FALSE;
}
if ( ::CloseHandle(hThread) == FALSE )
{
//do nothing
}
}
return TRUE;
}
This will be your code to inject into MapleStory Process, now move to your Form1.h > Right Click > View Code
Under #pragma once, write
Code:
#include <Windows.h>
Now Double click your Form1.cpp and add this under #include "Form1.h":
Code:
using namespace Tutorial; // Your Project Name
void Main(void)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew Form1); // Your Form Name
Application::Exit();
}

Now press F7 and If everything went fine, you should have a .DLL file in your Release Folder of your project.
Pick it up, inject into MapleStory Process and it should pop up normally .





