Source code of Windows XP (NT5)
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.

45 lines
1006 B

  1. /*
  2. * Copyright (c) 1996 Microsoft Corporation
  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. void MaksAssert(LPCTSTR exp, LPCTSTR file, int line)
  24. {
  25. TCHAR szMsg[1024];
  26. _stprintf(szMsg, _T("assertion [%s] failed at [%s,%d]. Want to Debug?\n"), exp, file, line);
  27. LOGMESSAGE0(szMsg);
  28. OutputDebugString(szMsg);
  29. if (MessageBox(0, szMsg, _T("HydraOc.dll"), MB_YESNO ) == IDYES )
  30. {
  31. if (IsDebuggerPresent ())
  32. {
  33. DebugBreak();
  34. }
  35. else
  36. {
  37. MessageBox(0,_T("hey sorry, I dont know how to attach a process to debuuger!"), _T("HydraOc.dll"), MB_OK);
  38. }
  39. }
  40. }