mirror of https://github.com/lianthony/NT4.0
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.
56 lines
1.3 KiB
56 lines
1.3 KiB
#include <windows.h>
|
|
#include <lsapi.h>
|
|
#include "debug.h"
|
|
|
|
#ifdef UNICODE
|
|
# pragma message( "!! Windows 95 does not support UNICODE system APIs !!" )
|
|
#endif
|
|
|
|
static void
|
|
ErrorBox( LPSTR pszMessageBoxText,
|
|
LPSTR FileName,
|
|
ULONG LineNumber );
|
|
|
|
void
|
|
DebugAssert( LPSTR FailedAssertion,
|
|
LPSTR FileName,
|
|
ULONG LineNumber,
|
|
LPSTR Message )
|
|
{
|
|
#if DBG
|
|
TCHAR szMessageBoxText[ 1024 ];
|
|
|
|
if ( NULL != Message )
|
|
{
|
|
wsprintf( szMessageBoxText,
|
|
TEXT("%hs\n\nAssertion failure: %hs\n\nFile %hs, line %lu."),
|
|
Message,
|
|
FailedAssertion,
|
|
FileName,
|
|
LineNumber );
|
|
}
|
|
else
|
|
{
|
|
wsprintf( szMessageBoxText,
|
|
TEXT("Assertion failure: %hs\n\nFile %hs, line %lu."),
|
|
FailedAssertion,
|
|
FileName,
|
|
LineNumber );
|
|
}
|
|
|
|
ErrorBox( szMessageBoxText, FileName, LineNumber );
|
|
#endif
|
|
}
|
|
|
|
static void
|
|
ErrorBox( LPSTR pszMessageBoxText,
|
|
LPSTR FileName,
|
|
ULONG LineNumber )
|
|
{
|
|
MessageBox( NULL,
|
|
pszMessageBoxText,
|
|
TEXT( "License System Error in LSAPI32.DLL" ),
|
|
MB_ICONEXCLAMATION | MB_OK | MB_DEFAULT_DESKTOP_ONLY );
|
|
}
|
|
|
|
|