Don't use GetExceptionCode and GetExceptionInformation in exception filter functions.

Robert Shearman rob at codeweavers.com
Fri Feb 15 09:19:29 CST 2008


When using native compiler exceptions, it isn't valid to use 
GetExceptionCode and GetExceptionInformation anywhere other than in the 
filter or handler blocks since it would be very hard for the compiler to 
work out where to retrieve the exception information from on the stack.

Therefore, remove the WINE_EXCEPTION_FILTER and WINE_FINALLY_FUNC macros 
which enabled GetExceptionCode, GetExceptionInformation and 
AbnormalTermination to be used inside of the functions they declared and 
fix up all callers to access the information directly.
---
  dlls/kernel32/console.c  |    4 ++--
  dlls/ole32/moniker.c     |    4 ++--
  dlls/rpcrt4/cstub.c      |    4 ++--
  dlls/rpcrt4/rpc_server.c |   11 ++---------
  dlls/winedos/dosvm.c     |    6 +++---
  dlls/winedos/int31.c     |    6 +++---
  include/wine/exception.h |    3 ---
  programs/explorer/hal.c  |    5 +++--
  programs/winedbg/dbg.y   |    6 +++---
  9 files changed, 20 insertions(+), 29 deletions(-)

Resend, using the second suggestion from the original patch to do away 
with WINE_EXCEPTION_FILTER altogether, instead of introducing new macros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f373884df1548f239e427e671d718ebd452b1243.diff
Type: text/x-patch
Size: 6246 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080215/75b94ef3/attachment.bin 


More information about the wine-patches mailing list