mirror of https://github.com/tongzx/nt5src
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.
42 lines
875 B
42 lines
875 B
#include "WB_Asserts.h"
|
|
|
|
//||||||||||||||||||||||||||||||| D E B U G S T U F F |||||||||||||||||||||||||||||||||||||
|
|
|
|
#if defined(_DEBUG)
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
BOOL FAlertContinue(char *pchAlert)
|
|
{
|
|
int iMsgBoxRetVal = MessageBoxA(NULL, "Continue", pchAlert, MB_YESNO|MB_ICONEXCLAMATION);
|
|
|
|
return (IDYES == iMsgBoxRetVal);
|
|
}
|
|
|
|
BOOL g_fDebugAssertsOff = FALSE;
|
|
|
|
void AssertCore(BOOL f, char *pChErrorT, char *pchFile, int nLine)
|
|
{
|
|
if ((!g_fDebugAssertsOff) && (!f))
|
|
{
|
|
int iMsgBoxRetVal;
|
|
char pChError[256];
|
|
|
|
sprintf(pChError,"%s ! %s : %d",pChErrorT, pchFile, nLine);
|
|
|
|
iMsgBoxRetVal = MessageBoxA(NULL, " Assertion Failure: thwb.dll. YES=Go On, NO=DEBUG, CANCEL=Asserts OFF", pChError, MB_YESNOCANCEL|MB_ICONEXCLAMATION);
|
|
|
|
if (IDNO == iMsgBoxRetVal)
|
|
{
|
|
__asm int 3
|
|
}
|
|
else if (IDCANCEL == iMsgBoxRetVal)
|
|
{
|
|
g_fDebugAssertsOff = TRUE;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif
|