diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-07-06 16:42:21 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-07-06 19:02:20 +0100 |
commit | 5c9ad1197bdf517ccd2e2f0aa3fdb1abb6453a0d (patch) | |
tree | 9bc0252c930c8138266069b1a82c106750261ce2 /inject | |
parent | 59f21c4d124373cea4cb98e976704d4b2da900b3 (diff) |
inject: Override assertion implementation.
Diffstat (limited to 'inject')
-rw-r--r-- | inject/injectee.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp index 0814da24..e31df595 100644 --- a/inject/injectee.cpp +++ b/inject/injectee.cpp @@ -80,6 +80,22 @@ debugPrintf(const char *format, ...) } +EXTERN_C void +_assert(const char *_Message, const char *_File, unsigned _Line) +{ + debugPrintf("Assertion failed: %s, file %s, line %u\n", _Message, _File, _Line); + TerminateProcess(GetCurrentProcess(), 1); +} + + +EXTERN_C void +_wassert(const wchar_t * _Message, const wchar_t *_File, unsigned _Line) +{ + debugPrintf("Assertion failed: %S, file %S, line %u\n", _Message, _File, _Line); + TerminateProcess(GetCurrentProcess(), 1); +} + + static HMODULE WINAPI MyLoadLibraryA(LPCSTR lpLibFileName); |