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.
29 lines
1.1 KiB
29 lines
1.1 KiB
//Copyright (c) Microsoft Corporation. All rights reserved.
|
|
#if DBG==1
|
|
|
|
|
|
void DbgPrint( char * format, ... );
|
|
#define DEBUG_PRINT(X) DbgPrint X
|
|
|
|
#define ASSERT( expr ) \
|
|
{ \
|
|
if ( !(expr) ) \
|
|
{ \
|
|
WCHAR Msg[200]; \
|
|
int rv; \
|
|
wsprintf( Msg, ( LPTSTR )L"Assertion failed: %s, line %d.\n(%s) == FALSE\n\nIssue breakpoint?\n", \
|
|
__FILE__, __LINE__, #expr ); \
|
|
rv = MessageBox( NULL, Msg, ( LPTSTR )L"Assertion failed:", MB_ICONSTOP | MB_YESNO ); \
|
|
if ( rv == IDYES ){ DebugBreak(); } \
|
|
} \
|
|
}
|
|
|
|
#else // !DBG
|
|
|
|
#define DEBUG_PRINT(X) /* nothing */
|
|
|
|
#define ASSERT( expr )
|
|
|
|
#endif // DBG
|
|
|
|
|