home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / MTDEF.HPP < prev    next >
C/C++ Source or Header  |  1996-12-06  |  1KB  |  62 lines

  1. #ifndef _MTDEF_HPP
  2. #define _MTDEF_HPP
  3.  
  4.  
  5. //
  6. // Define the calling convention.  We use __stdcall for portability.
  7. //
  8.  
  9. #define METADEF  __stdcall
  10.  
  11. //
  12. // Define macros for importing & exporting things.
  13. //
  14.  
  15. #define METADECLSPEC_IMPORT //__declspec(dllimport)
  16. #define METADECLSPEC_EXPORT __declspec(dllexport)
  17.  
  18. #define OCXDECLSPEC_IMPORT //__declspec(dllimport)
  19. #define OCXDECLSPEC_EXPORT __declspec(dllexport)
  20.  
  21. //
  22. // Compile-time switches control how we define our classes.
  23. //
  24.  
  25. //
  26. // Normal, un-exported classes (temporarily, all classes
  27. // are exported).
  28. //
  29. #if defined( __BUILDING_DTWCM_DLL__ ) || defined( __BUILDING_DTJVA_DLL__ )
  30. //#define METACLASSDEF METADEF
  31. #define METACLASSDEF METADECLSPEC_EXPORT METADEF
  32. #else
  33. //#define METACLASSDEF METADEF
  34. #define METACLASSDEF METADECLSPEC_IMPORT METADEF
  35. #endif
  36.  
  37. //
  38. // Explicitly exported classes
  39. //
  40. #if defined( __BUILDING_DTWCM_DLL__ ) || defined( __BUILDING_DTJVA_DLL__ ) || defined( __BUILDING_DTJCL_DLL )
  41. #define METAEXPORTCLASSDEF METADECLSPEC_EXPORT METADEF
  42. #else
  43. #define METAEXPORTCLASSDEF METADECLSPEC_IMPORT METADEF
  44. #endif
  45.  
  46. //
  47. // Explicitly exported functions
  48. //
  49. #if defined( __BUILDING_DTWCM_DLL__ ) || defined( __BUILDING_DTJVA_DLL__ )
  50. #define METAEXPORTDEF __export METADEF
  51. #else
  52. #define METAEXPORTDEF METADEF
  53. #endif
  54.  
  55. #ifdef __BUILDING_OCX_DLL__
  56. #define OCXCLASSDEF OCXDECLSPEC_EXPORT METADEF
  57. #else
  58. #define OCXCLASSDEF OCXDECLSPEC_IMPORT METADEF
  59. #endif
  60.  
  61. #endif // _MTDEF_HPP
  62.