void display_error(char *msg) { wchar_t buf[512]; _snwprintf(buf, BUFFER_SIZE_ELEMENTS(buf), L"%hs", msg); NULL_TERMINATE_BUFFER(buf); display_error_helper(buf); }
void display_error(char *msg) { # ifdef DISABLED /* going with msgbox always! */ fprintf(FP, msg); # else wchar_t buf[512]; _snwprintf(buf, BUFFER_SIZE_ELEMENTS(buf), L"%hs", msg); NULL_TERMINATE_BUFFER(buf); display_error_helper(buf); # endif }
void internal_error(char *file, int line, char *expr) { #ifdef INTERNAL # define FILENAME_LENGTH L"" #else /* truncate file name to first character */ # define FILENAME_LENGTH L".1" #endif wchar_t buf[512]; _snwprintf(buf, BUFFER_SIZE_ELEMENTS(buf), L"Preinject Error %" FILENAME_LENGTH L"hs:%d %hs\n", file, line, expr); NULL_TERMINATE_BUFFER(buf); display_error_helper(buf); TerminateProcess(GetCurrentProcess(), (uint)-1); }