Note that you should never, ever return FALSE from DllMain.  The reason is that if you are 
 
using implicit dynamic linking, what this does is cause the entire app to fail to load. 
 
What this does is generate a tech support call with the only available information "It 
 
didn't load", which is a Really Bad Idea.  What I do is set a flag that indicates there is 
 
a failure in DLL loading, and then later I can decide what to do (for example, all the 
 
interfaces return an error code to indicate that initialization failed).  This allows me 
 
to give meaningful results to the user when there is a failure. 关键第一句