Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.2 KiB

  1. //Copyright (c) Microsoft Corporation. All rights reserved.
  2. #if DBG==1
  3. void DbgPrint( char * format, ... );
  4. #define DEBUG_PRINT(X) DbgPrint X
  5. #define ASSERT( expr ) \
  6. { \
  7. if ( !(expr) ) \
  8. { \
  9. WCHAR Msg[200]; \
  10. int rv; \
  11. wsprintf( Msg, ( LPTSTR )L"Assertion failed: %s, line %d.\n(%s) == FALSE\n\nIssue breakpoint?\n", \
  12. __FILE__, __LINE__, #expr ); \
  13. rv = MessageBox( NULL, Msg, ( LPTSTR )L"Assertion failed:", MB_ICONSTOP | MB_YESNO ); \
  14. if ( rv == IDYES ){ DebugBreak(); } \
  15. } \
  16. }
  17. #else // !DBG
  18. #define DEBUG_PRINT(X) /* nothing */
  19. #define ASSERT( expr )
  20. #endif // DBG