Listing 3 libmain.cpp — defines the DLL startup and shutdown procedures that Windows requires

// LIBMAIN.CPP
// Define the DLL startup and shutdown procedures that
// Windows requires.

#include <windows.h>
extern "C" int FAR PASCAL _export
LIBMAIN( HANDLE, WORD, WORD wHeapSize, LPSTR )
{
        // Initializes the local heap (if there is one)
        // with a call to LocalInit which locks the data
        // segment.
    if ( wHeapSize != 0 )
        UnlockData( 0 );
        return 1;
}

int FAR PASCAL _export
WEP( int )
{
    return 1;
}
/* End of File */