OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
LibMain

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:

ParameterDescription
hInstanceinstance handle of the DLL.
wDataSegvalue of the data segment (DS) register.
cbHeapSizesize of the local heap specified in the module definition file for the DLL.
lpCmdLinefar 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.

See Also