Is a prototype for startup code for a library NLM™.
#include <windows.h> BOOL DllMain ( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
(IN) Specifies the library handle when used.
(IN) Specifies a message or condition the library must handle. The message determines the value of the other two parameters.
(IN) Specifies an NLM handle when used.
If the message is successfully handled, it should return TRUE. Otherwise, it should return FALSE.
DllMain is not functionality exported by LibC, but is functionality that a developer of a library writes for that library.
The DllMain prototype preserves the Win32 Hungarianisms so that if you reference the Windows standard, you will see the same identifiers. For the Microsoft document, see DllMain.
This function is called with the following messages (the fdwReason parameter) and the table explains how your library should respond to these messages and what the other parameters are set to for that message.