https://git.reactos.org/?p=reactos.git;a=commitdiff;h=87a48c832a48c128a7faeā¦
commit 87a48c832a48c128a7fae6565407f0d56204da69
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Mar 4 23:48:59 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Mar 4 23:49:21 2018 +0100
[RPCRT4] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/rpcrt4/cproxy.c | 21 +++++++++++++++++++--
dll/win32/rpcrt4/cpsf.c | 27 ++++++++++++++++++++-------
dll/win32/rpcrt4/cstub.c | 22 ++++++++++++++++++++--
dll/win32/rpcrt4/ndr_clientserver.c | 17 ++++++++++++++++-
dll/win32/rpcrt4/ndr_contexthandle.c | 9 ++++++++-
dll/win32/rpcrt4/ndr_es.c | 16 ++++++++++++++--
dll/win32/rpcrt4/ndr_fullpointer.c | 9 ++++++++-
dll/win32/rpcrt4/ndr_marshall.c | 20 +++++++++++++++++++-
dll/win32/rpcrt4/ndr_misc.h | 7 +++++++
dll/win32/rpcrt4/ndr_ole.c | 21 ++++++++++++++++++++-
dll/win32/rpcrt4/ndr_stubless.c | 23 ++++++++++++++++++++++-
dll/win32/rpcrt4/ndr_stubless.h | 6 +++---
dll/win32/rpcrt4/precomp.h | 3 ++-
dll/win32/rpcrt4/rpc_assoc.c | 14 +++++++++++++-
dll/win32/rpcrt4/rpc_assoc.h | 3 +++
dll/win32/rpcrt4/rpc_async.c | 12 +++++++++++-
dll/win32/rpcrt4/rpc_binding.c | 20 +++++++++++++++++++-
dll/win32/rpcrt4/rpc_binding.h | 4 ++++
dll/win32/rpcrt4/rpc_defs.h | 4 ++--
dll/win32/rpcrt4/rpc_epmap.c | 14 ++++++++++++--
dll/win32/rpcrt4/rpc_message.c | 20 ++++++++++++++++++--
dll/win32/rpcrt4/rpc_message.h | 2 ++
dll/win32/rpcrt4/rpc_server.c | 28 ++++++++++++++++++++++++++--
dll/win32/rpcrt4/rpc_server.h | 1 +
dll/win32/rpcrt4/rpc_transport.c | 33 ++++++++++++++++++++++++++++-----
dll/win32/rpcrt4/rpcrt4_main.c | 33 +++++++++++++++++++++++++++++----
media/doc/README.WINE | 2 +-
27 files changed, 347 insertions(+), 44 deletions(-)
diff --git a/dll/win32/rpcrt4/cproxy.c b/dll/win32/rpcrt4/cproxy.c
index 9a5e4af131..4f5b4f2b1c 100644
--- a/dll/win32/rpcrt4/cproxy.c
+++ b/dll/win32/rpcrt4/cproxy.c
@@ -17,11 +17,28 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
+ *
* TODO: Handle non-i386 architectures
*/
-#include "precomp.h"
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "objbase.h"
+#include "rpcproxy.h"
+
+#include "cpsf.h"
+#include "ndr_misc.h"
+#include "ndr_stubless.h"
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/cpsf.c b/dll/win32/rpcrt4/cpsf.c
index d4e3f9965a..9375c40fa4 100644
--- a/dll/win32/rpcrt4/cpsf.c
+++ b/dll/win32/rpcrt4/cpsf.c
@@ -18,15 +18,28 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
+#include "wine/port.h"
-#include <winreg.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
-#define NO_SHLWAPI_PATH
-#define NO_SHLWAPI_STRFCNS
-#define NO_SHLWAPI_GDI
-#define NO_SHLWAPI_STREAM
-#include <shlwapi.h>
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winreg.h"
+
+#include "objbase.h"
+
+#include "rpcproxy.h"
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+#include "cpsf.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/cstub.c b/dll/win32/rpcrt4/cstub.c
index 7c78f1c82e..dc279b7534 100644
--- a/dll/win32/rpcrt4/cstub.c
+++ b/dll/win32/rpcrt4/cstub.c
@@ -19,7 +19,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "excpt.h"
+
+#include "objbase.h"
+#include "rpcproxy.h"
+
+#include "wine/debug.h"
+#include "wine/exception.h"
+
+#include "cpsf.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
@@ -41,7 +59,7 @@ typedef struct
static inline cstdstubbuffer_delegating_t *impl_from_delegating( IRpcStubBuffer *iface )
{
- return CONTAINING_RECORD(iface, cstdstubbuffer_delegating_t, stub_buffer);
+ return CONTAINING_RECORD((void *)iface, cstdstubbuffer_delegating_t, stub_buffer);
}
HRESULT CStdStubBuffer_Construct(REFIID riid,
diff --git a/dll/win32/rpcrt4/ndr_clientserver.c b/dll/win32/rpcrt4/ndr_clientserver.c
index d0920412d8..66fe33b283 100644
--- a/dll/win32/rpcrt4/ndr_clientserver.c
+++ b/dll/win32/rpcrt4/ndr_clientserver.c
@@ -22,7 +22,22 @@
* - check for errors and throw exceptions
*/
-#include "precomp.h"
+#include <stdarg.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "objbase.h"
+
+#include "rpcproxy.h"
+
+#include "wine/debug.h"
+
+#include "ndr_misc.h"
+#include "rpcndr.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/ndr_contexthandle.c b/dll/win32/rpcrt4/ndr_contexthandle.c
index eedd4a7f70..3b262854b7 100644
--- a/dll/win32/rpcrt4/ndr_contexthandle.c
+++ b/dll/win32/rpcrt4/ndr_contexthandle.c
@@ -19,7 +19,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "ndr_misc.h"
+#include "rpc_assoc.h"
+#include "rpcndr.h"
+
+#include "wine/rpcfc.h"
+
+#include "wine/debug.h"
+#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/ndr_es.c b/dll/win32/rpcrt4/ndr_es.c
index b487f60ad7..59ea8166f0 100644
--- a/dll/win32/rpcrt4/ndr_es.c
+++ b/dll/win32/rpcrt4/ndr_es.c
@@ -18,9 +18,21 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include <stdarg.h>
+#include <stdio.h>
-#include <midles.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "rpc.h"
+#include "midles.h"
+#include "ndrtypes.h"
+
+#include "ndr_misc.h"
+#include "ndr_stubless.h"
+
+#include "wine/debug.h"
+#include "wine/rpcfc.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/ndr_fullpointer.c b/dll/win32/rpcrt4/ndr_fullpointer.c
index 941cb29dc9..2bbd2b2b1a 100644
--- a/dll/win32/rpcrt4/ndr_fullpointer.c
+++ b/dll/win32/rpcrt4/ndr_fullpointer.c
@@ -18,7 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "rpc.h"
+#include "rpcndr.h"
+
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/ndr_marshall.c b/dll/win32/rpcrt4/ndr_marshall.c
index 229b9d5f75..ee58b60a55 100644
--- a/dll/win32/rpcrt4/ndr_marshall.c
+++ b/dll/win32/rpcrt4/ndr_marshall.c
@@ -27,7 +27,25 @@
* - Checks for integer addition overflow in user marshall functions
*/
-#include "precomp.h"
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+
+#define NONAMELESSUNION
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "ndr_misc.h"
+#include "rpcndr.h"
+#include "ndrtypes.h"
+
+#include "wine/unicode.h"
+#include "wine/rpcfc.h"
+
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/ndr_misc.h b/dll/win32/rpcrt4/ndr_misc.h
index c80afc29f0..2ca89b1744 100644
--- a/dll/win32/rpcrt4/ndr_misc.h
+++ b/dll/win32/rpcrt4/ndr_misc.h
@@ -21,6 +21,13 @@
#ifndef __WINE_NDR_MISC_H
#define __WINE_NDR_MISC_H
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "rpc.h"
+#include "rpcndr.h"
+
struct IPSFactoryBuffer;
PFORMAT_STRING ComputeConformanceOrVariance(
diff --git a/dll/win32/rpcrt4/ndr_ole.c b/dll/win32/rpcrt4/ndr_ole.c
index 3d940afb7d..0f0b7e7df2 100644
--- a/dll/win32/rpcrt4/ndr_ole.c
+++ b/dll/win32/rpcrt4/ndr_ole.c
@@ -21,7 +21,26 @@
* - fix the wire-protocol to match MS/RPC
*/
-#include "precomp.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "objbase.h"
+
+#include "ndr_misc.h"
+#include "rpcndr.h"
+#include "rpcproxy.h"
+#include "wine/rpcfc.h"
+#include "cpsf.h"
+
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/ndr_stubless.c b/dll/win32/rpcrt4/ndr_stubless.c
index f3e0399ef3..f84c61751a 100644
--- a/dll/win32/rpcrt4/ndr_stubless.c
+++ b/dll/win32/rpcrt4/ndr_stubless.c
@@ -23,7 +23,28 @@
* - Some types of binding handles
*/
-#include "precomp.h"
+#include "config.h"
+#include "wine/port.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "objbase.h"
+#include "rpc.h"
+#include "rpcproxy.h"
+
+#include "wine/exception.h"
+#include "wine/debug.h"
+#include "wine/rpcfc.h"
+
+#include "cpsf.h"
+#include "ndr_misc.h"
+#include "ndr_stubless.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/ndr_stubless.h b/dll/win32/rpcrt4/ndr_stubless.h
index de78d8eed2..f8c3c5aba9 100644
--- a/dll/win32/rpcrt4/ndr_stubless.h
+++ b/dll/win32/rpcrt4/ndr_stubless.h
@@ -20,10 +20,10 @@
#pragma once
-#include <ndrtypes.h>
+#include "ndrtypes.h"
/* there can't be any alignment with the structures in this file */
-#include <pshpack1.h>
+#include "pshpack1.h"
typedef struct _NDR_PROC_HEADER
{
@@ -226,7 +226,7 @@ typedef struct _NDR_EHD_CONTEXT
unsigned char param_num;
} NDR_EHD_CONTEXT;
-#include <poppack.h>
+#include "poppack.h"
enum stubless_phase
{
diff --git a/dll/win32/rpcrt4/precomp.h b/dll/win32/rpcrt4/precomp.h
index e67f2e44be..cb90de9d38 100644
--- a/dll/win32/rpcrt4/precomp.h
+++ b/dll/win32/rpcrt4/precomp.h
@@ -1,3 +1,4 @@
+
#ifndef _RPCRT4_PCH_
#define _RPCRT4_PCH_
@@ -37,4 +38,4 @@
#include "rpc_message.h"
#include "rpc_server.h"
-#endif /* _RPCRT4_PCH_ */
+#endif /* !_RPCRT4_PCH_ */
diff --git a/dll/win32/rpcrt4/rpc_assoc.c b/dll/win32/rpcrt4/rpc_assoc.c
index cf61cf64fd..ccf17b9c07 100644
--- a/dll/win32/rpcrt4/rpc_assoc.c
+++ b/dll/win32/rpcrt4/rpc_assoc.c
@@ -19,7 +19,19 @@
*
*/
-#include "precomp.h"
+#include <stdarg.h>
+#include <assert.h>
+
+#include "rpc.h"
+#include "rpcndr.h"
+#include "wine/winternl.h"
+
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+#include "rpc_binding.h"
+#include "rpc_assoc.h"
+#include "rpc_message.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/rpc_assoc.h b/dll/win32/rpcrt4/rpc_assoc.h
index ddbc27428b..31cbd8ba55 100644
--- a/dll/win32/rpcrt4/rpc_assoc.h
+++ b/dll/win32/rpcrt4/rpc_assoc.h
@@ -19,7 +19,10 @@
*
*/
+#pragma once
+
#include "rpc_binding.h"
+#include "wine/list.h"
typedef struct _RpcAssoc
{
diff --git a/dll/win32/rpcrt4/rpc_async.c b/dll/win32/rpcrt4/rpc_async.c
index d4dbf163dc..891fc5ad72 100644
--- a/dll/win32/rpcrt4/rpc_async.c
+++ b/dll/win32/rpcrt4/rpc_async.c
@@ -19,7 +19,17 @@
*
*/
-#include "precomp.h"
+#include <stdarg.h>
+
+#include "rpc.h"
+#include "rpcndr.h"
+#include "rpcasync.h"
+
+#include "wine/debug.h"
+
+#include "rpc_binding.h"
+#include "rpc_message.h"
+#include "ndr_stubless.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/rpc_binding.c b/dll/win32/rpcrt4/rpc_binding.c
index 4f7b5f0044..829110f662 100644
--- a/dll/win32/rpcrt4/rpc_binding.c
+++ b/dll/win32/rpcrt4/rpc_binding.c
@@ -21,7 +21,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "winerror.h"
+#include "wine/winternl.h"
+#include "wine/unicode.h"
+
+#include "rpc.h"
+#include "rpcndr.h"
+
+#include "wine/debug.h"
+
+#include "rpc_binding.h"
+#include "rpc_assoc.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/rpc_binding.h b/dll/win32/rpcrt4/rpc_binding.h
index 991a0ff5a8..ca5388789f 100644
--- a/dll/win32/rpcrt4/rpc_binding.h
+++ b/dll/win32/rpcrt4/rpc_binding.h
@@ -21,8 +21,12 @@
#ifndef __WINE_RPC_BINDING_H
#define __WINE_RPC_BINDING_H
+#include "rpcndr.h"
+#include "security.h"
+#include "wine/list.h"
#include "rpc_defs.h"
+
enum secure_packet_direction
{
SECURE_PACKET_SEND,
diff --git a/dll/win32/rpcrt4/rpc_defs.h b/dll/win32/rpcrt4/rpc_defs.h
index f0d922f44b..434d39699e 100644
--- a/dll/win32/rpcrt4/rpc_defs.h
+++ b/dll/win32/rpcrt4/rpc_defs.h
@@ -22,7 +22,7 @@
#ifndef __WINE_RPC_DEFS_H
#define __WINE_RPC_DEFS_H
-#include <pshpack1.h>
+#include "pshpack1.h"
typedef struct
{
unsigned char rpc_ver; /* RPC major version (5) */
@@ -168,7 +168,7 @@ typedef struct
unsigned char auth_reserved; /* reserved, must be zero */
unsigned int auth_context_id; /* unique value for the authenticated connection */
} RpcAuthVerifier;
-#include <poppack.h>
+#include "poppack.h"
#define RPC_AUTH_VERIFIER_LEN(common_hdr) \
((common_hdr)->auth_len ? (common_hdr)->auth_len + sizeof(RpcAuthVerifier) :
0)
diff --git a/dll/win32/rpcrt4/rpc_epmap.c b/dll/win32/rpcrt4/rpc_epmap.c
index b299643346..c2ba446a66 100644
--- a/dll/win32/rpcrt4/rpc_epmap.c
+++ b/dll/win32/rpcrt4/rpc_epmap.c
@@ -20,10 +20,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include <stdarg.h>
-#include <winsvc.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winsvc.h"
+#include "rpc.h"
+
+#include "wine/debug.h"
+#include "wine/exception.h"
+
+#include "rpc_binding.h"
+#include "epm_c.h"
#include "epm_towers.h"
WINE_DEFAULT_DEBUG_CHANNEL(ole);
diff --git a/dll/win32/rpcrt4/rpc_message.c b/dll/win32/rpcrt4/rpc_message.c
index a7c1c54aa1..96422138c4 100644
--- a/dll/win32/rpcrt4/rpc_message.c
+++ b/dll/win32/rpcrt4/rpc_message.c
@@ -20,9 +20,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
-#include <winuser.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winuser.h"
+
+#include "rpc.h"
+#include "rpcndr.h"
+#include "rpcdcep.h"
+
+#include "wine/debug.h"
+
+#include "rpc_binding.h"
+#include "rpc_defs.h"
+#include "rpc_message.h"
+#include "ncastatus.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/dll/win32/rpcrt4/rpc_message.h b/dll/win32/rpcrt4/rpc_message.h
index 30065ddd02..a3729cc784 100644
--- a/dll/win32/rpcrt4/rpc_message.h
+++ b/dll/win32/rpcrt4/rpc_message.h
@@ -21,6 +21,8 @@
#ifndef __WINE_RPC_MESSAGE_H
#define __WINE_RPC_MESSAGE_H
+#include "rpc_defs.h"
+
typedef unsigned int NCA_STATUS;
RpcPktHdr *RPCRT4_BuildFaultHeader(ULONG DataRepresentation, RPC_STATUS Status)
DECLSPEC_HIDDEN;
diff --git a/dll/win32/rpcrt4/rpc_server.c b/dll/win32/rpcrt4/rpc_server.c
index 57d64ff0fc..d1b5d64ece 100644
--- a/dll/win32/rpcrt4/rpc_server.c
+++ b/dll/win32/rpcrt4/rpc_server.c
@@ -20,9 +20,31 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include "config.h"
+#include "wine/port.h"
-#include <secext.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "rpc.h"
+#include "rpcndr.h"
+#include "excpt.h"
+
+#include "wine/debug.h"
+#include "wine/exception.h"
+
+#include "rpc_server.h"
+#include "rpc_assoc.h"
+#include "rpc_message.h"
+#include "rpc_defs.h"
+#include "ncastatus.h"
+#include "secext.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
@@ -784,8 +806,10 @@ static RPC_STATUS RPCRT4_stop_listen(BOOL auto_listen)
if (stop_listen) {
RpcServerProtseq *cps;
+ EnterCriticalSection(&server_cs);
LIST_FOR_EACH_ENTRY(cps, &protseqs, RpcServerProtseq, entry)
RPCRT4_sync_with_server_thread(cps);
+ LeaveCriticalSection(&server_cs);
}
if (!auto_listen)
diff --git a/dll/win32/rpcrt4/rpc_server.h b/dll/win32/rpcrt4/rpc_server.h
index adaa47133e..5e043651e5 100644
--- a/dll/win32/rpcrt4/rpc_server.h
+++ b/dll/win32/rpcrt4/rpc_server.h
@@ -22,6 +22,7 @@
#define __WINE_RPC_SERVER_H
#include "rpc_binding.h"
+#include "wine/list.h"
struct protseq_ops;
diff --git a/dll/win32/rpcrt4/rpc_transport.c b/dll/win32/rpcrt4/rpc_transport.c
index 0a2c9a5fb0..8d8a7be3af 100644
--- a/dll/win32/rpcrt4/rpc_transport.c
+++ b/dll/win32/rpcrt4/rpc_transport.c
@@ -23,15 +23,38 @@
*
*/
-#include "precomp.h"
-
#include "ntstatus.h"
#define WIN32_NO_STATUS
-#include <ws2tcpip.h>
+#ifdef __REACTOS__
+#define NONAMELESSUNION
+#endif
+#include "ws2tcpip.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "winerror.h"
+#include "wininet.h"
+#include "wine/winternl.h"
+#include "winioctl.h"
+#include "wine/unicode.h"
+
+#include "rpc.h"
+#include "rpcndr.h"
-#include <wininet.h>
-#include <winioctl.h>
+#include "wine/debug.h"
+#include "rpc_binding.h"
+#include "rpc_assoc.h"
+#include "rpc_message.h"
+#include "rpc_server.h"
#include "epm_towers.h"
#define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000)
diff --git a/dll/win32/rpcrt4/rpcrt4_main.c b/dll/win32/rpcrt4/rpcrt4_main.c
index 562732e850..15bba493ab 100644
--- a/dll/win32/rpcrt4/rpcrt4_main.c
+++ b/dll/win32/rpcrt4/rpcrt4_main.c
@@ -28,10 +28,35 @@
* NT-based native rpcrt4's. Commonly-used transport for self-to-self RPC's.
*/
-#include "precomp.h"
-
-#include <ntsecapi.h>
-#include <iphlpapi.h>
+#include "config.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winerror.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnt.h"
+#include "wine/winternl.h"
+#include "ntsecapi.h"
+#include "iptypes.h"
+#include "iphlpapi.h"
+#include "wine/unicode.h"
+#include "rpc.h"
+
+#include "ole2.h"
+#include "rpcndr.h"
+#include "rpcproxy.h"
+
+#include "rpc_binding.h"
+#include "rpc_server.h"
+
+#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(rpc);
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 3c8bf8dd87..ef3c0456d4 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -160,7 +160,7 @@ reactos/dll/win32/rasapi32 # Synced to WineStaging-2.9
reactos/dll/win32/resutils # Synced to WineStaging-2.9
reactos/dll/win32/riched20 # Synced to Wine-3.0
reactos/dll/win32/riched32 # Synced to WineStaging-2.9
-reactos/dll/win32/rpcrt4 # Synced to Wine-3.0
+reactos/dll/win32/rpcrt4 # Synced to WineStaging-3.3
reactos/dll/win32/rsabase # Synced to WineStaging-2.9
reactos/dll/win32/rsaenh # Synced to WineStaging-2.9
reactos/dll/win32/sccbase # Synced to WineStaging-2.9