home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / SRC / LIBMAIN.CPP < prev    next >
C/C++ Source or Header  |  1996-01-05  |  1KB  |  61 lines

  1. /*  $Id$
  2. **
  3. **  Copyright (C) 1994 Tarma Software Research. All rights reserved.
  4. **
  5. **  FILE:    libmain.c
  6. **
  7. **  PROJECT:    Tarma Library for C++
  8. **
  9. **  CONTENTS:    Implementation of LibMain() for Windows 3.x DLL
  10. **
  11. **  AUTHOR:    Ron van der Wal
  12. **
  13. **  COMMENTS:    This file should go into its own DLL. It should not be put
  14. **        in the normal TLX library.
  15. **
  16. **  $Log$
  17. */
  18.  
  19. //----- System headers
  20.  
  21. #include <stdio.h>
  22.  
  23. #define STRICT
  24. #include <windows.h>
  25.  
  26. //----- Library headers
  27.  
  28. #include <tlx\501\tlx.h>
  29.  
  30. /* Assume far data pointers throughout */
  31.  
  32. #ifndef _DATA_FAR
  33. #error This code requires FAR data throughout
  34. #endif
  35.  
  36. #pragma argsused
  37.  
  38. #ifdef __TURBOC__
  39.   extern _floatconvert;
  40.   #pragma extref _floatconvert
  41. #else
  42.   #error You might need to insert a floating point reference here
  43. #endif
  44.  
  45. /*-------------------------------------------------------------------------*/
  46.     extern "C" int FAR PASCAL LibMain(
  47.     HINSTANCE   hInstance,
  48.     WORD        wDataSeg,
  49.     WORD        cbHeapSize,
  50.     LPSTR        lpCmdLine)
  51. /*
  52.     DLL entry function. Initializes the resources used by the DLL.
  53. */
  54. {
  55.     if (cbHeapSize > 0)
  56.     UnlockData(0);
  57.  
  58.     return 1;
  59. }
  60.  
  61.