From 2de3d31a7a2362f754d3313d35383a8714da4d29 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Mon, 25 Jun 2007 14:24:23 +0100 Subject: [PATCH] rpcrt4: Translate STATUS_ACCESS_VIOLATION exceptions caught whilst executing the stub function to ERROR_NOACCESS to prevent confusing exceptions occurring in the client. --- dlls/rpcrt4/rpc_server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 712a18ba85b..02509029111 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -235,6 +235,7 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA sif = RPCRT4_find_interface(object_uuid, &conn->ActiveInterface, TRUE); if (!sif) { + WARN("interface %s no longer registered, returning fault packet\n", debugstr_guid(&conn->ActiveInterface.SyntaxGUID)); response = RPCRT4_BuildFaultHeader(NDR_LOCAL_DATA_REPRESENTATION, RPC_S_UNKNOWN_IF); @@ -278,7 +279,10 @@ static void RPCRT4_process_packet(RpcConnection* conn, RpcPktHdr* hdr, RPC_MESSA msg->RpcFlags |= WINE_RPCFLAG_EXCEPTION; msg->BufferLength = sizeof(DWORD); I_RpcGetBuffer(msg); - *(DWORD*)msg->Buffer = GetExceptionCode(); + if (GetExceptionCode() == STATUS_ACCESS_VIOLATION) + *(DWORD*)msg->Buffer = ERROR_NOACCESS; + else + *(DWORD*)msg->Buffer = GetExceptionCode(); } __ENDTRY /* send response packet */