Hi guys,
this is a simple code for a dll, that call a Windows Form at injection
Used: Visual C++ 2008 Express Edition ( for me ), however you this code is thinked for Vc++, so i don't know if work well with embarcadero or Qt or other ide
Step 1: Create new empty project ( Win32 ) - Dynamic Lib;
Step 2: Add to solution the file "Main.dll", open the file and paste this code:
Code:
#include <windows.h>
#include "Linker.h"
void WINAPI MyThread ( )
{
}
switch ( dwReason ) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hModule);
if ( CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Main, NULL, 0, NULL) == NULL ) {
return FALSE;
}
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
return TRUE;
}
Step 3: Add a new Form, name "Form1", now open Form1.cpp and paste this code:
Code:
#include "Form1.h"
#include <Windows.h>
using namespace bot;
[STAThreadAttribute]
int Main()
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
}
Step4: Add a linker in the solution with this content:
Just Finish!
Credits to The Nu||z for the code.
Sorry for my bad english, i'm italian
The Tut ins't copied, if you found it in italian forum i have post it