1 diff -pudN e:\wine\dlls\rpcrt4/cproxy.c e:\reactos\dll\win32\rpcrt4/cproxy.c
2 --- e:\wine\dlls\rpcrt4/cproxy.c 2016-11-16 17:29:34 +0100
3 +++ e:\reactos\dll\win32\rpcrt4/cproxy.c 2015-08-27 22:03:34 +0100
4 @@ -150,6 +150,30 @@ static inline void init_thunk( struct th
5 thunk->call_stubless = call_stubless_func;
8 +#elif defined(__arm__)
10 +extern void call_stubless_func(void);
11 +__ASM_GLOBAL_FUNC(call_stubless_func,
12 + "DCD 0xDEFC\n\t" // _assertfail
15 +#include "pshpack1.h"
22 +static const struct thunk thunk_template =
24 + { 0xDEFC } /* _assertfail */
27 +static inline void init_thunk( struct thunk *thunk, unsigned int index )
29 + *thunk = thunk_template;
34 #warning You must implement stubless proxies for your CPU
35 diff -pudN e:\wine\dlls\rpcrt4/cstub.c e:\reactos\dll\win32\rpcrt4/cstub.c
36 --- e:\wine\dlls\rpcrt4/cstub.c 2016-11-16 17:29:34 +0100
37 +++ e:\reactos\dll\win32\rpcrt4/cstub.c 2016-05-20 23:26:31 +0100
38 @@ -156,6 +156,13 @@ typedef struct
40 static const BYTE opcodes[16] = { 0x48, 0x8b, 0x49, 0x20, 0x48, 0x8b, 0x01,
41 0xff, 0xa0, 0, 0, 0, 0, 0x48, 0x8d, 0x36 };
42 +#elif defined(__arm__)
47 +static const BYTE opcodes[1];
51 #warning You must implement delegated proxies/stubs for your CPU
53 diff -pudN e:\wine\dlls\rpcrt4/rpc_epmap.c e:\reactos\dll\win32\rpcrt4/rpc_epmap.c
54 --- e:\wine\dlls\rpcrt4/rpc_epmap.c 2016-11-16 17:29:34 +0100
55 +++ e:\reactos\dll\win32\rpcrt4/rpc_epmap.c 2016-11-17 12:09:06 +0100
56 @@ -171,7 +173,7 @@ static RPC_STATUS get_epm_handle_server(
58 static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
60 - switch (GetExceptionCode())
61 + switch (__eptr->ExceptionRecord->ExceptionCode)
63 case EXCEPTION_ACCESS_VIOLATION:
64 case EXCEPTION_ILLEGAL_INSTRUCTION:
65 diff -pudN e:\wine\dlls\rpcrt4/rpc_transport.c e:\reactos\dll\win32\rpcrt4/rpc_transport.c
66 --- e:\wine\dlls\rpcrt4/rpc_transport.c 2018-07-28 18:12:19 +0000
67 +++ e:\reactos\dll\win32\rpcrt4/rpc_transport.c 2018-07-28 18:28:54 +0000
71 #define WIN32_NO_STATUS
73 +#define NONAMELESSUNION
89 -#include "winternl.h"
90 +#include "wine/winternl.h"
92 #include "wine/unicode.h"
96 #define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000)
99 #define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0]))
101 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
103 +#ifdef __REACTOS__ /* FIXME: Inspect */
104 +BOOL WINAPI CancelIoEx(HANDLE handle, LPOVERLAPPED lpOverlapped)
106 + IO_STATUS_BLOCK io_status;
108 + NtCancelIoFile(handle, &io_status);
109 + if (io_status.u.Status)
111 + SetLastError( RtlNtStatusToDosError( io_status.u.Status ) );
118 static RpcConnection *rpcrt4_spawn_connection(RpcConnection *old_connection);
120 /**** ncacn_np support ****/
121 @@ -237,14 +258,24 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc
125 -static char *ncacn_pipe_name(const char *endpoint)
126 +static char *ncacn_pipe_name(const char *server, const char *endpoint)
128 - static const char prefix[] = "\\\\.";
129 + static const char prefix[] = "\\\\";
130 + static const char local[] = ".";
131 + char ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
133 + DWORD bufLen = ARRAYSIZE(ComputerName);
135 + GetComputerNameA(ComputerName, &bufLen);
137 + if (server == NULL || *server == 0 || stricmp(ComputerName, server) == 0)
140 /* protseq=ncacn_np: named pipes */
141 - pipe_name = I_RpcAllocate(sizeof(prefix) + strlen(endpoint));
142 - strcat(strcpy(pipe_name, prefix), endpoint);
143 + pipe_name = I_RpcAllocate(sizeof(prefix) + strlen(server) + strlen(endpoint));
144 + strcpy(pipe_name, prefix);
145 + strcat(pipe_name, server);
146 + strcat(pipe_name, endpoint);
150 @@ -258,7 +289,7 @@ static RPC_STATUS rpcrt4_ncacn_np_open(R
154 - pname = ncacn_pipe_name(Connection->Endpoint);
155 + pname = ncacn_pipe_name(Connection->NetworkAddr, Connection->Endpoint);
156 r = rpcrt4_conn_open_pipe(Connection, pname, FALSE);
159 @@ -286,7 +317,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_n
163 - ((RpcConnection_np*)Connection)->listen_pipe = ncacn_pipe_name(Connection->Endpoint);
164 + ((RpcConnection_np*)Connection)->listen_pipe = ncacn_pipe_name(NULL, Connection->Endpoint);
165 r = rpcrt4_conn_create_pipe(Connection);
167 EnterCriticalSection(&protseq->cs);
168 @@ -337,7 +368,7 @@ static RPC_STATUS rpcrt4_ncacn_np_is_ser
172 - pipe_name = ncacn_pipe_name(endpoint);
173 + pipe_name = ncacn_pipe_name(NULL, endpoint);
174 status = is_pipe_listening(pipe_name);
175 I_RpcFree(pipe_name);
177 @@ -395,10 +426,14 @@ static int rpcrt4_conn_np_read(RpcConnec
178 if (connection->read_closed)
180 IO_STATUS_BLOCK io_status;
181 +#ifdef __REACTOS__ /* FIXME: We should also cancel I/O for other threads */
182 + NtCancelIoFile(connection->pipe, &io_status);
184 NtCancelIoFileEx(connection->pipe, &connection->io_status, &io_status);
187 WaitForSingleObject(event, INFINITE);
188 - status = connection->io_status.Status;
189 + status = connection->io_status.u.Status;
191 release_np_event(connection, event);
192 return status && status != STATUS_BUFFER_OVERFLOW ? -1 : connection->io_status.Information;
193 @@ -419,7 +454,7 @@ static int rpcrt4_conn_np_write(RpcConne
194 if (status == STATUS_PENDING)
196 WaitForSingleObject(event, INFINITE);
197 - status = io_status.Status;
198 + status = io_status.u.Status;
200 release_np_event(connection, event);
202 @@ -457,7 +492,11 @@ static void rpcrt4_conn_np_close_read(Rp
203 IO_STATUS_BLOCK io_status;
205 connection->read_closed = TRUE;
206 +#ifdef __REACTOS__ /* FIXME: We should also cancel I/O for other threads */
207 + NtCancelIoFile(connection->pipe, &io_status);
209 NtCancelIoFileEx(connection->pipe, &connection->io_status, &io_status);
213 static void rpcrt4_conn_np_cancel_call(RpcConnection *conn)
214 @@ -675,7 +714,7 @@ static void *rpcrt4_protseq_np_get_wait_
217 case STATUS_PIPE_CONNECTED:
218 - conn->io_status.Status = status;
219 + conn->io_status.u.Status = status;
223 @@ -756,10 +795,10 @@ static int rpcrt4_protseq_np_wait_for_ne
225 release_np_event(conn, conn->listen_event);
226 conn->listen_event = NULL;
227 - if (conn->io_status.Status == STATUS_SUCCESS || conn->io_status.Status == STATUS_PIPE_CONNECTED)
228 + if (conn->io_status.u.Status == STATUS_SUCCESS || conn->io_status.u.Status == STATUS_PIPE_CONNECTED)
229 cconn = rpcrt4_spawn_connection(&conn->common);
231 - ERR("listen failed %x\n", conn->io_status.Status);
232 + ERR("listen failed %x\n", conn->io_status.u.Status);