home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 November / VPR9611B.ISO / vabasic / ntclnt.exe / DISK8 / data.8 / datab / INCLUDE / LIBLOAD.HH < prev    next >
Text File  |  1996-07-29  |  2KB  |  82 lines

  1. //----------------------------------------------------------------
  2. // $Source: /rcs/crcs/general/libload.hh,v $
  3. // Checked in by: $Author: ej1 $
  4. // $Date: 1996/03/26 21:34:59 $                 $Revision: 1.12 $
  5. //----------------------------------------------------------------
  6. //         Copyright(c) 1992, Visual Edge Software Ltd.
  7. //
  8. // ALL RIGHTS RESERVED. This notice is intended as a precaution
  9. // against inadvertent publication, and shall not be deemed to
  10. // consitute an acknowledgment that publication has occurred
  11. // nor to imply any waiver of confidentiality. The year included
  12. // in the notice is the year of the creation of the work.
  13. //----------------------------------------------------------------------
  14. // DESCRIPTION:
  15. //      This file contains the implementation class for
  16. //      loading shared libraries and DLL's.  To use
  17. //      libraries, include libmgr.hh instead.
  18. //----------------------------------------------------------------------
  19. #ifndef LIBLOAD_HH
  20. #define LIBLOAD_HH
  21.  
  22. #if defined(VSYS_WINDOWS)
  23. #       include <vtoolkit.hh>
  24.         typedef HINSTANCE VTDllInstance;
  25. #else
  26. #if defined(_OS2)
  27. #       define INCL_DOS
  28. #       include <os2.h>
  29.         typedef HMODULE VTDllInstance;
  30. #else
  31. #if defined(SVR4_DLL)
  32. #       if defined(sun4)
  33.                 extern "C" {
  34. #       endif
  35. #       include <dlfcn.h>
  36. #       if defined(sun4)
  37.                 }
  38. #       endif
  39.         typedef void* VTDllInstance;
  40. #else
  41. #if defined(IBM_DLL)
  42. #       include <dllibmr2.hh>
  43.         typedef void* VTDllInstance;
  44. #else
  45. #       if defined(HP_DLL)
  46. #               include <dl.h>
  47.                 typedef shl_t VTDllInstance;
  48. #       endif
  49. #endif
  50. #endif
  51. #endif
  52. #endif
  53. #ifdef VSYS_MAC
  54. #    include <libload.hh.00.h>
  55. #endif
  56.  
  57. #include <libbase.hh>
  58.  
  59. class VePlatformLibrary: public VeLibrary
  60. {
  61.     public:
  62.  
  63.         VMETHODDECL(void *) Address (const char *funcName);
  64.  
  65.     protected:
  66.  
  67.         VOPERDECL VePlatformLibrary(     const char      *libName,
  68.                                         VeLibraryMgr     *manager,
  69.                                         VTDllInstance   instance);
  70.  
  71.         virtual VOPERDECL ~VePlatformLibrary();
  72.  
  73.         friend VFUNCDECL(VeLibrary *) VeCreateLibrary(
  74.                                                 const char      *fname,
  75.                                                 VeLibraryMgr     *manager);
  76.  
  77.         VTDllInstance itsInstance;
  78.  
  79. };
  80.  
  81. #endif // LIBLOAD_HH
  82.