2 ===================================================================
3 --- epm_towers.h (working copy)
4 +++ epm_towers.h (working copy)
12 #define EPM_PROTOCOL_DNET_NSP 0x04
13 #define EPM_PROTOCOL_OSI_TP4 0x05
15 ===================================================================
16 --- ndr_marshall.c (working copy)
17 +++ ndr_marshall.c (working copy)
18 @@ -6159,6 +6159,7 @@ static LONG unmarshall_discriminant(PMID
25 align_pointer(&pStubMsg->Buffer, sizeof(USHORT));
27 ===================================================================
28 --- ndr_stubless.c (working copy)
29 +++ ndr_stubless.c (working copy)
30 @@ -981,11 +981,12 @@ __declspec(naked) LONG_PTR __cdecl call_
35 push edi ; Save registers
38 mov eax, [ebp+16] ; Get stack size
39 sub esp, eax ; Make room in stack for arguments
45 ===================================================================
46 --- rpc_epmap.c (working copy)
47 +++ rpc_epmap.c (working copy)
49 #include "wine/exception.h"
51 #include "rpc_binding.h"
54 #include "epm_towers.h"
56 WINE_DEFAULT_DEBUG_CHANNEL(ole);
57 @@ -162,7 +162,7 @@ static RPC_STATUS get_epm_handle_server(
59 static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
61 - switch (GetExceptionCode())
62 + switch (__eptr->ExceptionRecord->ExceptionCode)
64 case EXCEPTION_ACCESS_VIOLATION:
65 case EXCEPTION_ILLEGAL_INSTRUCTION:
67 ===================================================================
68 --- rpc_server.c (working copy)
69 +++ rpc_server.c (working copy)
70 @@ -1071,8 +1071,6 @@ void RPCRT4_destroy_all_protseqs(void)
71 EnterCriticalSection(&server_cs);
72 LIST_FOR_EACH_ENTRY_SAFE(cps, cursor2, &protseqs, RpcServerProtseq, entry)
74 - if (listen_count != 0)
75 - RPCRT4_sync_with_server_thread(cps);
76 destroy_serverprotoseq(cps);
78 LeaveCriticalSection(&server_cs);
79 Index: rpc_transport.c
80 ===================================================================
81 --- rpc_transport.c (working copy)
82 +++ rpc_transport.c (working copy)
83 @@ -224,6 +224,9 @@ static RPC_STATUS rpcrt4_conn_open_pipe(
84 if (err == ERROR_PIPE_BUSY) {
85 TRACE("connection failed, error=%x\n", err);
86 return RPC_S_SERVER_TOO_BUSY;
87 + } else if (err == ERROR_BAD_NETPATH) {
88 + TRACE("connection failed, error=%x\n", err);
89 + return RPC_S_SERVER_UNAVAILABLE;
91 if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
93 @@ -305,18 +308,32 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc
94 static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection)
96 RpcConnection_np *npc = (RpcConnection_np *) Connection;
97 - static const char prefix[] = "\\\\.";
98 + static const char prefix[] = "\\\\";
99 + static const char local[] =".";
104 /* already connected? */
108 /* protseq=ncacn_np: named pipes */
109 - pname = I_RpcAllocate(strlen(prefix) + strlen(Connection->Endpoint) + 1);
110 - strcat(strcpy(pname, prefix), Connection->Endpoint);
111 - r = rpcrt4_conn_open_pipe(Connection, pname, FALSE);
112 + size = strlen(prefix);
113 + if (Connection->NetworkAddr == NULL || strlen(Connection->NetworkAddr) == 0)
114 + size += strlen(local);
116 + size += strlen(Connection->NetworkAddr);
117 + size += strlen(Connection->Endpoint) + 1;
119 + pname = I_RpcAllocate(size);
120 + strcpy(pname, prefix);
121 + if (Connection->NetworkAddr == NULL || strlen(Connection->NetworkAddr) == 0)
122 + strcat(pname, local);
124 + strcat(pname, Connection->NetworkAddr);
125 + strcat(pname, Connection->Endpoint);
126 + r = rpcrt4_conn_open_pipe(Connection, pname, TRUE);
130 @@ -412,11 +429,17 @@ static int rpcrt4_conn_np_read(RpcConnec
133 unsigned int bytes_left = count;
136 + ZeroMemory(&ovl, sizeof(ovl));
137 + ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
142 - ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, NULL);
143 + ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, &ovl);
144 + if (!ret && GetLastError() == ERROR_IO_PENDING)
145 + ret = GetOverlappedResult(npc->pipe, &ovl, &bytes_read, TRUE);
146 if (!ret && GetLastError() == ERROR_MORE_DATA)
148 if (!ret || !bytes_read)
149 @@ -424,6 +447,7 @@ static int rpcrt4_conn_np_read(RpcConnec
150 bytes_left -= bytes_read;
153 + CloseHandle(ovl.hEvent);
154 return ret ? count : -1;
157 @@ -434,16 +458,23 @@ static int rpcrt4_conn_np_write(RpcConne
158 const char *buf = buffer;
160 unsigned int bytes_left = count;
163 + ZeroMemory(&ovl, sizeof(ovl));
164 + ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
169 - ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, NULL);
170 + ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, &ovl);
171 + if (!ret && GetLastError() == ERROR_IO_PENDING)
172 + ret = GetOverlappedResult(npc->pipe, &ovl, &bytes_written, TRUE);
173 if (!ret || !bytes_written)
175 bytes_left -= bytes_written;
176 buf += bytes_written;
178 + CloseHandle(ovl.hEvent);
179 return ret ? count : -1;
183 ===================================================================
184 --- rpcrt4.spec (working copy)
185 +++ rpcrt4.spec (working copy)
187 @ stub I_RpcIfInqTransferSyntaxes
189 @ stdcall I_RpcMapWin32Status(long)
190 -@ stub I_RpcNegotiateTransferSyntax # wxp
191 +@ stdcall I_RpcNegotiateTransferSyntax(ptr)
192 @ stub I_RpcNsBindingSetEntryName
193 @ stub I_RpcNsBindingSetEntryNameA
194 @ stub I_RpcNsBindingSetEntryNameW
196 @ stdcall NdrRangeUnmarshall(ptr ptr ptr long)
197 @ stub NdrRpcSmClientAllocate
198 @ stub NdrRpcSmClientFree
199 -@ stub NdrRpcSmSetClientToOsf
200 +@ stdcall NdrRpcSmSetClientToOsf(ptr)
201 @ stub NdrRpcSsDefaultAllocate
202 @ stub NdrRpcSsDefaultFree
203 @ stub NdrRpcSsDisableAllocate