OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Windows requires that two functions be defined in every
32-bit DLLs DllEntryPoint serves as both the entry and exit function. DllEntryPoint is called each time the DLL is loaded or unloaded, each time a process attaches to or detaches from the DLL, and each time a thread within a process is created or destroyed.
Windows calls the entry procedure (LibMain or DllEntryPoint) once, when the library is first loaded. The entry procedure initializes the DLL; this initialization depends almost entirely on the particular DLL function, but might include the following tasks:
There is no need to initialize the heap because the DLL startup code (C0Dx.OBJ) initializes the local heap automatically.