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.

43 lines
918 B

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*
  3. *
  4. * Module Name:
  5. *
  6. * maksassert.cpp
  7. *
  8. * Abstract:
  9. *
  10. * Implementas the assert functions.
  11. * maks_todo : use common assert macros instead.
  12. *
  13. * Author:
  14. *
  15. * Makarand Patwardhan - March 6, 1998
  16. *
  17. * Comments
  18. * This file is here only because I could not find the right friendly assert includes.
  19. * maks_todo : should be removed later.
  20. */
  21. #include "stdafx.h"
  22. #include "maksassert.h"
  23. #include <TCHAR.h>
  24. //#define _UNICODE
  25. void MaksAssert(LPCTSTR exp, LPCTSTR file, int line)
  26. {
  27. TCHAR szMsg[1024];
  28. _stprintf(szMsg, _T("assertion [%s] failed at [%s,%d]. Want to Debug?\n"), exp, file, line);
  29. #if defined(_LOGMESSAGE_INCLUDED_)
  30. LOGMESSAGE0(szMsg);
  31. #endif
  32. OutputDebugString(szMsg);
  33. if (MessageBox(0, szMsg, _T("TsOc.dll"), MB_YESNO ) == IDYES )
  34. {
  35. DebugBreak();
  36. }
  37. }