https://git.reactos.org/?p=reactos.git;a=commitdiff;h=af764263d54842d876df5…
commit af764263d54842d876df5617011fde746ce36032
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Thu Mar 15 12:36:29 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Thu Mar 15 12:36:29 2018 +0100
[INETCOMM] Sync with Wine Staging 3.3. CORE-14434
---
dll/win32/inetcomm/CMakeLists.txt | 4 ++--
dll/win32/inetcomm/imaptransport.c | 15 +++++++++++++
dll/win32/inetcomm/inetcomm_main.c | 18 ++++++++++++++-
dll/win32/inetcomm/inetcomm_private.h | 40 +++++-----------------------------
dll/win32/inetcomm/internettransport.c | 15 ++++++++++++-
dll/win32/inetcomm/mimeintl.c | 23 ++++++++++++++++---
dll/win32/inetcomm/mimeole.c | 25 +++++++++++++++++++--
dll/win32/inetcomm/pop3transport.c | 16 ++++++++++++++
dll/win32/inetcomm/precomp.h | 25 +++++++++++++++++++++
dll/win32/inetcomm/protocol.c | 15 ++++++++++---
dll/win32/inetcomm/smtptransport.c | 15 +++++++++++++
media/doc/README.WINE | 2 +-
12 files changed, 165 insertions(+), 48 deletions(-)
diff --git a/dll/win32/inetcomm/CMakeLists.txt b/dll/win32/inetcomm/CMakeLists.txt
index 1f82a5c70b..c995faf2cc 100644
--- a/dll/win32/inetcomm/CMakeLists.txt
+++ b/dll/win32/inetcomm/CMakeLists.txt
@@ -12,7 +12,7 @@ list(APPEND SOURCE
pop3transport.c
protocol.c
smtptransport.c
- inetcomm_private.h)
+ precomp.h)
add_library(inetcomm SHARED
${SOURCE}
@@ -24,5 +24,5 @@ add_library(inetcomm SHARED
set_module_type(inetcomm win32dll)
target_link_libraries(inetcomm uuid wine)
add_importlibs(inetcomm ole32 oleaut32 ws2_32 user32 propsys urlmon msvcrt kernel32
ntdll)
-add_pch(inetcomm inetcomm_private.h SOURCE)
+add_pch(inetcomm precomp.h SOURCE)
add_cd_file(TARGET inetcomm DESTINATION reactos/system32 FOR all)
diff --git a/dll/win32/inetcomm/imaptransport.c b/dll/win32/inetcomm/imaptransport.c
index 110edf6dc9..0da456eac8 100644
--- a/dll/win32/inetcomm/imaptransport.c
+++ b/dll/win32/inetcomm/imaptransport.c
@@ -18,8 +18,23 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnt.h"
+#include "winuser.h"
+#include "objbase.h"
+#include "mimeole.h"
+#include "wine/debug.h"
+
#include "inetcomm_private.h"
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
+
typedef struct
{
InternetTransport InetTransport;
diff --git a/dll/win32/inetcomm/inetcomm_main.c b/dll/win32/inetcomm/inetcomm_main.c
index 4dec2adf89..7543628663 100644
--- a/dll/win32/inetcomm/inetcomm_main.c
+++ b/dll/win32/inetcomm/inetcomm_main.c
@@ -18,9 +18,25 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnt.h"
+#include "winuser.h"
+#include "ole2.h"
+#include "ocidl.h"
+#include "rpcproxy.h"
+#include "initguid.h"
+#include "mimeole.h"
+
#include "inetcomm_private.h"
-#include <rpcproxy.h>
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
static HINSTANCE instance;
diff --git a/dll/win32/inetcomm/inetcomm_private.h
b/dll/win32/inetcomm/inetcomm_private.h
index cff28ddaaf..fa40a34039 100644
--- a/dll/win32/inetcomm/inetcomm_private.h
+++ b/dll/win32/inetcomm/inetcomm_private.h
@@ -18,30 +18,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#ifndef _INETCOMM_PRIVATE_H_
-#define _INETCOMM_PRIVATE_H_
+#pragma once
-#include <stdio.h>
-
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define NONAMELESSUNION
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-#include <mimeole.h>
-#include <winsock2.h>
-#include <imnxport.h>
-
-#include <wine/list.h>
-#include <wine/unicode.h>
-
-#include <wine/debug.h>
-WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
+#include "winsock2.h"
+#include "winuser.h"
+#include "objbase.h"
+#include "imnxport.h"
typedef struct InternetTransport InternetTransport;
@@ -103,15 +85,3 @@ HRESULT MimeInternational_Construct(IMimeInternational **internat)
DECLSPEC_HIDD
HRESULT SMTPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
HRESULT IMAPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
-
-static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
-{
- return HeapAlloc(GetProcessHeap(), 0, len);
-}
-
-static inline BOOL heap_free(void *mem)
-{
- return HeapFree(GetProcessHeap(), 0, mem);
-}
-
-#endif /* _INETCOMM_PRIVATE_H_ */
diff --git a/dll/win32/inetcomm/internettransport.c
b/dll/win32/inetcomm/internettransport.c
index 73bb170f94..dcce0d9df1 100644
--- a/dll/win32/inetcomm/internettransport.c
+++ b/dll/win32/inetcomm/internettransport.c
@@ -18,9 +18,22 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+
+#include "ws2tcpip.h"
+#include "windef.h"
+#include "winnt.h"
+#include "objbase.h"
+#include "ole2.h"
+#include "mimeole.h"
+
+#include <stdio.h>
+
+#include "wine/debug.h"
+
#include "inetcomm_private.h"
-#include <ws2tcpip.h>
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
static const WCHAR wszClassName[] =
{'T','h','o','r','C','o','n','n','W','n','d','C','l','a','s','s',0};
diff --git a/dll/win32/inetcomm/mimeintl.c b/dll/win32/inetcomm/mimeintl.c
index 92714ca9e1..07d3ae5f03 100644
--- a/dll/win32/inetcomm/mimeintl.c
+++ b/dll/win32/inetcomm/mimeintl.c
@@ -18,11 +18,28 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "inetcomm_private.h"
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "winnls.h"
+#include "objbase.h"
+#include "ole2.h"
+#include "mimeole.h"
+#include "mlang.h"
-#include <mlang.h>
+#include "wine/list.h"
+#include "wine/unicode.h"
+#include "wine/debug.h"
+
+#include "inetcomm_private.h"
-#include <wine/unicode.h>
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
typedef struct
{
diff --git a/dll/win32/inetcomm/mimeole.c b/dll/win32/inetcomm/mimeole.c
index 9d130a1f78..b7d6d6ab3a 100644
--- a/dll/win32/inetcomm/mimeole.c
+++ b/dll/win32/inetcomm/mimeole.c
@@ -19,10 +19,31 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "objbase.h"
+#include "ole2.h"
+#include "mimeole.h"
+#ifdef __REACTOS__
+#include <winreg.h>
+#endif
+#include "propvarutil.h"
+
+#include "wine/heap.h"
+#include "wine/list.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
#include "inetcomm_private.h"
-#include <winreg.h>
-#include <propvarutil.h>
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
typedef struct
{
diff --git a/dll/win32/inetcomm/pop3transport.c b/dll/win32/inetcomm/pop3transport.c
index 22f2be60f7..1c8bc91bb0 100644
--- a/dll/win32/inetcomm/pop3transport.c
+++ b/dll/win32/inetcomm/pop3transport.c
@@ -18,8 +18,24 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnt.h"
+#include "winuser.h"
+#include "objbase.h"
+#include "mimeole.h"
+#include "wine/debug.h"
+
#include "inetcomm_private.h"
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
+
enum parse_state
{
STATE_NONE,
diff --git a/dll/win32/inetcomm/precomp.h b/dll/win32/inetcomm/precomp.h
new file mode 100644
index 0000000000..04946eedd3
--- /dev/null
+++ b/dll/win32/inetcomm/precomp.h
@@ -0,0 +1,25 @@
+
+#ifndef _INETCOMM_PRECOMP_H_
+#define _INETCOMM_PRECOMP_H_
+
+#include <stdio.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define NONAMELESSUNION
+
+#include <windef.h>
+#include <winbase.h>
+#include <ole2.h>
+#include <mimeole.h>
+
+#include <wine/list.h>
+#include <wine/unicode.h>
+#include <wine/debug.h>
+
+#include "inetcomm_private.h"
+
+#endif /* !_INETCOMM_PRECOMP_H_ */
diff --git a/dll/win32/inetcomm/protocol.c b/dll/win32/inetcomm/protocol.c
index adb98467f1..028463a269 100644
--- a/dll/win32/inetcomm/protocol.c
+++ b/dll/win32/inetcomm/protocol.c
@@ -16,10 +16,20 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "inetcomm_private.h"
+#define COBJMACROS
+#define NONAMELESSUNION
#include <assert.h>
+#include "mimeole.h"
+#include "inetcomm_private.h"
+
+#include "wine/debug.h"
+#include "wine/heap.h"
+#include "wine/unicode.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
+
typedef struct {
IUnknown IUnknown_inner;
IInternetProtocol IInternetProtocol_iface;
@@ -477,8 +487,7 @@ static HRESULT WINAPI MimeHtmlProtocol_Start(IInternetProtocol *iface,
const WCH
if((bindf & (BINDF_ASYNCHRONOUS|BINDF_FROMURLMON|BINDF_NEEDFILE)) !=
(BINDF_ASYNCHRONOUS|BINDF_FROMURLMON|BINDF_NEEDFILE))
FIXME("unsupported bindf %x\n", bindf);
- This->sink = pOIProtSink;
- IInternetProtocolSink_AddRef(This->sink);
+ IInternetProtocolSink_AddRef(This->sink = pOIProtSink);
binding = heap_alloc(FIELD_OFFSET(MimeHtmlBinding, url[url.mhtml_len+1]));
if(!binding)
diff --git a/dll/win32/inetcomm/smtptransport.c b/dll/win32/inetcomm/smtptransport.c
index b3b60f3f88..af11308258 100644
--- a/dll/win32/inetcomm/smtptransport.c
+++ b/dll/win32/inetcomm/smtptransport.c
@@ -20,8 +20,23 @@
*
*/
+#define COBJMACROS
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnt.h"
+#include "winuser.h"
+#include "objbase.h"
+#include "mimeole.h"
+#include "wine/debug.h"
+
#include "inetcomm_private.h"
+WINE_DEFAULT_DEBUG_CHANNEL(inetcomm);
+
typedef struct
{
InternetTransport InetTransport;
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 51b4799dd1..13a7673be7 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -78,7 +78,7 @@ reactos/dll/win32/ieframe # Synced to WineStaging-3.3
reactos/dll/win32/imaadp32.acm # Synced to WineStaging-3.3
reactos/dll/win32/imagehlp # Synced to WineStaging-3.3
reactos/dll/win32/imm32 # Synced to WineStaging-3.3
-reactos/dll/win32/inetcomm # Synced to Wine-3.0
+reactos/dll/win32/inetcomm # Synced to WineStaging-3.3
reactos/dll/win32/inetmib1 # Synced to WineStaging-2.9
reactos/dll/win32/initpki # Synced to WineStaging-2.9
reactos/dll/win32/inseng # Synced to Wine-3.0