I’ve read that it isn’t safe to call LoadLibrary() from DllMain [source].
But is it safe to call from the entry-point of a console application, main()? I can’t seem to find any information on this.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it is safe. If you couldn’t call
LoadLibraryfrommainyou couldn’t call it from anywhere in a console process, which would be daft.DllMainis special because the “loader lock” is held during the call and it is called (for statically linked DLLs) before the process is fully initialized.