05-24-2007 06:00 AM
05-24-2007 02:44 PM
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 LoadLibrary 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 GetLastError.
When the system calls the DLLMain function with any value other than DLL_PROCESS_ATTACH, the return value is ignored.
The Win32 SDK is available on line at the microsoft website and it's included in the CVI FSD version.
Menchar