home *** CD-ROM | disk | FTP | other *** search
/ Popular Software Hundred Flowers Garden / POPSOFT_BHW.iso / SOFTWARE / MPEG / MpegGator / DATA.1 / def.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-14  |  2.3 KB  |  103 lines

  1. #ifndef    __DEF__
  2. #define    __DEF__
  3.  
  4. // You can define three choice
  5. //    CLEXP, CLIMP, CLNULL
  6.  
  7. #ifdef    CLEXP
  8. #define    CLPREF    __declspec(dllexport)
  9. #elif    CLIMP
  10. #define    CLPREF    __declspec(dllimport)
  11. #else    // CLNULL
  12. #define    CLPREF
  13. #endif
  14.  
  15. #ifndef    EXTERN_C
  16. #define    EXTERN_C    extern "C"
  17. #endif    //EXTERN_C
  18.  
  19. //--------------------------------
  20. #ifndef WIN32
  21.     #ifndef FNLOCAL
  22.         #define FNLOCAL     NEAR PASCAL
  23.         #define FNCLOCAL    NEAR _cdecl
  24.         #define FNGLOBAL    FAR PASCAL
  25.         #define FNCGLOBAL   FAR _cdecl
  26.  
  27.         #ifdef _WINDLL
  28.             #define FNWCALLBACK FAR PASCAL __loadds
  29.             #define FNEXPORT    FAR PASCAL __export
  30.         #else
  31.             #define FNWCALLBACK FAR PASCAL
  32.             #define FNEXPORT    FAR PASCAL __export
  33.         #endif
  34.     #endif
  35.  
  36.     #ifndef FIELD_OFFSET
  37.         #define FIELD_OFFSET(type, field)    ((LONG)&(((type *)0)->field))
  38.     #endif
  39.  
  40.     #define BCODE           _based(_segname("_CODE"))
  41.  
  42.     #define HUGE            _huge
  43.     //
  44.     //  stuff for Unicode in Win 32--make it a noop in Win 16
  45.     //
  46.     #ifndef _TCHAR_DEFINED
  47.         #define _TCHAR_DEFINED
  48.         typedef char            TCHAR, *PTCHAR;
  49.         typedef unsigned char   TBYTE, *PTUCHAR;
  50.  
  51.         typedef PSTR            PTSTR, PTCH;
  52.         typedef LPSTR           LPTSTR, LPTCH;
  53.         typedef LPCSTR          LPCTSTR;
  54.     #endif
  55.  
  56.     #define TEXT(a)         a
  57.     #define SIZEOF(x)       sizeof(x)
  58.     #define SIZEOFACMSTR(x) sizeof(x)
  59. #else
  60.     #ifndef FNLOCAL
  61.         #define FNLOCAL     _stdcall
  62.         #define FNCLOCAL    _stdcall
  63.         #define FNGLOBAL    _stdcall
  64.         #define FNCGLOBAL   _stdcall
  65.         #define FNWCALLBACK CALLBACK
  66.         #define FNEXPORT    CALLBACK
  67.     #endif
  68.  
  69.     #ifndef _CRTAPI1
  70.         #define _CRTAPI1    __cdecl
  71.     #endif
  72.  
  73.     #ifndef _CRTAPI2
  74.         #define _CRTAPI2    __cdecl
  75.     #endif
  76.  
  77. /*    #ifndef try
  78.         #define try         __try
  79.         #define leave       __leave
  80.         #define except      __except
  81.         #define finally     __finally
  82.     #endif
  83. */
  84.     #define BCODE
  85.     #define HUGE
  86.     #define HTASK                   HANDLE
  87.     #define SELECTOROF(a)           (a)
  88.  
  89. //    typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
  90.  
  91.     //
  92.     //  for compiling Unicode
  93.     //
  94.     #ifdef UNICODE
  95.         #define SIZEOF(x)   (sizeof(x)/sizeof(WCHAR))
  96.     #else
  97.         #define SIZEOF(x)   sizeof(x)
  98.     #endif
  99.     #define SIZEOFACMSTR(x)    (sizeof(x)/sizeof(WCHAR))
  100. #endif    // WIN32
  101.  
  102. #endif
  103.