rpc exception

Robert Shearman R.J.Shearman at warwick.ac.uk
Tue Apr 22 16:12:23 CDT 2003


> I see that Greg's exception stuff is not in Wine yet. Until that's
> accepted, this'll have to do.

[snip]

This is just an idea, but would something like this work (obviously without
Intel syntax):

#define RpcExcept(expr) \
        VOID * FuncPtr = GETEIP; \
        if (__wine_in_exception_filter()) \
        { \
            int retval; \
            switch( expr ) \
            { \
            case -1: \
                retval = -1; \
                break; \
            case 0: \
                retval = 0; \
                break; \
            case 1: \
                retval = 1; \
                break; \
            } \
            __asm \
            { \
                mov eax,retval \
                ret 4 \
            }; \
        } \
        __EXCEPT((__WINE_FILTER)FuncPtr)

Rob





More information about the wine-devel mailing list