home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / dlldemo.pak / DLLSHELL.CPP < prev    next >
Text File  |  1997-07-23  |  1KB  |  45 lines

  1. // Borland C++ - (C) Copyright 1991, 1992 by Borland International
  2.  
  3. // Example program used to demonstrate DLL's. This file, is one of the
  4. // files used to build BITMAP.DLL which is used in the DLLDEMO program.
  5.  
  6. #define  STRICT
  7. #include <windows.h>
  8. #pragma hdrstop
  9.  
  10. // Turn off warning: Parameter '' is never used
  11. #pragma argsused
  12.  
  13. // Every DLL has an entry point LibMain || DllEntryPoint
  14. // and an exit point WEP.
  15. #if defined(__FLAT__)
  16. BOOL WINAPI DllEntryPoint( HINSTANCE hinstDll,
  17.                            DWORD fdwRreason,
  18.                            LPVOID plvReserved)
  19. #else /* not flat model  */
  20. int FAR PASCAL LibMain( HINSTANCE hInstance,
  21.                         WORD wDataSegment,
  22.                         WORD wHeapSize,
  23.                         LPSTR lpszCmdLine )
  24. #endif /* __FLAT */
  25. {
  26. #ifndef  __FLAT__
  27.  
  28. // The startup code for the DLL initializes the local heap(if there is one)
  29. // with a call to LocalInit which locks the data segment.
  30.  
  31.     if ( wHeapSize != 0 )
  32.         UnlockData( 0 );
  33. #endif
  34.     return 1;   // Indicate that the DLL was initialized successfully.
  35. }
  36.  
  37. // Turn off warning: Parameter '' is never used
  38. #pragma argsused
  39.  
  40. int FAR PASCAL WEP ( int bSystemExit )
  41. {
  42.     return 1;
  43. }
  44. 
  45.