On Mon, May 07, 2007 at 12:31:02PM +0200, MikoĊaj Zalewski wrote:
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?
Of course.
Check dlls/ntdll/tests/exception.c::run_exception_test()
Ciao, Marcus