When the system calls the
DllMain function with the
DLL_PROCESS_ATTACH value, the function
returns
TRUE if it succeeds or
FALSE if initialization fails. If the return value is
FALSE
when
DllMain is called because the process uses the
function,
LoadLibrary returns NULL.
(The system immediately calls your entry-point function with
DLL_PROCESS_DETACH and unloads the DLL.)
If the return value is
FALSE when
DllMain is called during process initialization, the process terminates
with an error. To get extended error information, call
.