How do I write an exception filter?

Ove Kaaven ovek at
Thu Jul 10 17:32:44 CDT 2008

Stefan Kuhr wrote:
> This is something quite common in Win32, as far as I can tell.

Yes, like I said, MSVC has special compiler support. In MSVC, __try, 
__except, etc, are compiler builtins (not macros as in Wine). But they 
are Microsoft extensions, they can't be implemented using standard C.

>> Also perhaps consider whether you need a filter function this complex at
>> all...
> I need that. I would like to implement comm status and fault status
> awareness in WINE's rpcrt4, because my applications crash in WINE
> because of the lack of proper comm status and fault status awareness
> in WINE's RPC implementation. From debugging NdClientCall2 in XP I
> deduce I need this.

Well, I'd expect it to be generally better to just have the appropriate 
exception raised in the first place, rather than conditionally handle it 
depending on something unrelated to the exception information.

More information about the wine-devel mailing list