I use this code the specifie the function when I want to call the DLL
Code:
void MainThread()
{
again:
SystemProcessesScan();
Sleep(350);
goto again;
}
extern "C" __declspec(dllexport) void Main() {
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Main Thread),NULL,0,0);
}
BOOL h = false;
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
if(!h) {
CreateThread(NULL,NULL,LPTHREAD_START_ROUTINE(Main Thread),NULL,0,0);
h = true;
}
return TRUE;
}
I would like to make it injectable and the MainThread is executed when the dll is injected with a simple injector. Without calling any function.
Thank you