[RPCRT4]
[reactos.git] / reactos / dll / win32 / rpcrt4 / rpcrt4_ros.diff
1 diff -prudN .\wine\dlls\rpcrt4/cproxy.c .\reactos\dll\win32\rpcrt4/cproxy.c
2 --- .\wine\dlls\rpcrt4/cproxy.c 2014-05-09 03:43:55.921033400 +0200
3 +++ .\reactos\dll\win32\rpcrt4/cproxy.c 2013-12-27 18:11:56.483967600 +0100
4 @@ -21,24 +21,7 @@
5 * TODO: Handle non-i386 architectures
6 */
7
8 -#include "config.h"
9 -#include "wine/port.h"
10 -
11 -#include <stdarg.h>
12 -
13 -#define COBJMACROS
14 -
15 -#include "windef.h"
16 -#include "winbase.h"
17 -#include "winerror.h"
18 -
19 -#include "objbase.h"
20 -#include "rpcproxy.h"
21 -
22 -#include "cpsf.h"
23 -#include "ndr_misc.h"
24 -#include "ndr_stubless.h"
25 -#include "wine/debug.h"
26 +#include "precomp.h"
27
28 WINE_DEFAULT_DEBUG_CHANNEL(ole);
29
30 diff -prudN .\wine\dlls\rpcrt4/cpsf.c .\reactos\dll\win32\rpcrt4/cpsf.c
31 --- .\wine\dlls\rpcrt4/cpsf.c 2014-05-09 03:43:55.924033600 +0200
32 +++ .\reactos\dll\win32\rpcrt4/cpsf.c 2013-12-27 18:11:57.185968800 +0100
33 @@ -18,28 +18,9 @@
34 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
35 */
36
37 -#include "config.h"
38 -#include "wine/port.h"
39 -
40 -#include <stdarg.h>
41 -#include <stdio.h>
42 -#include <string.h>
43 -
44 -#define COBJMACROS
45 -
46 -#include "windef.h"
47 -#include "winbase.h"
48 -#include "winerror.h"
49 -#include "winreg.h"
50 -
51 -#include "objbase.h"
52 -
53 -#include "rpcproxy.h"
54 -
55 -#include "wine/unicode.h"
56 -#include "wine/debug.h"
57 +#include "precomp.h"
58
59 -#include "cpsf.h"
60 +#include <winreg.h>
61
62 WINE_DEFAULT_DEBUG_CHANNEL(ole);
63
64 diff -prudN .\wine\dlls\rpcrt4/cstub.c .\reactos\dll\win32\rpcrt4/cstub.c
65 --- .\wine\dlls\rpcrt4/cstub.c 2014-05-09 03:43:55.927033800 +0200
66 +++ .\reactos\dll\win32\rpcrt4/cstub.c 2013-12-27 18:11:56.905168300 +0100
67 @@ -19,25 +19,7 @@
68 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
69 */
70
71 -#include "config.h"
72 -#include "wine/port.h"
73 -
74 -#include <stdarg.h>
75 -
76 -#define COBJMACROS
77 -
78 -#include "windef.h"
79 -#include "winbase.h"
80 -#include "winerror.h"
81 -#include "excpt.h"
82 -
83 -#include "objbase.h"
84 -#include "rpcproxy.h"
85 -
86 -#include "wine/debug.h"
87 -#include "wine/exception.h"
88 -
89 -#include "cpsf.h"
90 +#include "precomp.h"
91
92 WINE_DEFAULT_DEBUG_CHANNEL(ole);
93
94 diff -prudN .\wine\dlls\rpcrt4/epm_towers.h .\reactos\dll\win32\rpcrt4/epm_towers.h
95 --- .\wine\dlls\rpcrt4/epm_towers.h 2014-05-09 03:43:55.988037200 +0200
96 +++ .\reactos\dll\win32\rpcrt4/epm_towers.h 2013-12-27 18:11:57.170368800 +0100
97 @@ -19,7 +19,9 @@
98 *
99 */
100
101 -#include "epm.h"
102 +#pragma once
103 +
104 +#include <epm_c.h>
105
106 #define EPM_PROTOCOL_DNET_NSP 0x04
107 #define EPM_PROTOCOL_OSI_TP4 0x05
108 diff -prudN .\wine\dlls\rpcrt4/msvc.S .\reactos\dll\win32\rpcrt4/msvc.S
109 --- .\wine\dlls\rpcrt4/msvc.S 1970-01-01 01:00:00.000000000 +0100
110 +++ .\reactos\dll\win32\rpcrt4/msvc.S 2012-02-14 21:27:35.943001900 +0100
111 @@ -0,0 +1,146 @@
112 +
113 +#include <asm.inc>
114 +
115 +#ifdef _M_IX86
116 +.code32
117 +
118 +EXTERN _ndr_client_call:PROC
119 +
120 +PUBLIC _call_stubless_func
121 +_call_stubless_func:
122 +
123 + mov ecx,[esp+4] /* This Pointer */
124 + mov ecx,[ecx] /* This->lpVtbl */
125 + mov ecx,[ecx-8] /* MIDL_STUBLESS_PROXY_INFO */
126 + mov edx,[ecx+8] /* Info->FormatStringOffset */
127 + mov edx,[edx+eax*2] /* FormatStringOffset[index] */
128 + and edx, 0000FFFFh
129 + add edx,[ecx+4] /* info->ProcFormatString + offset */
130 + mov eax, [edx+8] /* arguments size */
131 + and eax, 0000FFFFh
132 + push eax
133 + lea eax, [esp+8] /* &This */
134 + push eax
135 + push edx /* format string */
136 + push [ecx] /* info->pstubdesc */
137 + call _ndr_client_call
138 + lea esp, [esp+12]
139 + pop edx /* arguments size */
140 + mov ecx, [esp] /* return address */
141 + add esp, edx
142 + jmp ecx
143 +#else
144 +.code64
145 +
146 +EXTERN ndr_client_call:PROC
147 +
148 +PUBLIC call_stubless_func
149 +FUNC call_stubless_func
150 + mov [rsp + 8], rcx
151 + .SAVEREG rcx, 8
152 + mov [rsp + 10h], rdx
153 + .SAVEREG rdx, 10h
154 + mov [rsp + 18h], r8
155 + .SAVEREG r8, 18h
156 + mov [rsp + 20h], r9
157 + .SAVEREG r9, 20h
158 + sub rsp, 38h
159 + .ALLOCSTACK 38h
160 + .ENDPROLOG
161 +
162 + lea r8, [rsp +38h + 8] /* &This */
163 + mov rcx, [rcx] /* This->lpVtbl */
164 + mov rcx, [rcx - 10h] /* MIDL_STUBLESS_PROXY_INFO */
165 + mov rdx, [rcx + 10h] /* info->FormatStringOffset */
166 + movzx rdx, word ptr [rdx+r10*2] /* FormatStringOffset[index] */
167 + add rdx, [rcx + 8] /* info->ProcFormatString + offset */
168 + mov rcx, [rcx] /* info->pStubDesc */
169 +
170 + movaps [rsp + 20h], xmm1
171 + movaps [rsp + 28h], xmm2
172 + movaps [rsp + 30h], xmm3
173 + lea r9, [rsp + 18h] /* fpu_args */
174 + call ndr_client_call
175 + add rsp, 38h
176 + ret
177 +ENDFUNC
178 +
179 +PUBLIC call_server_func
180 +FUNC call_server_func
181 + push rbp
182 + .PUSHREG rbp
183 + mov rbp, rsp
184 + push rsi
185 + .PUSHREG rsi
186 + push rdi
187 + .PUSHREG rdi
188 + .ENDPROLOG
189 +
190 + mov rax, rcx /* function to call */
191 + mov rcx, 32 /* allocate max(32,stack_size) bytes of stack space */
192 + cmp r8, rcx
193 + cmovg rcx, r8
194 + sub rsp, rcx
195 + and rsp, NOT 15
196 + mov rcx, r8
197 + shr rcx, 3
198 + mov rdi, rsp
199 + mov rsi, rdx
200 + rep movsq /* copy arguments */
201 + mov rcx, [rsp]
202 + mov rdx, [rsp + 8]
203 + mov r8, [rsp + 16]
204 + mov r9, [rsp + 24]
205 + movd xmm0, rcx
206 + movd xmm1, rdx
207 + movd xmm2, r8
208 + movd xmm3, r9
209 + call rax
210 +
211 + lea rsp, [rbp - 16] /* restore stack */
212 + pop rdi
213 + pop rsi
214 + pop rbp
215 + ret
216 +ENDFUNC
217 +
218 +
219 +PUBLIC NdrClientCall2
220 +FUNC NdrClientCall2
221 + mov [rsp + 18h], r8
222 + .SAVEREG r8, 18h
223 + mov [rsp + 20h], r9
224 + .SAVEREG r9, 20h
225 + sub rsp, 28h
226 + .ALLOCSTACK 28h
227 + .ENDPROLOG
228 +
229 + lea r8, [rsp + 28h + 18h]
230 + xor r9, r9
231 + call ndr_client_call
232 +
233 + add rsp, 28h
234 + ret
235 +ENDFUNC
236 +
237 +EXTERN ndr_async_client_call:PROC
238 +PUBLIC NdrAsyncClientCall
239 +FUNC NdrAsyncClientCall
240 + mov [rsp + 18h], r8
241 + .SAVEREG r8, 18h
242 + mov [rsp + 20h], r9
243 + .SAVEREG r9, 20h
244 + sub rsp, 28h
245 + .ALLOCSTACK 28h
246 + .ENDPROLOG
247 +
248 + lea r8, [rsp + 28h + 18h]
249 + call ndr_async_client_call
250 +
251 + add rsp, 28h
252 + ret
253 +ENDFUNC
254 +
255 +#endif
256 +
257 +END
258 diff -prudN .\wine\dlls\rpcrt4/ncastatus.h .\reactos\dll\win32\rpcrt4/ncastatus.h
259 --- .\wine\dlls\rpcrt4/ncastatus.h 2014-05-09 03:43:55.867030300 +0200
260 +++ .\reactos\dll\win32\rpcrt4/ncastatus.h 2013-12-27 18:11:56.764768100 +0100
261 @@ -18,6 +18,8 @@
262 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
263 */
264
265 +#pragma once
266 +
267 #define NCA_S_COMM_FAILURE 0x1C010001
268 #define NCA_S_OP_RNG_ERROR 0x1C010002
269 #define NCA_S_UNK_IF 0x1C010003
270 diff -prudN .\wine\dlls\rpcrt4/ndr_clientserver.c .\reactos\dll\win32\rpcrt4/ndr_clientserver.c
271 --- .\wine\dlls\rpcrt4/ndr_clientserver.c 2014-05-09 03:43:55.931034000 +0200
272 +++ .\reactos\dll\win32\rpcrt4/ndr_clientserver.c 2013-12-27 18:11:56.437167500 +0100
273 @@ -22,22 +22,7 @@
274 * - check for errors and throw exceptions
275 */
276
277 -#include <stdarg.h>
278 -
279 -#define COBJMACROS
280 -
281 -#include "windef.h"
282 -#include "winbase.h"
283 -#include "winerror.h"
284 -
285 -#include "objbase.h"
286 -
287 -#include "rpcproxy.h"
288 -
289 -#include "wine/debug.h"
290 -
291 -#include "ndr_misc.h"
292 -#include "rpcndr.h"
293 +#include "precomp.h"
294
295 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
296
297 diff -prudN .\wine\dlls\rpcrt4/ndr_contexthandle.c .\reactos\dll\win32\rpcrt4/ndr_contexthandle.c
298 --- .\wine\dlls\rpcrt4/ndr_contexthandle.c 2014-05-09 03:43:55.935034200 +0200
299 +++ .\reactos\dll\win32\rpcrt4/ndr_contexthandle.c 2013-12-27 18:11:56.639967900 +0100
300 @@ -19,14 +19,7 @@
301 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
302 */
303
304 -#include "ndr_misc.h"
305 -#include "rpc_assoc.h"
306 -#include "rpcndr.h"
307 -
308 -#include "wine/rpcfc.h"
309 -
310 -#include "wine/debug.h"
311 -#include "wine/list.h"
312 +#include "precomp.h"
313
314 WINE_DEFAULT_DEBUG_CHANNEL(ole);
315
316 diff -prudN .\wine\dlls\rpcrt4/ndr_es.c .\reactos\dll\win32\rpcrt4/ndr_es.c
317 --- .\wine\dlls\rpcrt4/ndr_es.c 2014-05-09 03:43:55.938034400 +0200
318 +++ .\reactos\dll\win32\rpcrt4/ndr_es.c 2013-12-27 18:11:56.764768100 +0100
319 @@ -18,21 +18,9 @@
320 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
321 */
322
323 -#include <stdarg.h>
324 -#include <stdio.h>
325 -
326 -#include "windef.h"
327 -#include "winbase.h"
328 -#include "winerror.h"
329 -#include "rpc.h"
330 -#include "midles.h"
331 -#include "ndrtypes.h"
332 -
333 -#include "ndr_misc.h"
334 -#include "ndr_stubless.h"
335 +#include "precomp.h"
336
337 -#include "wine/debug.h"
338 -#include "wine/rpcfc.h"
339 +#include <midles.h>
340
341 WINE_DEFAULT_DEBUG_CHANNEL(ole);
342
343 diff -prudN .\wine\dlls\rpcrt4/ndr_fullpointer.c .\reactos\dll\win32\rpcrt4/ndr_fullpointer.c
344 --- .\wine\dlls\rpcrt4/ndr_fullpointer.c 2014-05-09 03:43:55.941034600 +0200
345 +++ .\reactos\dll\win32\rpcrt4/ndr_fullpointer.c 2013-12-27 18:11:56.655567900 +0100
346 @@ -18,14 +18,7 @@
347 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
348 */
349
350 -#include <stdarg.h>
351 -
352 -#include "windef.h"
353 -#include "winbase.h"
354 -#include "rpc.h"
355 -#include "rpcndr.h"
356 -
357 -#include "wine/debug.h"
358 +#include "precomp.h"
359
360 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
361
362 diff -prudN .\wine\dlls\rpcrt4/ndr_marshall.c .\reactos\dll\win32\rpcrt4/ndr_marshall.c
363 --- .\wine\dlls\rpcrt4/ndr_marshall.c 2014-05-09 03:43:55.945034800 +0200
364 +++ .\reactos\dll\win32\rpcrt4/ndr_marshall.c 2014-04-27 11:37:38.078578700 +0200
365 @@ -27,25 +27,7 @@
366 * - Checks for integer addition overflow in user marshall functions
367 */
368
369 -#include <assert.h>
370 -#include <stdarg.h>
371 -#include <stdio.h>
372 -#include <string.h>
373 -#include <limits.h>
374 -
375 -#define NONAMELESSUNION
376 -#include "windef.h"
377 -#include "winbase.h"
378 -#include "winerror.h"
379 -
380 -#include "ndr_misc.h"
381 -#include "rpcndr.h"
382 -#include "ndrtypes.h"
383 -
384 -#include "wine/unicode.h"
385 -#include "wine/rpcfc.h"
386 -
387 -#include "wine/debug.h"
388 +#include "precomp.h"
389
390 WINE_DEFAULT_DEBUG_CHANNEL(ole);
391
392 diff -prudN .\wine\dlls\rpcrt4/ndr_misc.h .\reactos\dll\win32\rpcrt4/ndr_misc.h
393 --- .\wine\dlls\rpcrt4/ndr_misc.h 2014-05-09 03:43:55.873030700 +0200
394 +++ .\reactos\dll\win32\rpcrt4/ndr_misc.h 2013-12-27 18:11:56.624367800 +0100
395 @@ -21,13 +21,6 @@
396 #ifndef __WINE_NDR_MISC_H
397 #define __WINE_NDR_MISC_H
398
399 -#include <stdarg.h>
400 -
401 -#include "windef.h"
402 -#include "winbase.h"
403 -#include "rpc.h"
404 -#include "rpcndr.h"
405 -
406 struct IPSFactoryBuffer;
407
408 PFORMAT_STRING ComputeConformanceOrVariance(
409 diff -prudN .\wine\dlls\rpcrt4/ndr_ole.c .\reactos\dll\win32\rpcrt4/ndr_ole.c
410 --- .\wine\dlls\rpcrt4/ndr_ole.c 2014-05-09 03:43:55.948035000 +0200
411 +++ .\reactos\dll\win32\rpcrt4/ndr_ole.c 2013-12-27 18:11:56.468367600 +0100
412 @@ -22,27 +22,7 @@
413 * - finish RpcStream_Vtbl
414 */
415
416 -#include <stdarg.h>
417 -#include <stdio.h>
418 -#include <string.h>
419 -
420 -#define COBJMACROS
421 -#define NONAMELESSUNION
422 -#define NONAMELESSSTRUCT
423 -
424 -#include "windef.h"
425 -#include "winbase.h"
426 -#include "winerror.h"
427 -
428 -#include "objbase.h"
429 -
430 -#include "ndr_misc.h"
431 -#include "rpcndr.h"
432 -#include "rpcproxy.h"
433 -#include "wine/rpcfc.h"
434 -#include "cpsf.h"
435 -
436 -#include "wine/debug.h"
437 +#include "precomp.h"
438
439 WINE_DEFAULT_DEBUG_CHANNEL(ole);
440
441 diff -prudN .\wine\dlls\rpcrt4/ndr_stubless.c .\reactos\dll\win32\rpcrt4/ndr_stubless.c
442 --- .\wine\dlls\rpcrt4/ndr_stubless.c 2014-05-09 03:43:55.952035200 +0200
443 +++ .\reactos\dll\win32\rpcrt4/ndr_stubless.c 2013-12-27 18:11:56.437167500 +0100
444 @@ -23,28 +23,7 @@
445 * - Some types of binding handles
446 */
447
448 -#include "config.h"
449 -#include "wine/port.h"
450 -
451 -#include <stdarg.h>
452 -#include <stdio.h>
453 -#include <string.h>
454 -
455 -#include "windef.h"
456 -#include "winbase.h"
457 -#include "winerror.h"
458 -
459 -#include "objbase.h"
460 -#include "rpc.h"
461 -#include "rpcproxy.h"
462 -
463 -#include "wine/exception.h"
464 -#include "wine/debug.h"
465 -#include "wine/rpcfc.h"
466 -
467 -#include "cpsf.h"
468 -#include "ndr_misc.h"
469 -#include "ndr_stubless.h"
470 +#include "precomp.h"
471
472 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
473
474 diff -prudN .\wine\dlls\rpcrt4/ndr_stubless.h .\reactos\dll\win32\rpcrt4/ndr_stubless.h
475 --- .\wine\dlls\rpcrt4/ndr_stubless.h 2014-05-09 03:43:55.878030900 +0200
476 +++ .\reactos\dll\win32\rpcrt4/ndr_stubless.h 2013-12-27 18:11:56.452767500 +0100
477 @@ -18,10 +18,12 @@
478 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
479 */
480
481 -#include "ndrtypes.h"
482 +#pragma once
483 +
484 +#include <ndrtypes.h>
485
486 /* there can't be any alignment with the structures in this file */
487 -#include "pshpack1.h"
488 +#include <pshpack1.h>
489
490 typedef struct _NDR_PROC_HEADER
491 {
492 @@ -223,7 +225,7 @@ typedef struct _NDR_EHD_CONTEXT
493 unsigned char param_num;
494 } NDR_EHD_CONTEXT;
495
496 -#include "poppack.h"
497 +#include <poppack.h>
498
499 enum stubless_phase
500 {
501 diff -prudN .\wine\dlls\rpcrt4/precomp.h .\reactos\dll\win32\rpcrt4/precomp.h
502 --- .\wine\dlls\rpcrt4/precomp.h 1970-01-01 01:00:00.000000000 +0100
503 +++ .\reactos\dll\win32\rpcrt4/precomp.h 2014-03-14 01:43:22.357516600 +0100
504 @@ -0,0 +1,40 @@
505 +#ifndef _RPCRT4_PCH_
506 +#define _RPCRT4_PCH_
507 +
508 +#include <config.h>
509 +
510 +#include <assert.h>
511 +#include <stdarg.h>
512 +#include <stdio.h>
513 +
514 +#define _INC_WINDOWS
515 +
516 +#define COBJMACROS
517 +#define NONAMELESSUNION
518 +#define NONAMELESSSTRUCT
519 +
520 +#include <ntstatus.h>
521 +#define WIN32_NO_STATUS
522 +#include <windef.h>
523 +#include <winbase.h>
524 +#include <winternl.h>
525 +#include <objbase.h>
526 +#include <rpcproxy.h>
527 +#include <security.h>
528 +
529 +#include <wine/debug.h>
530 +#include <wine/exception.h>
531 +#include <wine/list.h>
532 +#include <wine/rpcfc.h>
533 +#include <wine/unicode.h>
534 +
535 +#include "cpsf.h"
536 +#include "ncastatus.h"
537 +#include "ndr_misc.h"
538 +#include "ndr_stubless.h"
539 +#include "rpc_assoc.h"
540 +#include "rpc_binding.h"
541 +#include "rpc_message.h"
542 +#include "rpc_server.h"
543 +
544 +#endif /* _RPCRT4_PCH_ */
545 diff -prudN .\wine\dlls\rpcrt4/rpc_assoc.c .\reactos\dll\win32\rpcrt4/rpc_assoc.c
546 --- .\wine\dlls\rpcrt4/rpc_assoc.c 2014-05-09 03:43:55.955035400 +0200
547 +++ .\reactos\dll\win32\rpcrt4/rpc_assoc.c 2013-12-27 18:11:56.780368100 +0100
548 @@ -19,19 +19,7 @@
549 *
550 */
551
552 -#include <stdarg.h>
553 -#include <assert.h>
554 -
555 -#include "rpc.h"
556 -#include "rpcndr.h"
557 -#include "winternl.h"
558 -
559 -#include "wine/unicode.h"
560 -#include "wine/debug.h"
561 -
562 -#include "rpc_binding.h"
563 -#include "rpc_assoc.h"
564 -#include "rpc_message.h"
565 +#include "precomp.h"
566
567 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
568
569 diff -prudN .\wine\dlls\rpcrt4/rpc_assoc.h .\reactos\dll\win32\rpcrt4/rpc_assoc.h
570 --- .\wine\dlls\rpcrt4/rpc_assoc.h 2014-05-09 03:43:55.884031300 +0200
571 +++ .\reactos\dll\win32\rpcrt4/rpc_assoc.h 2013-12-27 18:11:56.905168300 +0100
572 @@ -20,7 +20,6 @@
573 */
574
575 #include "rpc_binding.h"
576 -#include "wine/list.h"
577
578 typedef struct _RpcAssoc
579 {
580 diff -prudN .\wine\dlls\rpcrt4/rpc_async.c .\reactos\dll\win32\rpcrt4/rpc_async.c
581 --- .\wine\dlls\rpcrt4/rpc_async.c 2014-05-09 03:43:55.958035500 +0200
582 +++ .\reactos\dll\win32\rpcrt4/rpc_async.c 2013-12-27 18:11:56.468367600 +0100
583 @@ -19,17 +19,7 @@
584 *
585 */
586
587 -#include <stdarg.h>
588 -
589 -#include "rpc.h"
590 -#include "rpcndr.h"
591 -#include "rpcasync.h"
592 -
593 -#include "wine/debug.h"
594 -
595 -#include "rpc_binding.h"
596 -#include "rpc_message.h"
597 -#include "ndr_stubless.h"
598 +#include "precomp.h"
599
600 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
601
602 diff -prudN .\wine\dlls\rpcrt4/rpc_binding.c .\reactos\dll\win32\rpcrt4/rpc_binding.c
603 --- .\wine\dlls\rpcrt4/rpc_binding.c 2014-05-09 03:43:55.962035800 +0200
604 +++ .\reactos\dll\win32\rpcrt4/rpc_binding.c 2013-12-27 18:11:56.452767500 +0100
605 @@ -21,25 +21,7 @@
606 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
607 */
608
609 -#include <stdarg.h>
610 -#include <stdio.h>
611 -#include <string.h>
612 -#include <assert.h>
613 -
614 -#include "windef.h"
615 -#include "winbase.h"
616 -#include "winnls.h"
617 -#include "winerror.h"
618 -#include "winternl.h"
619 -#include "wine/unicode.h"
620 -
621 -#include "rpc.h"
622 -#include "rpcndr.h"
623 -
624 -#include "wine/debug.h"
625 -
626 -#include "rpc_binding.h"
627 -#include "rpc_assoc.h"
628 +#include "precomp.h"
629
630 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
631
632 diff -prudN .\wine\dlls\rpcrt4/rpc_binding.h .\reactos\dll\win32\rpcrt4/rpc_binding.h
633 --- .\wine\dlls\rpcrt4/rpc_binding.h 2014-05-09 03:43:55.890031600 +0200
634 +++ .\reactos\dll\win32\rpcrt4/rpc_binding.h 2013-12-27 18:11:56.483967600 +0100
635 @@ -21,12 +21,8 @@
636 #ifndef __WINE_RPC_BINDING_H
637 #define __WINE_RPC_BINDING_H
638
639 -#include "rpcndr.h"
640 -#include "security.h"
641 -#include "wine/list.h"
642 #include "rpc_defs.h"
643
644 -
645 enum secure_packet_direction
646 {
647 SECURE_PACKET_SEND,
648 diff -prudN .\wine\dlls\rpcrt4/rpc_defs.h .\reactos\dll\win32\rpcrt4/rpc_defs.h
649 --- .\wine\dlls\rpcrt4/rpc_defs.h 2014-05-09 03:43:55.895031900 +0200
650 +++ .\reactos\dll\win32\rpcrt4/rpc_defs.h 2013-01-25 00:19:54.167254400 +0100
651 @@ -22,7 +22,7 @@
652 #ifndef __WINE_RPC_DEFS_H
653 #define __WINE_RPC_DEFS_H
654
655 -#include "pshpack1.h"
656 +#include <pshpack1.h>
657 typedef struct
658 {
659 unsigned char rpc_ver; /* RPC major version (5) */
660 @@ -168,7 +168,7 @@ typedef struct
661 unsigned char auth_reserved; /* reserved, must be zero */
662 unsigned int auth_context_id; /* unique value for the authenticated connection */
663 } RpcAuthVerifier;
664 -#include "poppack.h"
665 +#include <poppack.h>
666
667 #define RPC_AUTH_VERIFIER_LEN(common_hdr) \
668 ((common_hdr)->auth_len ? (common_hdr)->auth_len + sizeof(RpcAuthVerifier) : 0)
669 diff -prudN .\wine\dlls\rpcrt4/rpc_epmap.c .\reactos\dll\win32\rpcrt4/rpc_epmap.c
670 --- .\wine\dlls\rpcrt4/rpc_epmap.c 2014-05-09 03:43:55.965035900 +0200
671 +++ .\reactos\dll\win32\rpcrt4/rpc_epmap.c 2013-12-27 18:11:56.421567500 +0100
672 @@ -20,19 +20,7 @@
673 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
674 */
675
676 -#include <stdarg.h>
677 -
678 -#include "windef.h"
679 -#include "winbase.h"
680 -#include "winerror.h"
681 -
682 -#include "rpc.h"
683 -
684 -#include "wine/debug.h"
685 -#include "wine/exception.h"
686 -
687 -#include "rpc_binding.h"
688 -#include "epm.h"
689 +#include "precomp.h"
690 #include "epm_towers.h"
691
692 WINE_DEFAULT_DEBUG_CHANNEL(ole);
693 @@ -92,7 +80,7 @@ static BOOL start_rpcss(void)
694 lstrcatW( cmd, rpcss );
695
696 Wow64DisableWow64FsRedirection( &redir );
697 - rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi );
698 + rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
699 Wow64RevertWow64FsRedirection( redir );
700
701 if (rslt)
702 @@ -162,7 +150,7 @@ static RPC_STATUS get_epm_handle_server(
703
704 static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
705 {
706 - switch (GetExceptionCode())
707 + switch (__eptr->ExceptionRecord->ExceptionCode)
708 {
709 case EXCEPTION_ACCESS_VIOLATION:
710 case EXCEPTION_ILLEGAL_INSTRUCTION:
711 diff -prudN .\wine\dlls\rpcrt4/rpc_message.c .\reactos\dll\win32\rpcrt4/rpc_message.c
712 --- .\wine\dlls\rpcrt4/rpc_message.c 2014-05-09 03:43:55.969036200 +0200
713 +++ .\reactos\dll\win32\rpcrt4/rpc_message.c 2014-04-27 11:37:38.078578700 +0200
714 @@ -20,25 +20,9 @@
715 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
716 */
717
718 -#include <stdarg.h>
719 -#include <stdio.h>
720 -#include <string.h>
721 -
722 -#include "windef.h"
723 -#include "winbase.h"
724 -#include "winerror.h"
725 -#include "winuser.h"
726 -
727 -#include "rpc.h"
728 -#include "rpcndr.h"
729 -#include "rpcdcep.h"
730 -
731 -#include "wine/debug.h"
732 +#include "precomp.h"
733
734 -#include "rpc_binding.h"
735 -#include "rpc_defs.h"
736 -#include "rpc_message.h"
737 -#include "ncastatus.h"
738 +#include <winuser.h>
739
740 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
741
742 diff -prudN .\wine\dlls\rpcrt4/rpc_message.h .\reactos\dll\win32\rpcrt4/rpc_message.h
743 --- .\wine\dlls\rpcrt4/rpc_message.h 2014-05-09 03:43:55.901032300 +0200
744 +++ .\reactos\dll\win32\rpcrt4/rpc_message.h 2013-12-27 18:11:56.499567600 +0100
745 @@ -21,8 +21,6 @@
746 #ifndef __WINE_RPC_MESSAGE_H
747 #define __WINE_RPC_MESSAGE_H
748
749 -#include "rpc_defs.h"
750 -
751 typedef unsigned int NCA_STATUS;
752
753 RpcPktHdr *RPCRT4_BuildFaultHeader(ULONG DataRepresentation, RPC_STATUS Status) DECLSPEC_HIDDEN;
754 diff -prudN .\wine\dlls\rpcrt4/rpc_server.c .\reactos\dll\win32\rpcrt4/rpc_server.c
755 --- .\wine\dlls\rpcrt4/rpc_server.c 2014-05-09 03:43:55.973036400 +0200
756 +++ .\reactos\dll\win32\rpcrt4/rpc_server.c 2013-12-27 18:11:56.780368100 +0100
757 @@ -20,31 +20,9 @@
758 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
759 */
760
761 -#include "config.h"
762 -#include "wine/port.h"
763 -
764 -#include <stdarg.h>
765 -#include <stdio.h>
766 -#include <string.h>
767 -#include <assert.h>
768 -
769 -#include "windef.h"
770 -#include "winbase.h"
771 -#include "winerror.h"
772 -
773 -#include "rpc.h"
774 -#include "rpcndr.h"
775 -#include "excpt.h"
776 -
777 -#include "wine/debug.h"
778 -#include "wine/exception.h"
779 +#include "precomp.h"
780
781 -#include "rpc_server.h"
782 -#include "rpc_assoc.h"
783 -#include "rpc_message.h"
784 -#include "rpc_defs.h"
785 -#include "ncastatus.h"
786 -#include "secext.h"
787 +#include <secext.h>
788
789 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
790
791 @@ -1075,8 +1053,10 @@ void RPCRT4_destroy_all_protseqs(void)
792 EnterCriticalSection(&server_cs);
793 LIST_FOR_EACH_ENTRY_SAFE(cps, cursor2, &protseqs, RpcServerProtseq, entry)
794 {
795 +#ifndef __REACTOS__
796 if (listen_count != 0)
797 RPCRT4_sync_with_server_thread(cps);
798 +#endif
799 destroy_serverprotoseq(cps);
800 }
801 LeaveCriticalSection(&server_cs);
802 diff -prudN .\wine\dlls\rpcrt4/rpc_server.h .\reactos\dll\win32\rpcrt4/rpc_server.h
803 --- .\wine\dlls\rpcrt4/rpc_server.h 2014-05-09 03:43:55.907032600 +0200
804 +++ .\reactos\dll\win32\rpcrt4/rpc_server.h 2013-12-27 18:11:56.905168300 +0100
805 @@ -22,7 +22,6 @@
806 #define __WINE_RPC_SERVER_H
807
808 #include "rpc_binding.h"
809 -#include "wine/list.h"
810
811 struct protseq_ops;
812
813 diff -prudN .\wine\dlls\rpcrt4/rpc_transport.c .\reactos\dll\win32\rpcrt4/rpc_transport.c
814 --- .\wine\dlls\rpcrt4/rpc_transport.c 2014-05-09 03:43:55.977036600 +0200
815 +++ .\reactos\dll\win32\rpcrt4/rpc_transport.c 2014-05-09 03:10:59.250551600 +0200
816 @@ -23,14 +23,7 @@
817 *
818 */
819
820 -#include "config.h"
821 -
822 -#include <stdarg.h>
823 -#include <stdio.h>
824 -#include <string.h>
825 -#include <assert.h>
826 -#include <stdlib.h>
827 -#include <sys/types.h>
828 +#include "precomp.h"
829
830 #if defined(__MINGW32__) || defined (_MSC_VER)
831 # include <ws2tcpip.h>
832 @@ -76,23 +69,8 @@
833 # define ioctlsocket ioctl
834 #endif /* defined(__MINGW32__) || defined (_MSC_VER) */
835
836 -#include "windef.h"
837 -#include "winbase.h"
838 -#include "winnls.h"
839 -#include "winerror.h"
840 -#include "wininet.h"
841 -#include "winternl.h"
842 -#include "wine/unicode.h"
843 -
844 -#include "rpc.h"
845 -#include "rpcndr.h"
846 -
847 -#include "wine/debug.h"
848 +#include <wininet.h>
849
850 -#include "rpc_binding.h"
851 -#include "rpc_assoc.h"
852 -#include "rpc_message.h"
853 -#include "rpc_server.h"
854 #include "epm_towers.h"
855
856 #ifndef SOL_TCP
857 @@ -113,31 +91,41 @@ typedef struct _RpcConnection_np
858 {
859 RpcConnection common;
860 HANDLE pipe;
861 - HANDLE listen_thread;
862 + OVERLAPPED ovl;
863 BOOL listening;
864 } RpcConnection_np;
865
866 static RpcConnection *rpcrt4_conn_np_alloc(void)
867 {
868 RpcConnection_np *npc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(RpcConnection_np));
869 + if (npc)
870 + {
871 + npc->pipe = NULL;
872 + memset(&npc->ovl, 0, sizeof(npc->ovl));
873 + npc->listening = FALSE;
874 + }
875 return &npc->common;
876 }
877
878 -static DWORD CALLBACK listen_thread(void *arg)
879 +static RPC_STATUS rpcrt4_conn_listen_pipe(RpcConnection_np *npc)
880 {
881 - RpcConnection_np *npc = arg;
882 + if (npc->listening)
883 + return RPC_S_OK;
884 +
885 + npc->listening = TRUE;
886 for (;;)
887 {
888 - if (ConnectNamedPipe(npc->pipe, NULL))
889 + if (ConnectNamedPipe(npc->pipe, &npc->ovl))
890 return RPC_S_OK;
891
892 switch(GetLastError())
893 {
894 case ERROR_PIPE_CONNECTED:
895 + SetEvent(npc->ovl.hEvent);
896 + return RPC_S_OK;
897 + case ERROR_IO_PENDING:
898 + /* will be completed in rpcrt4_protseq_np_wait_for_new_connection */
899 return RPC_S_OK;
900 - case ERROR_HANDLES_CLOSED:
901 - /* connection closed during listen */
902 - return RPC_S_NO_CONTEXT_AVAILABLE;
903 case ERROR_NO_DATA_DETECTED:
904 /* client has disconnected, retry */
905 DisconnectNamedPipe( npc->pipe );
906 @@ -150,6 +138,7 @@ static DWORD CALLBACK listen_thread(void
907 }
908 }
909
910 +#ifndef __REACTOS__
911 static RPC_STATUS rpcrt4_conn_listen_pipe(RpcConnection_np *npc)
912 {
913 if (npc->listening)
914 @@ -165,13 +154,14 @@ static RPC_STATUS rpcrt4_conn_listen_pip
915 }
916 return RPC_S_OK;
917 }
918 +#endif
919
920 static RPC_STATUS rpcrt4_conn_create_pipe(RpcConnection *Connection, LPCSTR pname)
921 {
922 RpcConnection_np *npc = (RpcConnection_np *) Connection;
923 TRACE("listening on %s\n", pname);
924
925 - npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX,
926 + npc->pipe = CreateNamedPipeA(pname, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,
927 PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE,
928 PIPE_UNLIMITED_INSTANCES,
929 RPC_MAX_PACKET_SIZE, RPC_MAX_PACKET_SIZE, 5000, NULL);
930 @@ -183,6 +173,9 @@ static RPC_STATUS rpcrt4_conn_create_pip
931 return RPC_S_CANT_CREATE_ENDPOINT;
932 }
933
934 + memset(&npc->ovl, 0, sizeof(npc->ovl));
935 + npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
936 +
937 /* Note: we don't call ConnectNamedPipe here because it must be done in the
938 * server thread as the thread must be alertable */
939 return RPC_S_OK;
940 @@ -229,6 +222,9 @@ static RPC_STATUS rpcrt4_conn_open_pipe(
941 if (err == ERROR_PIPE_BUSY) {
942 TRACE("connection failed, error=%x\n", err);
943 return RPC_S_SERVER_TOO_BUSY;
944 + } else if (err == ERROR_BAD_NETPATH) {
945 + TRACE("connection failed, error=%x\n", err);
946 + return RPC_S_SERVER_UNAVAILABLE;
947 }
948 if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) {
949 err = GetLastError();
950 @@ -238,9 +234,11 @@ static RPC_STATUS rpcrt4_conn_open_pipe(
951 }
952
953 /* success */
954 + memset(&npc->ovl, 0, sizeof(npc->ovl));
955 /* pipe is connected; change to message-read mode. */
956 dwMode = PIPE_READMODE_MESSAGE;
957 SetNamedPipeHandleState(pipe, &dwMode, NULL, NULL);
958 + npc->ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
959 npc->pipe = pipe;
960
961 return RPC_S_OK;
962 @@ -308,18 +306,59 @@ static RPC_STATUS rpcrt4_protseq_ncalrpc
963 static RPC_STATUS rpcrt4_ncacn_np_open(RpcConnection* Connection)
964 {
965 RpcConnection_np *npc = (RpcConnection_np *) Connection;
966 - static const char prefix[] = "\\\\.";
967 + static const char prefix[] = "\\\\";
968 + static const char local[] = ".";
969 + BOOL bUseLocalName = TRUE;
970 + CHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
971 + DWORD bufLen = sizeof(ComputerName)/sizeof(ComputerName[0]);
972 RPC_STATUS r;
973 LPSTR pname;
974 + INT size;
975
976 /* already connected? */
977 if (npc->pipe)
978 return RPC_S_OK;
979
980 /* protseq=ncacn_np: named pipes */
981 - pname = I_RpcAllocate(strlen(prefix) + strlen(Connection->Endpoint) + 1);
982 - strcat(strcpy(pname, prefix), Connection->Endpoint);
983 - r = rpcrt4_conn_open_pipe(Connection, pname, FALSE);
984 + size = strlen(prefix);
985 +
986 + if (Connection->NetworkAddr == NULL || strlen(Connection->NetworkAddr) == 0)
987 + {
988 + bUseLocalName = TRUE;
989 + size += strlen(local);
990 + }
991 + else
992 + {
993 + if (GetComputerNameA(ComputerName, &bufLen))
994 + {
995 + if (stricmp(ComputerName, Connection->NetworkAddr) == 0)
996 + {
997 + bUseLocalName = TRUE;
998 + size += strlen(local);
999 + }
1000 + else
1001 + {
1002 + bUseLocalName = FALSE;
1003 + size += strlen(Connection->NetworkAddr);
1004 + }
1005 + }
1006 + else
1007 + {
1008 + bUseLocalName = FALSE;
1009 + size += strlen(Connection->NetworkAddr);
1010 + }
1011 + }
1012 +
1013 + size += strlen(Connection->Endpoint) + 1;
1014 +
1015 + pname = I_RpcAllocate(size);
1016 + strcpy(pname, prefix);
1017 + if (bUseLocalName)
1018 + strcat(pname, local);
1019 + else
1020 + strcat(pname, Connection->NetworkAddr);
1021 + strcat(pname, Connection->Endpoint);
1022 + r = rpcrt4_conn_open_pipe(Connection, pname, TRUE);
1023 I_RpcFree(pname);
1024
1025 return r;
1026 @@ -368,9 +407,9 @@ static void rpcrt4_conn_np_handoff(RpcCo
1027 * to the child, then reopen the server binding to continue listening */
1028
1029 new_npc->pipe = old_npc->pipe;
1030 - new_npc->listen_thread = old_npc->listen_thread;
1031 + new_npc->ovl = old_npc->ovl;
1032 old_npc->pipe = 0;
1033 - old_npc->listen_thread = 0;
1034 + memset(&old_npc->ovl, 0, sizeof(old_npc->ovl));
1035 old_npc->listening = FALSE;
1036 }
1037
1038 @@ -415,11 +454,17 @@ static int rpcrt4_conn_np_read(RpcConnec
1039 char *buf = buffer;
1040 BOOL ret = TRUE;
1041 unsigned int bytes_left = count;
1042 + OVERLAPPED ovl;
1043 +
1044 + ZeroMemory(&ovl, sizeof(ovl));
1045 + ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
1046
1047 while (bytes_left)
1048 {
1049 DWORD bytes_read;
1050 - ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, NULL);
1051 + ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, &ovl);
1052 + if (!ret && GetLastError() == ERROR_IO_PENDING)
1053 + ret = GetOverlappedResult(npc->pipe, &ovl, &bytes_read, TRUE);
1054 if (!ret && GetLastError() == ERROR_MORE_DATA)
1055 ret = TRUE;
1056 if (!ret || !bytes_read)
1057 @@ -427,6 +472,7 @@ static int rpcrt4_conn_np_read(RpcConnec
1058 bytes_left -= bytes_read;
1059 buf += bytes_read;
1060 }
1061 + CloseHandle(ovl.hEvent);
1062 return ret ? count : -1;
1063 }
1064
1065 @@ -437,16 +483,23 @@ static int rpcrt4_conn_np_write(RpcConne
1066 const char *buf = buffer;
1067 BOOL ret = TRUE;
1068 unsigned int bytes_left = count;
1069 + OVERLAPPED ovl;
1070 +
1071 + ZeroMemory(&ovl, sizeof(ovl));
1072 + ovl.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
1073
1074 while (bytes_left)
1075 {
1076 DWORD bytes_written;
1077 - ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, NULL);
1078 + ret = WriteFile(npc->pipe, buf, bytes_left, &bytes_written, &ovl);
1079 + if (!ret && GetLastError() == ERROR_IO_PENDING)
1080 + ret = GetOverlappedResult(npc->pipe, &ovl, &bytes_written, TRUE);
1081 if (!ret || !bytes_written)
1082 break;
1083 bytes_left -= bytes_written;
1084 buf += bytes_written;
1085 }
1086 + CloseHandle(ovl.hEvent);
1087 return ret ? count : -1;
1088 }
1089
1090 @@ -458,9 +511,9 @@ static int rpcrt4_conn_np_close(RpcConne
1091 CloseHandle(npc->pipe);
1092 npc->pipe = 0;
1093 }
1094 - if (npc->listen_thread) {
1095 - CloseHandle(npc->listen_thread);
1096 - npc->listen_thread = 0;
1097 + if (npc->ovl.hEvent) {
1098 + CloseHandle(npc->ovl.hEvent);
1099 + npc->ovl.hEvent = 0;
1100 }
1101 return 0;
1102 }
1103 @@ -664,7 +717,7 @@ static void *rpcrt4_protseq_np_get_wait_
1104 conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
1105 while (conn) {
1106 rpcrt4_conn_listen_pipe(conn);
1107 - if (conn->listen_thread)
1108 + if (conn->ovl.hEvent)
1109 (*count)++;
1110 conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
1111 }
1112 @@ -685,7 +738,7 @@ static void *rpcrt4_protseq_np_get_wait_
1113 *count = 1;
1114 conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
1115 while (conn) {
1116 - if ((objs[*count] = conn->listen_thread))
1117 + if ((objs[*count] = conn->ovl.hEvent))
1118 (*count)++;
1119 conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
1120 }
1121 @@ -732,18 +785,12 @@ static int rpcrt4_protseq_np_wait_for_ne
1122 EnterCriticalSection(&protseq->cs);
1123 conn = CONTAINING_RECORD(protseq->conn, RpcConnection_np, common);
1124 while (conn) {
1125 - if (b_handle == conn->listen_thread) break;
1126 + if (b_handle == conn->ovl.hEvent) break;
1127 conn = CONTAINING_RECORD(conn->common.Next, RpcConnection_np, common);
1128 }
1129 cconn = NULL;
1130 if (conn)
1131 - {
1132 - DWORD exit_code;
1133 - if (GetExitCodeThread(conn->listen_thread, &exit_code) && exit_code == RPC_S_OK)
1134 - RPCRT4_SpawnConnection(&cconn, &conn->common);
1135 - CloseHandle(conn->listen_thread);
1136 - conn->listen_thread = 0;
1137 - }
1138 + RPCRT4_SpawnConnection(&cconn, &conn->common);
1139 else
1140 ERR("failed to locate connection for handle %p\n", b_handle);
1141 LeaveCriticalSection(&protseq->cs);
1142 diff -prudN .\wine\dlls\rpcrt4/rpcrt4.spec .\reactos\dll\win32\rpcrt4/rpcrt4.spec
1143 --- .\wine\dlls\rpcrt4/rpcrt4.spec 2014-05-09 03:43:55.911032800 +0200
1144 +++ .\reactos\dll\win32\rpcrt4/rpcrt4.spec 2013-12-07 15:35:15.331527800 +0100
1145 @@ -266,7 +266,7 @@
1146 @ stdcall NdrRangeUnmarshall(ptr ptr ptr long)
1147 @ stub NdrRpcSmClientAllocate
1148 @ stub NdrRpcSmClientFree
1149 -@ stub NdrRpcSmSetClientToOsf
1150 +@ stdcall NdrRpcSmSetClientToOsf(ptr)
1151 @ stub NdrRpcSsDefaultAllocate
1152 @ stub NdrRpcSsDefaultFree
1153 @ stub NdrRpcSsDisableAllocate
1154 diff -prudN .\wine\dlls\rpcrt4/rpcrt4_main.c .\reactos\dll\win32\rpcrt4/rpcrt4_main.c
1155 --- .\wine\dlls\rpcrt4/rpcrt4_main.c 2014-05-09 03:43:55.980036800 +0200
1156 +++ .\reactos\dll\win32\rpcrt4/rpcrt4_main.c 2014-05-09 03:45:42.047103500 +0200
1157 @@ -28,35 +28,10 @@
1158 * NT-based native rpcrt4's. Commonly-used transport for self-to-self RPC's.
1159 */
1160
1161 -#include "config.h"
1162 -
1163 -#include <stdarg.h>
1164 -#include <stdio.h>
1165 -#include <stdlib.h>
1166 -#include <string.h>
1167 -
1168 -#include "ntstatus.h"
1169 -#define WIN32_NO_STATUS
1170 -#include "windef.h"
1171 -#include "winerror.h"
1172 -#include "winbase.h"
1173 -#include "winuser.h"
1174 -#include "winnt.h"
1175 -#include "winternl.h"
1176 -#include "ntsecapi.h"
1177 -#include "iptypes.h"
1178 -#include "iphlpapi.h"
1179 -#include "wine/unicode.h"
1180 -#include "rpc.h"
1181 -
1182 -#include "ole2.h"
1183 -#include "rpcndr.h"
1184 -#include "rpcproxy.h"
1185 -
1186 -#include "rpc_binding.h"
1187 -#include "rpc_server.h"
1188 +#include "precomp.h"
1189
1190 -#include "wine/debug.h"
1191 +#include <ntsecapi.h>
1192 +#include <iphlpapi.h>
1193
1194 WINE_DEFAULT_DEBUG_CHANNEL(rpc);
1195
1196 diff -prudN .\wine\dlls\rpcrt4/unix_func.c .\reactos\dll\win32\rpcrt4/unix_func.c
1197 --- .\wine\dlls\rpcrt4/unix_func.c 1970-01-01 01:00:00.000000000 +0100
1198 +++ .\reactos\dll\win32\rpcrt4/unix_func.c 2013-01-25 00:19:53.278052800 +0100
1199 @@ -0,0 +1,29 @@
1200 +#define WIN32_NO_STATUS
1201 +#define _INC_WINDOWS
1202 +#include <windef.h>
1203 +#include <winsock2.h>
1204 +
1205 +const char *
1206 +WSAAPI
1207 +inet_ntop (int af,
1208 + const void *src,
1209 + char *dst,
1210 + size_t cnt)
1211 +{
1212 + struct in_addr in;
1213 + char *text_addr;
1214 +
1215 + if (af == AF_INET)
1216 + {
1217 + memcpy(&in.s_addr, src, sizeof(in.s_addr));
1218 + text_addr = inet_ntoa(in);
1219 + if (text_addr && dst)
1220 + {
1221 + strncpy(dst, text_addr, cnt);
1222 + return dst;
1223 + }
1224 + }
1225 +
1226 + return 0;
1227 +}
1228 +