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.

41 lines
875 B

  1. #include "WB_Asserts.h"
  2. //||||||||||||||||||||||||||||||| D E B U G S T U F F |||||||||||||||||||||||||||||||||||||
  3. #if defined(_DEBUG)
  4. #include <stdio.h>
  5. BOOL FAlertContinue(char *pchAlert)
  6. {
  7. int iMsgBoxRetVal = MessageBoxA(NULL, "Continue", pchAlert, MB_YESNO|MB_ICONEXCLAMATION);
  8. return (IDYES == iMsgBoxRetVal);
  9. }
  10. BOOL g_fDebugAssertsOff = FALSE;
  11. void AssertCore(BOOL f, char *pChErrorT, char *pchFile, int nLine)
  12. {
  13. if ((!g_fDebugAssertsOff) && (!f))
  14. {
  15. int iMsgBoxRetVal;
  16. char pChError[256];
  17. sprintf(pChError,"%s ! %s : %d",pChErrorT, pchFile, nLine);
  18. iMsgBoxRetVal = MessageBoxA(NULL, " Assertion Failure: thwb.dll. YES=Go On, NO=DEBUG, CANCEL=Asserts OFF", pChError, MB_YESNOCANCEL|MB_ICONEXCLAMATION);
  19. if (IDNO == iMsgBoxRetVal)
  20. {
  21. __asm int 3
  22. }
  23. else if (IDCANCEL == iMsgBoxRetVal)
  24. {
  25. g_fDebugAssertsOff = TRUE;
  26. }
  27. }
  28. }
  29. #endif