I have read that there are some things that can "freeze" or halt the execution of DllMain if you do anything "interesting" directly in the main function. I've also heard that all this can be avoided by just wrapping what you want to do within a function and passing DllMain that function on DLL_PROCESS_ATTACH. My only question is what kind of things can you not do in DllMain and would wrapping them actually solve this problem? I am having trouble with a library executing even though everything that it does is wrapped within a function.
(P.S. Yes, I know the rules of the forum, understand the value of the rules themselves and will not ask for help with code or share any that could be considered malicious. (I read a similar thread posted a small while ago.))