Commit a0fb6246 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Avoid using GetExceptionCode outside of an exception handler.

parent f1bb04ff
......@@ -392,7 +392,10 @@ static void init_server(void)
print_server("\n");
print_server("static int __server_filter( struct __server_frame *__frame )\n");
print_server( "{\n");
print_server( " return RPC_BAD_STUB_DATA_EXCEPTION_FILTER;\n");
print_server( " return (__frame->code == STATUS_ACCESS_VIOLATION) ||\n");
print_server( " (__frame->code == STATUS_DATATYPE_MISALIGNMENT) ||\n");
print_server( " (__frame->code == RPC_X_BAD_STUB_DATA) ||\n");
print_server( " (__frame->code == RPC_S_INVALID_BOUND);\n");
print_server( "}\n");
print_server( "\n");
}
......
......@@ -3686,7 +3686,8 @@ void write_exceptions( FILE *file )
fprintf( file, "#else /* USE_COMPILER_EXCEPTIONS */\n");
fprintf( file, "\n");
fprintf( file, "#define RpcExceptionInit(filter_func,finally_func) do {} while(0)\n");
fprintf( file, "#define __DECL_EXCEPTION_FRAME\n");
fprintf( file, "#define __DECL_EXCEPTION_FRAME \\\n");
fprintf( file, " DWORD code;\n");
fprintf( file, "\n");
fprintf( file, "#endif /* USE_COMPILER_EXCEPTIONS */\n");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment