
February 3rd, 2013, 12:35 PM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 13 m 11 sec
Reputation Power: 0
|
|
|
External libraries & dlls - [HELP] Injectable DLL, without function calling.
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 ti just make it injectable and the MainThread is execute when the dll is injected with a simple injector. Without calling the function Main()
Please help, thank you 
|