So, I want to roll my own version of _RTC_CheckESP which does an INT 3
instead so that the process will crash and create a user.dmp (and then
the service will be restarted).
The code is fairly easy, but I can't get it to link correctly in my
project due to the duplicate symbol with the one in MSVCRTD.DLL. I
know that I did the symbol naming correctly since I got the linker
error.
So, I want to tell my project to ignore the one in MSVCRTD.DLL and
include the one in my file. I obviously want to keep MSVCRTD.DLL
around, however, due to all of the other functions in it, so I can't
just not link with it.
How would I do that? I was hoping for some "Ignore specific library
symbol" option, perhaps. Thanks in advance for any suggestions!
FYI, here is my code:
#ifdef __cplusplus
extern "C" {
#endif
void __declspec (naked) __cdecl _RTC_CheckEsp (void)
{
_asm { jz exit_chkesp };
_asm { int 3 };
exit_chkesp:
_asm { ret };
}
#ifdef __cplusplus
}
#endif