home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / DSSHOW / WASSERT.H < prev    next >
C/C++ Source or Header  |  1996-08-28  |  853b  |  29 lines

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
  4.  *
  5.  *  File:       wassert.h
  6.  *  Content:    assert header
  7.  *
  8.  ***************************************************************************/
  9. #ifndef __WASSERT_INCLUDED__
  10. #define __WASSERT_INCLUDED__
  11.  
  12. #ifdef _DEBUG
  13. #define ASSERT      // Enable the Assert() macro
  14. #endif
  15.  
  16. #ifdef ASSERT
  17.  
  18. void AssertFail(char [], char [], int, char[]);
  19. #define Assert(f) ((f) ? (void)NULL : (void)AssertFail(#f, __FILE__, __LINE__,NULL))
  20. #define AssertMessage(f, szMessage) ((f) ? (void)NULL : (void)AssertFail(#f, __FILE__, __LINE__, szMessage))
  21.  
  22. #else
  23. #define Assert(f) (void)NULL        // Macro that does nothing
  24. #define AssertMessage(f, szMessage) (void)NULL  
  25.  
  26. #endif // ~ASSERT
  27.  
  28. #endif
  29.