00001 // Borland C++ - (C) Copyright 1991, 1992 by Borland International 00002 00003 // Example program used to demonstrate DLL's. This file is used in the DLLDEMO program. 00004 00005 #define STRICT 00006 #include <windows.h> 00007 #pragma hdrstop 00008 00009 // Turn off warning: Parameter '' is never used 00010 #pragma argsused 00011 00012 // Every DLL has an entry point LibMain || DllEntryPoint 00013 // and an exit point WEP. 00014 #if defined(__FLAT__) 00015 BOOL WINAPI DllEntryPoint( HINSTANCE hinstDll, 00016 DWORD fdwRreason, 00017 LPVOID plvReserved) 00018 #else /* not flat model */ 00019 int FAR PASCAL LibMain( HINSTANCE hInstance, 00020 WORD wDataSegment, 00021 WORD wHeapSize, 00022 LPSTR lpszCmdLine ) 00023 #endif /* __FLAT */ 00024 { 00025 #ifndef __FLAT__ 00026 00027 // The startup code for the DLL initializes the local heap(if there is one) 00028 // with a call to LocalInit which locks the data segment. 00029 00030 if ( wHeapSize != 0 ) 00031 UnlockData( 0 ); 00032 #endif 00033 return 1; // Indicate that the DLL was initialized successfully. 00034 } 00035 00036 // Turn off warning: Parameter '' is never used 00037 #pragma argsused 00038 00039 int FAR PASCAL WEP ( int bSystemExit ) 00040 { 00041 return 1; 00042 } 00043