Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to link with my own version of _RTC_CheckEsp?

33 views
Skip to first unread message

Taed

unread,
Jun 23, 2011, 2:21:20 PM6/23/11
to
I like the stack corruption checking feature of /RTC1, but I do not
like the Run-Time Check popup box.  The problem is that if it occurs
with a service running on a server, the service is then hung until
someone happens to log in to hit the [OK] button.

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


 

0 new messages