OWLNext 7.0
Borland's Object Windows Library for the modern age
|
The 16-bit DLL entry procedure, LibMain, is defined as follows:
LibMain, HINSTANCE, uint16, and LPSTR are defined in windows.h. The parameters are described in the following table:
Parameter | Description |
hInstance | instance handle of the DLL. |
wDataSeg | value of the data segment (DS) register. |
cbHeapSize | size of the local heap specified in the module definition file for the DLL. |
lpCmdLine | far pointer to the command line specified when the DLL was loaded. This is almost always null, because typically DLLs are loaded automatically without parameters. It is possible, however, to supply a command line to a DLL when it is loaded explicitly. |
The return value for LibMain is either 1 (successful initialization) or 0 (unsuccessful initialization). Windows unloads the DLL from memory if 0 is returned.