20.6.2 Creating the Initialization Function

Select uses the standard LibEntry function contained in the LIBENTRY.OBJ file. This function in turn calls a function named LibMain, which should be defined in the source code of the dynamic-link library and which performs library-specific initialization. Since Select does not require initialization beyond that provided by LibEntry, it simply returns a value of 1 to indicate success. The LibMain function of the Select library is defined as follows:

int FAR PASCAL LibMain(hinst, wDataSeg, cbHeapSize, lpszCmdLine)
HINSTANCE hinst;
WORD      wDataSeg,
WORD      cbHeapSize;
LPSTR     lpszCmdLine;
{
    return 1;
}