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 / spoly2 / spoly.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  1.7 KB  |  81 lines

  1. /*** 
  2. *spoly.h - Application-wide definitions
  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. *
  14. *Implementation Notes:
  15. *
  16. *****************************************************************************/
  17.  
  18. #include "hostenv.h"
  19. #include "resource.h"
  20. #include "clsid.h"
  21.  
  22. #if defined(_MAC)
  23. # define STRSTR strstr
  24. #elif defined(WIN32)
  25. # include "statbar.h"
  26. # define STRSTR strstr
  27. #else /* WIN16 */
  28. # include "statbar.h"
  29. # define STRSTR _fstrstr
  30. #endif
  31.  
  32. #ifdef _MAC
  33. # define UNUSED(X) ((void)(void*)&(X))
  34. #else
  35. # define UNUSED(X) (X)
  36. #endif
  37.  
  38. #define DIM(X) (sizeof(X) / sizeof(X[0]))
  39.  
  40. extern "C" void Assert(int, char FAR*, int, char FAR*);
  41. #define ASSERT(X) Assert(X, __FILE__, __LINE__, NULL)
  42. #define ASSERTSZ(X, MSG) Assert(X, __FILE__, __LINE__, MSG)
  43.  
  44. #ifndef EXPORT
  45. # if defined(WIN32)
  46. #  define EXPORT
  47. # elif defined(_MAC)
  48. #  define EXPORT
  49. # else
  50. #  define EXPORT __export
  51. # endif
  52. #endif
  53.  
  54. #ifndef NEAR
  55. # if defined(WIN32)
  56. #  define NEAR
  57. # elif defined(_MAC)
  58. #  define NEAR
  59. # else
  60. #  define NEAR __near
  61. # endif
  62. #endif
  63.  
  64. #if defined(WIN32)
  65. # define CC_CALL        CC_STDCALL
  66. # define METHODCALLTYPE __stdcall
  67. #elif defined(_MAC)
  68. # define CC_CALL        CC_CDECL
  69. # define METHODCALLTYPE
  70. #else
  71. # define CC_CALL        CC_PASCAL
  72. # define METHODCALLTYPE __pascal
  73. #endif
  74.  
  75. STDAPI InitOle();
  76. STDAPI UninitOle();
  77. STDAPI Revoke();
  78.  
  79. void IncObjectCount();
  80. void DecObjectCount();
  81.