Can we catch access violation exceptions in tests?
mikolaj at zalewski.pl
Mon May 7 05:31:02 CDT 2007
I'm trying to write a tests for invalid cbSize in Shell_NotifyIcon.
The behaviour under Windows XP is to assume in such a case that the size
is NOTIFYICONDATA_V1_SIZE. AFAIK Shell_NotifyIcon doesn't provide a way
to read icon data to check that the data introduced after Win95 is not
modified. So I'm using VirtualAlloc+VirtualProtect to make
Shell_NotifyIcon fail if it tries to access this data.
I'd like to catch the exception to make a tests fail if something goes
wrong instead of crashing the testsuite. However __try doesn't work
under gcc and using wine/exception.h gives an unresolved symbol
'__wine_handle_exception'. Is it possible to catch exceptions in tests?
More information about the wine-devel