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.

33 lines
863 B

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: assert.h
  7. //
  8. // Contents: Declaraions of assert
  9. //
  10. // Classes:
  11. //
  12. // History: dd-mmm-yy Author Comment
  13. // 09-Dec-94 MikeW author
  14. //
  15. //--------------------------------------------------------------------------
  16. #ifndef _ASSERT_H_
  17. #define _ASSERT_H_
  18. //
  19. // Misc prototypes
  20. //
  21. INT_PTR CALLBACK DlgAssertProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  22. void OleTestAssert(char *, char *, UINT);
  23. //
  24. // Assertion macros
  25. //
  26. #define Assert(x) assert(x)
  27. #define assert(x) {if (!(x)) OleTestAssert(#x, __FILE__, __LINE__);}
  28. #define AssertSz(x, exp) {if (!(x)) OleTestAssert(exp, __FILE__, __LINE__);}
  29. #endif //_ASSERT_H_