Skip to content

Commit

Permalink
Merge pull request #34 from rainers/no_messagebox
Browse files Browse the repository at this point in the history
do not show message box on exception, print info to stdout instead
  • Loading branch information
WalterBright authored Jul 8, 2021
2 parents 87a85b0 + fc0d426 commit 80f67c5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ntio/xcnotifyc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ First=????????";
#define ESP (EBP + 8 + 5)
#define FIRST (sizeof(registers_msg) - 9)

int _loutall_con(unsigned nbytes, char *ptr);

EXCEPTION_DISPOSITION XCNOTIFY(
EXCEPTION_RECORD *exception_record,
void *EstablisherFrame,
Expand Down Expand Up @@ -64,7 +66,14 @@ EXCEPTION_DISPOSITION XCNOTIFY(
preg[EDI + 8] = ' ';
}
}
#if 1
_loutall_con(strlen(context_msg), context_msg);
_loutall_con(1, "\n");
_loutall_con(strlen(preg), preg);
_loutall_con(1, "\n");
#else
MessageBox(0, preg, context_msg, MB_SETFOREGROUND | MB_ICONHAND);
#endif
ExitProcess(1);
}

Expand Down

0 comments on commit 80f67c5

Please sign in to comment.