home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / oleaut / spoly / hostenv.h < prev    next >
C/C++ Source or Header  |  1997-10-05  |  3KB  |  124 lines

  1. /*** 
  2. *hostenv.h
  3. *
  4. *  This is a part of the Microsoft Source Code Samples.
  5. *
  6. *  Copyright (C) 1992-1997 Microsoft Corporation. All rights reserved.
  7. *
  8. *  This source code is only intended as a supplement to Microsoft Development
  9. *  Tools and/or WinHelp documentation.  See these sources for detailed
  10. *  information regarding the Microsoft samples programs.
  11. *
  12. *Purpose:
  13. *  Generic host specific includes.
  14. *
  15. *Implementation Notes:
  16. *
  17. *****************************************************************************/
  18.  
  19. #if defined(_MAC)
  20.  
  21. #if defined(_PPCMAC)
  22. #pragma data_seg("_FAR_DATA")
  23. #pragma data_seg( )
  24. #define MAXLONG 0x7fffffff
  25. #define EventHandlerProcPtr AEEventHandlerUPP
  26. #else //_PPCMAC
  27. #define  GetMenuItemText(mApple,menuItem,daName)  GetItem(mApple,menuItem,daName)
  28. #endif //_PPCMAC
  29.  
  30. #endif //_MAC
  31.  
  32. #if defined(_MAC)
  33.  
  34. #if defined(_MSC_VER)
  35.  
  36. # include <values.h>
  37. # include <types.h>
  38. # include <string.h>
  39. # include <quickdra.h>
  40. # include <fonts.h>
  41. # include <events.h>
  42. # include <resource.h>
  43. # include <menus.h>
  44. # include <textedit.h>
  45. # include <dialogs.h>
  46. # include <desk.h>
  47. # include <toolutil.h>
  48. # include <memory.h>
  49. # include <files.h>
  50. # include <osutils.h>
  51. # include <osevents.h>
  52. # include <diskinit.h>
  53. # include <packages.h>
  54. # include <traps.h>
  55. # include <AppleEve.h>
  56.  
  57. #else //_MSC_VER
  58.  
  59. # include <values.h>
  60. # include <types.h>
  61. # include <strings.h>
  62. # include <quickdraw.h>
  63. # include <fonts.h>
  64. # include <events.h>
  65. # include <resources.h>
  66. # include <windows.h>
  67. # include <menus.h>
  68. # include <textedit.h>
  69. # include <dialogs.h>
  70. # include <desk.h>
  71. # include <toolutils.h>
  72. # include <memory.h>
  73. # include <files.h>
  74. # include <osutils.h>
  75. # include <osevents.h>
  76. # include <diskinit.h>
  77. # include <packages.h>
  78. # include <traps.h>
  79. # include <AppleEvents.h>
  80.  
  81. #endif //_MSC_VER
  82.  
  83. # include <ole2.h>
  84. # include <olenls.h>
  85. # include <dispatch.h>
  86.  
  87. # define TCHAR            char
  88. # define TSTR(str)        str         
  89. # define STRING(str)            (str)
  90. # define WIDESTRING(str)        (str)
  91.  
  92. #elif defined(WIN32)
  93.  
  94. # include <windows.h>
  95.  
  96. # if defined(UNICODE)
  97.     #define TCHAR        WCHAR
  98.     #define TSTR(str)        L##str
  99.     #define STRING(str)            (str)        
  100.     #define WIDESTRING(str)    (str)                
  101. # else
  102.     #define TCHAR        char
  103.     #define TSTR(str)        str    
  104.     #define STRING(str)            AnsiString(str)
  105.     #define WIDESTRING(str)    WideString(str)                
  106.     extern "C" char FAR* AnsiString(OLECHAR FAR* strIn);
  107.     extern "C" OLECHAR FAR* WideString(char FAR* strIn);
  108. # endif
  109.  
  110.  
  111. #else /* WIN16 */
  112.  
  113. # include <windows.h>
  114. # include <ole2.h>
  115. # include <olenls.h>
  116. # include <dispatch.h>
  117.  
  118. # define TCHAR            char
  119. # define TSTR(str)        str         
  120. # define STRING(str)            (str)
  121. # define WIDESTRING(str)        (str)
  122. #endif
  123.  
  124.