NO

Author Topic: __exception_info( ) bug?  (Read 4639 times)

RedGhost

  • Guest
__exception_info( ) bug?
« on: December 17, 2006, 08:15:52 AM »
Code: [Select]
 
__try {
    *(unsigned long *)0 = 1;
} __except( EXCEPTION_EXECUTE_HANDLER ) {
    void *p = _exception_info( );
    /* or */
    _exception_info( );
}


gives me "error #2201: Bad context for intrinsic function '_exception_info'."

_exception_code( ) works fine.

Is it a bug or am I being stupid?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
__exception_info( ) bug?
« Reply #1 on: December 18, 2006, 12:22:33 PM »
Microsoft says:
Quote

You can use the _exception_code function within the exception handler. However, you can use _exception_info only within the exception filter. The information it points to is generally on the stack and is no longer available when control is transferred to the exception handler.
May the source be with you