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.

59 lines
951 B

  1. /*++
  2. Copyright (c) 200 Microsoft Corporation
  3. Module Name:
  4. assrt.cxx
  5. Abstract:
  6. assertion code used by VSTST_ASSERT
  7. Author:
  8. Revision History:
  9. Name Date Comments
  10. brianb 05/23/2000 created
  11. --*/
  12. #include "stdafx.h"
  13. VOID
  14. AssertFail
  15. (
  16. IN LPCSTR FileName,
  17. IN UINT LineNumber,
  18. IN LPCSTR Condition
  19. )
  20. {
  21. int i;
  22. CHAR Msg[4096];
  23. //
  24. // Use dll name as caption
  25. //
  26. sprintf(
  27. Msg,
  28. "Assertion failure at line %u in file %s in process %d thread %d: %s\n\nHit Cancel to break into the debugger.",
  29. LineNumber,
  30. FileName,
  31. GetCurrentProcessId(),
  32. GetCurrentThreadId(),
  33. Condition
  34. );
  35. i = MessageBoxA
  36. (
  37. NULL,
  38. Msg,
  39. "Volume Snapshots",
  40. MB_SYSTEMMODAL | MB_ICONSTOP | MB_OKCANCEL | MB_SERVICE_NOTIFICATION
  41. );
  42. if(i == IDCANCEL)
  43. DebugBreak();
  44. }