What's new

Closed Form in dll - visual c++

Status
Not open for further replies.

WhiteListv2

Addict
Joined
Sep 6, 2018
Posts
173
Reaction
37
Points
105
Age
34
Hello, in this little tutorial I will show you times as you can a form to a DLL project in Visual C + + Add, and so easybuttons etc reinziehen in your form and you can write with a double-click the code can.

1. New Create Visual C + + project
2. Win32 project

X6N53mC.png
MORE
s1Tc0BH.png
DLL+Empty Project:
Uw3iB6a.png
5.Finish


Sonextwe make aright click onSourceFiles andselect:
Add->New Item

Then we createacppfileand name itegmain.cpp.

Now we add there the following code:
PHP:
#include <windows.h>

extern int Main(); // Sagt dem Programm, dass die Funktion main nicht in der main cpp datei sondern woanders liegt.

void WINAPI MainThread( )
{Main(); // Führt die Funktion Main aus, wenn die DLL geladen wurde.
}

BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpvReserved )
{
switch ( dwReason ) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hModule);

if ( CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MainThread, NULL, 0, NULL) == NULL ) {
return FALSE;
}
break;
case DLL_PROCESS_DETACH:
break;

case DLL_THREAD_ATTACH:
break;

case DLL_THREAD_DETACH:
break;
}
return TRUE;
}

So next we make a right click on the header files and select:
Add-> New Item.

Now we choose Windows Form and call it bsw. Form1.

In the created Form1.cpp we add the following code:

PHP:
#include "Form1.h"
#include <windows.h>
using namespace std;
using namespace ProjectName; // Unser Projektname
[STAThreadAttribute]
int Main() // Die Funktion Main die aufgerufen wird.
{// Aktiviert die Styles etc...Application::EnableVisualStyles();Application::SetCompatibleTextRenderingDefault(false); Application::Run(gcnew Form1()); // Erstelle neue Form1 und führe diese aus.return 0;
}

If you are stuck just makes a Python Injector shape and in this example, Metin2 or IDA injectet, then that looks like this:

So you can see it works.

Credits:
BlackCheetah
 

Attachments

Status
Not open for further replies.

Similar threads

Back
Top