Re: std::uncaught_exception( ) is not supported by VC++ 6 SP6
From: Eugene Gershnik (gershnik_at_hotmail.com)
Date: 07/09/04
- Next message: Yan K. Avlasov: "Re: class template member functions"
- Previous message: Ivan Brugiolo [MSFT]: "Re: deadlock on SMP machines - perhaps caused by wldap32.dll?"
- In reply to: Antonio: "std::uncaught_exception( ) is not supported by VC++ 6 SP6"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 9 Jul 2004 13:08:59 -0700
Antonio wrote:
> Unfortunately as Doug wrote std::uncaught_exception( ) is not
> supported by VC++ 6 (even SP6) and always returns false. Does
> anyone have an idea how this situation can be manually detected
> probably by mean of some assembler code?
>
There is a way but it is complicated and will bind you to a specific version
of CRT you are using.
First of all check http://www.windevnet.com/documents/win0212a/ (requires
registration) for some background info.
The function that performs the actual catch() is
void * __cdecl _CallCatchBlock2(struct EHRegistrationNode *,struct
_s_FuncInfo const *,void *,int,unsigned long);
You will need to hook it to set some TLS flag that will tell you that an
exception is in fact caught. Combine it with a hook on __CxxThrowException
and you will have a reliable std::uncaught_exception replacement.
-- Eugene
- Next message: Yan K. Avlasov: "Re: class template member functions"
- Previous message: Ivan Brugiolo [MSFT]: "Re: deadlock on SMP machines - perhaps caused by wldap32.dll?"
- In reply to: Antonio: "std::uncaught_exception( ) is not supported by VC++ 6 SP6"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|