I am writing some dll injection and have discovered ReAttach is unable to pick up the process between Windows calls:
CreateProcess(...); // creates the process to hook
and the end of:
CreateRemoteThread(...) // Calls the DllMain I wish to debug
When CreateRemoteThread runs my target apps DllMain call, it doesn't attach in time to handle the DLL_PROCESS_ATTACH. I am able to break on the DLL_THREAD_ATTACH/DETACH and DLL_PROCESS_DETACH.
The only way I can debug is to place a breakpoint in my injector application prior to the CreateRemoteThread function then either run ReAttach or use Visual Studios "Attach to Process".