home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples1.exe / Profiler / BasicHdr.h next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.6 KB  |  100 lines

  1. /****************************************************************************************
  2.  * Copyright (c) 1999 Microsoft Corporation.  All Rights Reserved.
  3.  *
  4.  * File:
  5.  *  BasicHdr.h
  6.  *
  7.  * Description:
  8.  *    
  9.  *
  10.  *
  11.  ***************************************************************************************/
  12. #ifndef __BASICHDR_H__
  13. #define __BASICHDR_H__
  14.  
  15. #define _WIN32_DCOM
  16.  
  17.  
  18. /***************************************************************************************
  19.  ********************                                               ********************
  20.  ********************             Common Includes                   ********************
  21.  ********************                                               ********************
  22.  ***************************************************************************************/
  23. #include "math.h"
  24. #include "stdio.h"
  25. #include "stdlib.h"
  26. #include "stdarg.h"
  27. #include "limits.h"
  28. #include "malloc.h"
  29. #include "string.h"
  30. #include "windows.h"
  31.  
  32. #include "cor.h"
  33. #include "corprof.h"        
  34.  
  35. /***************************************************************************************
  36.  ********************                                               ********************
  37.  ********************              Basic Macros                     ********************
  38.  ********************                                               ********************
  39.  ***************************************************************************************/
  40. //  
  41. // alias' for COM method signatures
  42. //
  43. #define COM_METHOD( TYPE ) TYPE STDMETHODCALLTYPE
  44.  
  45.  
  46. //
  47. // max length for arrays
  48. //
  49. #define MAX_LENGTH 256
  50.  
  51.  
  52. //
  53. // debug macro for DebugBreak
  54. //
  55. #undef _DbgBreak
  56. #ifdef _X86_
  57.     #define _DbgBreak() __asm { int 3 }
  58. #else
  59.     #define _DbgBreak() DebugBreak()
  60. #endif // _X86_
  61.  
  62.  
  63. //                        
  64. // basic I/O macros
  65. //
  66. #define TEXT_OUT( message ) printf( "%s", message );
  67. #define TEXT_OUTLN( message ) printf( "%s\n", message );
  68.  
  69.  
  70. //
  71. // assert on false
  72. //
  73. #define _ASSERT_( expression ) \
  74. { \
  75.     if ( !(expression) ) \
  76.     _LaunchDebugger( #expression, __FILE__, __LINE__ );    \
  77. } \
  78.  
  79. //
  80. // exception macro
  81. //
  82. #define _THROW_EXCEPTION( message ) \
  83. { \
  84.     throw new BaseException( message );    \
  85. } \
  86.  
  87.  
  88. // the compiler complains about the exception not being
  89. // used in the exception handler---it is being rethrown.
  90. // ---turn off warning! 
  91. #pragma warning ( disable: 4101 )
  92.  
  93. // C++ exception handler used, but unwind semantics
  94. // are not enabled---turn off warning!
  95. #pragma warning ( disable: 4530 )  
  96.  
  97. #endif // __BASICHDR_H__
  98.  
  99. // End of File
  100.