I've got a Win32 exe which I want to convert into an injectable Dll file. This is what I tried:
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH) {
CreateThread(NULL, 0, &WinMain, NULL, 0, NULL); //This doen't work...
}
return 1;
}
I don't know how to make it call WinMain on attach. How do I do it the right way. Thanks for your help.