Author: akhaldi
Date: Fri Sep 20 09:41:39 2013
New Revision: 60233
URL:
http://svn.reactos.org/svn/reactos?rev=60233&view=rev
Log:
[INETCOMM]
* Sync with Wine 1.7.1.
CORE-7469
Modified:
trunk/reactos/dll/win32/inetcomm/CMakeLists.txt
trunk/reactos/dll/win32/inetcomm/imaptransport.c
trunk/reactos/dll/win32/inetcomm/inetcomm_main.c
trunk/reactos/dll/win32/inetcomm/mimeole.c
trunk/reactos/dll/win32/inetcomm/pop3transport.c
trunk/reactos/dll/win32/inetcomm/smtptransport.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/inetcomm/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/inetcomm/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/CMakeLists.txt [iso-8859-1] Fri Sep 20 09:41:39 2013
@@ -1,6 +1,3 @@
-
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-D__WINESRC__)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
@@ -14,22 +11,11 @@
mimeole.c
pop3transport.c
smtptransport.c
- inetcomm.rc
${CMAKE_CURRENT_BINARY_DIR}/inetcomm_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/inetcomm.def)
-add_library(inetcomm SHARED ${SOURCE})
+add_library(inetcomm SHARED ${SOURCE} inetcomm.rc)
set_module_type(inetcomm win32dll)
target_link_libraries(inetcomm uuid wine)
-
-add_importlibs(inetcomm
- ole32
- oleaut32
- ws2_32
- user32
- advapi32
- msvcrt
- kernel32
- ntdll)
-
+add_importlibs(inetcomm ole32 oleaut32 ws2_32 user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET inetcomm DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/dll/win32/inetcomm/imaptransport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/imaptra…
==============================================================================
--- trunk/reactos/dll/win32/inetcomm/imaptransport.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/imaptransport.c [iso-8859-1] Fri Sep 20 09:41:39
2013
@@ -54,7 +54,7 @@
IsEqualIID(riid, &IID_IIMAPTransport))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ IIMAPTransport_AddRef(iface);
return S_OK;
}
*ppv = NULL;
@@ -447,30 +447,30 @@
return S_OK;
}
-static HRESULT WINAPI IMAPTransportCF_QueryInterface(LPCLASSFACTORY iface,
+static HRESULT WINAPI IMAPTransportCF_QueryInterface(IClassFactory *iface,
REFIID riid, LPVOID *ppv)
{
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ IClassFactory_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
}
-static ULONG WINAPI IMAPTransportCF_AddRef(LPCLASSFACTORY iface)
+static ULONG WINAPI IMAPTransportCF_AddRef(IClassFactory *iface)
{
return 2; /* non-heap based object */
}
-static ULONG WINAPI IMAPTransportCF_Release(LPCLASSFACTORY iface)
+static ULONG WINAPI IMAPTransportCF_Release(IClassFactory *iface)
{
return 1; /* non-heap based object */
}
-static HRESULT WINAPI IMAPTransportCF_CreateInstance(LPCLASSFACTORY iface,
+static HRESULT WINAPI IMAPTransportCF_CreateInstance(IClassFactory *iface,
LPUNKNOWN pUnk, REFIID riid, LPVOID *ppv)
{
HRESULT hr;
@@ -493,7 +493,7 @@
return hr;
}
-static HRESULT WINAPI IMAPTransportCF_LockServer(LPCLASSFACTORY iface, BOOL fLock)
+static HRESULT WINAPI IMAPTransportCF_LockServer(IClassFactory *iface, BOOL fLock)
{
FIXME("(%d), stub!\n",fLock);
return S_OK;
Modified: trunk/reactos/dll/win32/inetcomm/inetcomm_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcom…
==============================================================================
--- trunk/reactos/dll/win32/inetcomm/inetcomm_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/inetcomm_main.c [iso-8859-1] Fri Sep 20 09:41:39
2013
@@ -62,10 +62,9 @@
MimeInternational_Construct(&international);
break;
case DLL_PROCESS_DETACH:
+ if (lpvReserved) break;
IMimeInternational_Release(international);
InternetTransport_UnregisterClass(hinstDLL);
- break;
- default:
break;
}
return TRUE;
Modified: trunk/reactos/dll/win32/inetcomm/mimeole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/mimeole…
==============================================================================
--- trunk/reactos/dll/win32/inetcomm/mimeole.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/mimeole.c [iso-8859-1] Fri Sep 20 09:41:39 2013
@@ -98,8 +98,8 @@
typedef struct MimeBody
{
- const IMimeBodyVtbl *lpVtbl;
- LONG refs;
+ IMimeBody IMimeBody_iface;
+ LONG ref;
HBODY handle;
@@ -114,9 +114,9 @@
BODYOFFSETS body_offsets;
} MimeBody;
-static inline MimeBody *impl_from_IMimeBody( IMimeBody *iface )
-{
- return (MimeBody *)((char*)iface - FIELD_OFFSET(MimeBody, lpVtbl));
+static inline MimeBody *impl_from_IMimeBody(IMimeBody *iface)
+{
+ return CONTAINING_RECORD(iface, MimeBody, IMimeBody_iface);
}
static LPSTR strdupA(LPCSTR str)
@@ -527,22 +527,24 @@
return E_NOINTERFACE;
}
-static ULONG WINAPI MimeBody_AddRef(IMimeBody* iface)
+static ULONG WINAPI MimeBody_AddRef(IMimeBody *iface)
{
MimeBody *This = impl_from_IMimeBody(iface);
- TRACE("(%p)->()\n", iface);
- return InterlockedIncrement(&This->refs);
-}
-
-static ULONG WINAPI MimeBody_Release(IMimeBody* iface)
+ LONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI MimeBody_Release(IMimeBody *iface)
{
MimeBody *This = impl_from_IMimeBody(iface);
- ULONG refs;
-
- TRACE("(%p)->()\n", iface);
-
- refs = InterlockedDecrement(&This->refs);
- if (!refs)
+ LONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ if (!ref)
{
empty_header_list(&This->headers);
empty_new_prop_list(&This->new_props);
@@ -555,7 +557,7 @@
HeapFree(GetProcessHeap(), 0, This);
}
- return refs;
+ return ref;
}
static HRESULT WINAPI MimeBody_GetClassID(
@@ -574,19 +576,14 @@
return E_NOTIMPL;
}
-static HRESULT WINAPI MimeBody_Load(
- IMimeBody* iface,
- LPSTREAM pStm)
+static HRESULT WINAPI MimeBody_Load(IMimeBody *iface, IStream *pStm)
{
MimeBody *This = impl_from_IMimeBody(iface);
TRACE("(%p)->(%p)\n", iface, pStm);
return parse_headers(This, pStm);
}
-static HRESULT WINAPI MimeBody_Save(
- IMimeBody* iface,
- LPSTREAM pStm,
- BOOL fClearDirty)
+static HRESULT WINAPI MimeBody_Save(IMimeBody *iface, IStream *pStm, BOOL fClearDirty)
{
FIXME("stub\n");
return E_NOTIMPL;
@@ -1101,20 +1098,17 @@
#define FIRST_CUSTOM_PROP_ID 0x100
-HRESULT MimeBody_create(IUnknown *outer, void **obj)
+static MimeBody *mimebody_create(void)
{
MimeBody *This;
BODYOFFSETS body_offsets;
- *obj = NULL;
-
- if(outer) return CLASS_E_NOAGGREGATION;
-
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
- if (!This) return E_OUTOFMEMORY;
-
- This->lpVtbl = &body_vtbl;
- This->refs = 1;
+ if (!This)
+ return NULL;
+
+ This->IMimeBody_iface.lpVtbl = &body_vtbl;
+ This->ref = 1;
This->handle = NULL;
list_init(&This->headers);
list_init(&This->new_props);
@@ -1129,68 +1123,84 @@
body_offsets.cbBodyStart = body_offsets.cbBodyEnd = 0;
MimeBody_set_offsets(This, &body_offsets);
- *obj = &This->lpVtbl;
- return S_OK;
-}
+ return This;
+}
+
+HRESULT MimeBody_create(IUnknown *outer, void **ppv)
+{
+ MimeBody *mb;
+
+ if(outer)
+ return CLASS_E_NOAGGREGATION;
+
+ if ((mb = mimebody_create()))
+ {
+ *ppv = &mb->IMimeBody_iface;
+ return S_OK;
+ }
+ else
+ {
+ *ppv = NULL;
+ return E_OUTOFMEMORY;
+ }
+}
+
+
typedef struct
{
- IStreamVtbl *lpVtbl;
- LONG refs;
-
+ IStream IStream_iface;
+ LONG ref;
IStream *base;
ULARGE_INTEGER pos, start, length;
} sub_stream_t;
-static inline sub_stream_t *impl_from_IStream( IStream *iface )
-{
- return (sub_stream_t *)((char*)iface - FIELD_OFFSET(sub_stream_t, lpVtbl));
-}
-
-static HRESULT WINAPI sub_stream_QueryInterface(
- IStream* iface,
- REFIID riid,
- void **ppvObject)
+static inline sub_stream_t *impl_from_IStream(IStream *iface)
+{
+ return CONTAINING_RECORD(iface, sub_stream_t, IStream_iface);
+}
+
+static HRESULT WINAPI sub_stream_QueryInterface(IStream *iface, REFIID riid, void **ppv)
{
sub_stream_t *This = impl_from_IStream(iface);
- TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject);
- *ppvObject = NULL;
+ TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
+ *ppv = NULL;
if(IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_ISequentialStream) ||
IsEqualIID(riid, &IID_IStream))
{
IStream_AddRef(iface);
- *ppvObject = iface;
+ *ppv = iface;
return S_OK;
}
return E_NOINTERFACE;
}
-static ULONG WINAPI sub_stream_AddRef(
- IStream* iface)
+static ULONG WINAPI sub_stream_AddRef(IStream *iface)
{
sub_stream_t *This = impl_from_IStream(iface);
-
- TRACE("(%p)\n", This);
- return InterlockedIncrement(&This->refs);
-}
-
-static ULONG WINAPI sub_stream_Release(
- IStream* iface)
+ LONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI sub_stream_Release(IStream *iface)
{
sub_stream_t *This = impl_from_IStream(iface);
- LONG refs;
-
- TRACE("(%p)\n", This);
- refs = InterlockedDecrement(&This->refs);
- if(!refs)
+ LONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ if(!ref)
{
IStream_Release(This->base);
HeapFree(GetProcessHeap(), 0, This);
}
- return refs;
+ return ref;
}
static HRESULT WINAPI sub_stream_Read(
@@ -1407,15 +1417,15 @@
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
if(!This) return E_OUTOFMEMORY;
- This->lpVtbl = &sub_stream_vtbl;
- This->refs = 1;
+ This->IStream_iface.lpVtbl = &sub_stream_vtbl;
+ This->ref = 1;
This->start = start;
This->length = length;
This->pos.QuadPart = 0;
IStream_AddRef(stream);
This->base = stream;
- *out = (IStream*)&This->lpVtbl;
+ *out = &This->IStream_iface;
return S_OK;
}
@@ -1424,7 +1434,7 @@
{
struct list entry;
DWORD index;
- IMimeBody *mime_body;
+ MimeBody *mime_body;
struct body_t *parent;
struct list children;
@@ -1432,14 +1442,18 @@
typedef struct MimeMessage
{
- const IMimeMessageVtbl *lpVtbl;
-
- LONG refs;
+ IMimeMessage IMimeMessage_iface;
+ LONG ref;
IStream *stream;
struct list body_tree;
DWORD next_index;
} MimeMessage;
+
+static inline MimeMessage *impl_from_IMimeMessage(IMimeMessage *iface)
+{
+ return CONTAINING_RECORD(iface, MimeMessage, IMimeMessage_iface);
+}
static HRESULT WINAPI MimeMessage_QueryInterface(IMimeMessage *iface, REFIID riid, void
**ppv)
{
@@ -1452,7 +1466,7 @@
IsEqualIID(riid, &IID_IMimeMessage))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ IMimeMessage_AddRef(iface);
return S_OK;
}
@@ -1463,9 +1477,12 @@
static ULONG WINAPI MimeMessage_AddRef(IMimeMessage *iface)
{
- MimeMessage *This = (MimeMessage *)iface;
- TRACE("(%p)->()\n", iface);
- return InterlockedIncrement(&This->refs);
+ MimeMessage *This = impl_from_IMimeMessage(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ return ref;
}
static void empty_body_list(struct list *list)
@@ -1475,20 +1492,19 @@
{
empty_body_list(&body->children);
list_remove(&body->entry);
- IMimeBody_Release(body->mime_body);
+ IMimeBody_Release(&body->mime_body->IMimeBody_iface);
HeapFree(GetProcessHeap(), 0, body);
}
}
static ULONG WINAPI MimeMessage_Release(IMimeMessage *iface)
{
- MimeMessage *This = (MimeMessage *)iface;
- ULONG refs;
-
- TRACE("(%p)->()\n", iface);
-
- refs = InterlockedDecrement(&This->refs);
- if (!refs)
+ MimeMessage *This = impl_from_IMimeMessage(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ if (!ref)
{
empty_body_list(&This->body_tree);
@@ -1496,7 +1512,7 @@
HeapFree(GetProcessHeap(), 0, This);
}
- return refs;
+ return ref;
}
/*** IPersist methods ***/
@@ -1516,7 +1532,7 @@
return E_NOTIMPL;
}
-static body_t *new_body_entry(IMimeBody *mime_body, DWORD index, body_t *parent)
+static body_t *new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent)
{
body_t *body = HeapAlloc(GetProcessHeap(), 0, sizeof(*body));
if(body)
@@ -1621,28 +1637,29 @@
static body_t *create_sub_body(MimeMessage *msg, IStream *pStm, BODYOFFSETS *offset,
body_t *parent)
{
- IMimeBody *mime_body;
+ MimeBody *mime_body;
HRESULT hr;
body_t *body;
ULARGE_INTEGER cur;
LARGE_INTEGER zero;
- MimeBody_create(NULL, (void**)&mime_body);
- IMimeBody_Load(mime_body, pStm);
+ mime_body = mimebody_create();
+ IMimeBody_Load(&mime_body->IMimeBody_iface, pStm);
zero.QuadPart = 0;
hr = IStream_Seek(pStm, zero, STREAM_SEEK_CUR, &cur);
offset->cbBodyStart = cur.u.LowPart + offset->cbHeaderStart;
- if(parent) MimeBody_set_offsets(impl_from_IMimeBody(mime_body), offset);
- IMimeBody_SetData(mime_body, IET_BINARY, NULL, NULL, &IID_IStream, pStm);
+ if (parent) MimeBody_set_offsets(mime_body, offset);
+ IMimeBody_SetData(&mime_body->IMimeBody_iface, IET_BINARY, NULL, NULL,
&IID_IStream, pStm);
body = new_body_entry(mime_body, msg->next_index++, parent);
- if(IMimeBody_IsContentType(mime_body, "multipart", NULL) == S_OK)
+ if(IMimeBody_IsContentType(&mime_body->IMimeBody_iface, "multipart",
NULL) == S_OK)
{
MIMEPARAMINFO *param_info;
ULONG count, i;
IMimeAllocator *alloc;
- hr = IMimeBody_GetParameters(mime_body, "Content-Type", &count,
¶m_info);
+ hr = IMimeBody_GetParameters(&mime_body->IMimeBody_iface,
"Content-Type", &count,
+ ¶m_info);
if(hr != S_OK || count == 0) return body;
MimeOleGetAllocator(&alloc);
@@ -1678,11 +1695,9 @@
return body;
}
-static HRESULT WINAPI MimeMessage_Load(
- IMimeMessage *iface,
- LPSTREAM pStm)
-{
- MimeMessage *This = (MimeMessage *)iface;
+static HRESULT WINAPI MimeMessage_Load(IMimeMessage *iface, IStream *pStm)
+{
+ MimeMessage *This = impl_from_IMimeMessage(iface);
body_t *root_body;
BODYOFFSETS offsets;
ULARGE_INTEGER cur;
@@ -1706,17 +1721,14 @@
zero.QuadPart = 0;
IStream_Seek(pStm, zero, STREAM_SEEK_END, &cur);
offsets.cbBodyEnd = cur.u.LowPart;
- MimeBody_set_offsets(impl_from_IMimeBody(root_body->mime_body), &offsets);
+ MimeBody_set_offsets(root_body->mime_body, &offsets);
list_add_head(&This->body_tree, &root_body->entry);
return S_OK;
}
-static HRESULT WINAPI MimeMessage_Save(
- IMimeMessage *iface,
- LPSTREAM pStm,
- BOOL fClearDirty)
+static HRESULT WINAPI MimeMessage_Save(IMimeMessage *iface, IStream *pStm, BOOL
fClearDirty)
{
FIXME("(%p)->(%p, %s)\n", iface, pStm, fClearDirty ? "TRUE" :
"FALSE");
return E_NOTIMPL;
@@ -1738,12 +1750,11 @@
}
/*** IMimeMessageTree methods ***/
-static HRESULT WINAPI MimeMessage_GetMessageSource(
- IMimeMessage *iface,
- IStream **ppStream,
- DWORD dwFlags)
-{
- MimeMessage *This = (MimeMessage *)iface;
+static HRESULT WINAPI MimeMessage_GetMessageSource(IMimeMessage *iface, IStream
**ppStream,
+ DWORD dwFlags)
+{
+ MimeMessage *This = impl_from_IMimeMessage(iface);
+
FIXME("(%p)->(%p, 0x%x)\n", iface, ppStream, dwFlags);
IStream_AddRef(This->stream);
@@ -1826,13 +1837,10 @@
return S_FALSE;
}
-static HRESULT WINAPI MimeMessage_BindToObject(
- IMimeMessage *iface,
- const HBODY hBody,
- REFIID riid,
- void **ppvObject)
-{
- MimeMessage *This = (MimeMessage *)iface;
+static HRESULT WINAPI MimeMessage_BindToObject(IMimeMessage *iface, const HBODY hBody,
REFIID riid,
+ void **ppvObject)
+{
+ MimeMessage *This = impl_from_IMimeMessage(iface);
HRESULT hr;
body_t *body;
@@ -1844,8 +1852,8 @@
if(IsEqualIID(riid, &IID_IMimeBody))
{
- IMimeBody_AddRef(body->mime_body);
- *ppvObject = body->mime_body;
+ IMimeBody_AddRef(&body->mime_body->IMimeBody_iface);
+ *ppvObject = &body->mime_body->IMimeBody_iface;
return S_OK;
}
@@ -1937,13 +1945,10 @@
return E_NOTIMPL;
}
-static HRESULT WINAPI MimeMessage_GetBody(
- IMimeMessage *iface,
- BODYLOCATION location,
- HBODY hPivot,
- LPHBODY phBody)
-{
- MimeMessage *This = (MimeMessage *)iface;
+static HRESULT WINAPI MimeMessage_GetBody(IMimeMessage *iface, BODYLOCATION location,
HBODY hPivot,
+ HBODY *phBody)
+{
+ MimeMessage *This = impl_from_IMimeMessage(iface);
body_t *body;
HRESULT hr;
@@ -1985,14 +1990,11 @@
}
}
-static HRESULT WINAPI MimeMessage_CountBodies(
- IMimeMessage *iface,
- HBODY hParent,
- boolean fRecurse,
- ULONG *pcBodies)
+static HRESULT WINAPI MimeMessage_CountBodies(IMimeMessage *iface, HBODY hParent, boolean
fRecurse,
+ ULONG *pcBodies)
{
HRESULT hr;
- MimeMessage *This = (MimeMessage *)iface;
+ MimeMessage *This = impl_from_IMimeMessage(iface);
body_t *body;
TRACE("(%p)->(%p, %s, %p)\n", iface, hParent, fRecurse ?
"TRUE" : "FALSE", pcBodies);
@@ -2006,9 +2008,8 @@
return S_OK;
}
-static HRESULT find_next(IMimeMessage *msg, body_t *body, LPFINDBODY find, HBODY *out)
-{
- MimeMessage *This = (MimeMessage *)msg;
+static HRESULT find_next(MimeMessage *This, body_t *body, FINDBODY *find, HBODY *out)
+{
struct list *ptr;
HBODY next;
@@ -2028,7 +2029,8 @@
body = LIST_ENTRY( ptr, body_t, entry );
next = UlongToHandle( body->index );
find->dwReserved = body->index;
- if (IMimeBody_IsContentType(body->mime_body, find->pszPriType,
find->pszSubType) == S_OK)
+ if (IMimeBody_IsContentType(&body->mime_body->IMimeBody_iface,
find->pszPriType,
+ find->pszSubType) == S_OK)
{
*out = next;
return S_OK;
@@ -2037,23 +2039,19 @@
return MIME_E_NOT_FOUND;
}
-static HRESULT WINAPI MimeMessage_FindFirst(
- IMimeMessage *iface,
- LPFINDBODY pFindBody,
- LPHBODY phBody)
-{
+static HRESULT WINAPI MimeMessage_FindFirst(IMimeMessage *iface, FINDBODY *pFindBody,
HBODY *phBody)
+{
+ MimeMessage *This = impl_from_IMimeMessage(iface);
+
TRACE("(%p)->(%p, %p)\n", iface, pFindBody, phBody);
pFindBody->dwReserved = 0;
- return find_next( iface, NULL, pFindBody, phBody );
-}
-
-static HRESULT WINAPI MimeMessage_FindNext(
- IMimeMessage *iface,
- LPFINDBODY pFindBody,
- LPHBODY phBody)
-{
- MimeMessage *This = (MimeMessage *)iface;
+ return find_next(This, NULL, pFindBody, phBody);
+}
+
+static HRESULT WINAPI MimeMessage_FindNext(IMimeMessage *iface, FINDBODY *pFindBody,
HBODY *phBody)
+{
+ MimeMessage *This = impl_from_IMimeMessage(iface);
body_t *body;
HRESULT hr;
@@ -2061,7 +2059,7 @@
hr = find_body( &This->body_tree, UlongToHandle( pFindBody->dwReserved ),
&body );
if (hr != S_OK) return MIME_E_NOT_FOUND;
- return find_next( iface, body, pFindBody, phBody );
+ return find_next(This, body, pFindBody, phBody);
}
static HRESULT WINAPI MimeMessage_ResolveURL(
@@ -2565,13 +2563,13 @@
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
if (!This) return E_OUTOFMEMORY;
- This->lpVtbl = &MimeMessageVtbl;
- This->refs = 1;
+ This->IMimeMessage_iface.lpVtbl = &MimeMessageVtbl;
+ This->ref = 1;
This->stream = NULL;
list_init(&This->body_tree);
This->next_index = 1;
- *obj = &This->lpVtbl;
+ *obj = &This->IMimeMessage_iface;
return S_OK;
}
@@ -2607,54 +2605,53 @@
typedef struct MimeSecurity
{
- const IMimeSecurityVtbl *lpVtbl;
-
- LONG refs;
+ IMimeSecurity IMimeSecurity_iface;
+ LONG ref;
} MimeSecurity;
-static HRESULT WINAPI MimeSecurity_QueryInterface(
- IMimeSecurity* iface,
- REFIID riid,
- void** obj)
-{
- TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), obj);
+static inline MimeSecurity *impl_from_IMimeSecurity(IMimeSecurity *iface)
+{
+ return CONTAINING_RECORD(iface, MimeSecurity, IMimeSecurity_iface);
+}
+
+static HRESULT WINAPI MimeSecurity_QueryInterface(IMimeSecurity *iface, REFIID riid, void
**ppv)
+{
+ TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IMimeSecurity))
{
- *obj = iface;
- IUnknown_AddRef(iface);
+ *ppv = iface;
+ IMimeSecurity_AddRef(iface);
return S_OK;
}
FIXME("no interface for %s\n", debugstr_guid(riid));
- *obj = NULL;
+ *ppv = NULL;
return E_NOINTERFACE;
}
-static ULONG WINAPI MimeSecurity_AddRef(
- IMimeSecurity* iface)
-{
- MimeSecurity *This = (MimeSecurity *)iface;
- TRACE("(%p)->()\n", iface);
- return InterlockedIncrement(&This->refs);
-}
-
-static ULONG WINAPI MimeSecurity_Release(
- IMimeSecurity* iface)
-{
- MimeSecurity *This = (MimeSecurity *)iface;
- ULONG refs;
-
- TRACE("(%p)->()\n", iface);
-
- refs = InterlockedDecrement(&This->refs);
- if (!refs)
- {
+static ULONG WINAPI MimeSecurity_AddRef(IMimeSecurity *iface)
+{
+ MimeSecurity *This = impl_from_IMimeSecurity(iface);
+ LONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI MimeSecurity_Release(IMimeSecurity *iface)
+{
+ MimeSecurity *This = impl_from_IMimeSecurity(iface);
+ LONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ if (!ref)
HeapFree(GetProcessHeap(), 0, This);
- }
-
- return refs;
+
+ return ref;
}
static HRESULT WINAPI MimeSecurity_InitNew(
@@ -2779,10 +2776,10 @@
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
if (!This) return E_OUTOFMEMORY;
- This->lpVtbl = &MimeSecurityVtbl;
- This->refs = 1;
-
- *obj = &This->lpVtbl;
+ This->IMimeSecurity_iface.lpVtbl = &MimeSecurityVtbl;
+ This->ref = 1;
+
+ *obj = &This->IMimeSecurity_iface;
return S_OK;
}
@@ -2794,11 +2791,6 @@
return MimeSecurity_create(NULL, (void **)ppSecurity);
}
-typedef struct
-{
- IMimeAllocatorVtbl *lpVtbl;
-} MimeAllocator;
-
static HRESULT WINAPI MimeAlloc_QueryInterface(
IMimeAllocator* iface,
REFIID riid,
@@ -2811,7 +2803,7 @@
IsEqualIID(riid, &IID_IMimeAllocator))
{
*obj = iface;
- IUnknown_AddRef(iface);
+ IMimeAllocator_AddRef(iface);
return S_OK;
}
@@ -2980,7 +2972,7 @@
MimeAlloc_PropVariantClear
};
-static MimeAllocator mime_allocator =
+static IMimeAllocator mime_allocator =
{
&mime_alloc_vtbl
};
Modified: trunk/reactos/dll/win32/inetcomm/pop3transport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/pop3tra…
==============================================================================
--- trunk/reactos/dll/win32/inetcomm/pop3transport.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/pop3transport.c [iso-8859-1] Fri Sep 20 09:41:39
2013
@@ -315,11 +315,10 @@
}
}
-static void init_parser(POP3Transport *This, POP3COMMAND command, POP3CMDTYPE type)
+static void init_parser(POP3Transport *This, POP3COMMAND command)
{
This->state = STATE_NONE;
This->command = command;
- This->type = type;
}
static HRESULT POP3Transport_ParseResponse(POP3Transport *This, char *pszResponse,
POP3RESPONSE *pResponse)
@@ -663,7 +662,7 @@
strcat(command, This->InetTransport.ServerInfo.szPassword);
strcat(command, "\r\n");
- init_parser(This, POP3_PASS, POP3_NONE);
+ init_parser(This, POP3_PASS);
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvPASSResp);
HeapFree(GetProcessHeap(), 0, command);
@@ -733,7 +732,7 @@
IsEqualIID(riid, &IID_IPOP3Transport))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ IPOP3Transport_AddRef(iface);
return S_OK;
}
*ppv = NULL;
@@ -804,7 +803,7 @@
if (FAILED(hr))
return hr;
- init_parser(This, POP3_USER, POP3_NONE);
+ init_parser(This, POP3_USER);
return InternetTransport_ReadLine(&This->InetTransport,
POP3Transport_CallbackSendUSERCmd);
}
@@ -889,7 +888,7 @@
strcat(command, username);
strcat(command, "\r\n");
- init_parser(This, POP3_USER, POP3_NONE);
+ init_parser(This, POP3_USER);
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvUSERResp);
HeapFree(GetProcessHeap(), 0, command);
@@ -912,7 +911,7 @@
strcat(command, password);
strcat(command, "\r\n");
- init_parser(This, POP3_PASS, POP3_NONE);
+ init_parser(This, POP3_PASS);
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvPASSResp);
HeapFree(GetProcessHeap(), 0, command);
@@ -938,7 +937,8 @@
}
else command = list_all;
- init_parser(This, POP3_LIST, cmdtype);
+ init_parser(This, POP3_LIST);
+ This->type = cmdtype;
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvLISTResp);
if (dwPopId) HeapFree(GetProcessHeap(), 0, command);
@@ -960,7 +960,8 @@
sprintf(command, top, dwPopId, cPreviewLines);
This->preview_lines = cPreviewLines;
- init_parser(This, POP3_TOP, cmdtype);
+ init_parser(This, POP3_TOP);
+ This->type = cmdtype;
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvTOPResp);
HeapFree(GetProcessHeap(), 0, command);
@@ -976,7 +977,7 @@
InternetTransport_ChangeStatus(&This->InetTransport, IXP_DISCONNECTING);
- init_parser(This, POP3_QUIT, POP3_NONE);
+ init_parser(This, POP3_QUIT);
return InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvQUITResp);
}
@@ -987,7 +988,7 @@
TRACE("\n");
- init_parser(This, POP3_STAT, POP3_NONE);
+ init_parser(This, POP3_STAT);
InternetTransport_DoCommand(&This->InetTransport, stat,
POP3Transport_CallbackRecvSTATResp);
return S_OK;
}
@@ -999,7 +1000,7 @@
TRACE("\n");
- init_parser(This, POP3_NOOP, POP3_NONE);
+ init_parser(This, POP3_NOOP);
InternetTransport_DoCommand(&This->InetTransport, noop,
POP3Transport_CallbackRecvNOOPResp);
return S_OK;
}
@@ -1011,7 +1012,7 @@
TRACE("\n");
- init_parser(This, POP3_RSET, POP3_NONE);
+ init_parser(This, POP3_RSET);
InternetTransport_DoCommand(&This->InetTransport, rset,
POP3Transport_CallbackRecvRSETResp);
return S_OK;
}
@@ -1035,7 +1036,8 @@
}
else command = uidl_all;
- init_parser(This, POP3_UIDL, cmdtype);
+ init_parser(This, POP3_UIDL);
+ This->type = cmdtype;
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvUIDLResp);
if (dwPopId) HeapFree(GetProcessHeap(), 0, command);
@@ -1056,7 +1058,8 @@
if (!(command = HeapAlloc(GetProcessHeap(), 0, len))) return S_FALSE;
sprintf(command, dele, dwPopId);
- init_parser(This, POP3_DELE, cmdtype);
+ init_parser(This, POP3_DELE);
+ This->type = cmdtype;
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvDELEResp);
HeapFree(GetProcessHeap(), 0, command);
@@ -1077,7 +1080,8 @@
if (!(command = HeapAlloc(GetProcessHeap(), 0, len))) return S_FALSE;
sprintf(command, retr, dwPopId);
- init_parser(This, POP3_RETR, cmdtype);
+ init_parser(This, POP3_RETR);
+ This->type = cmdtype;
InternetTransport_DoCommand(&This->InetTransport, command,
POP3Transport_CallbackRecvRETRResp);
HeapFree(GetProcessHeap(), 0, command);
@@ -1143,7 +1147,7 @@
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ IClassFactory_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
Modified: trunk/reactos/dll/win32/inetcomm/smtptransport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/smtptra…
==============================================================================
--- trunk/reactos/dll/win32/inetcomm/smtptransport.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/smtptransport.c [iso-8859-1] Fri Sep 20 09:41:39
2013
@@ -536,7 +536,7 @@
IsEqualIID(riid, &IID_ISMTPTransport2))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ ISMTPTransport2_AddRef(iface);
return S_OK;
}
*ppv = NULL;
@@ -993,7 +993,7 @@
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory))
{
*ppv = iface;
- IUnknown_AddRef(iface);
+ IClassFactory_AddRef(iface);
return S_OK;
}
return E_NOINTERFACE;
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Sep 20 09:41:39 2013
@@ -84,7 +84,7 @@
reactos/dll/win32/imaadp32.acm # Synced to Wine-1.7.1
reactos/dll/win32/imagehlp # Synced to Wine-1.7.1
reactos/dll/win32/imm32 # Synced to Wine-1.5.19
-reactos/dll/win32/inetcomm # Synced to Wine-1.5.4
+reactos/dll/win32/inetcomm # Synced to Wine-1.7.1
reactos/dll/win32/inetmib1 # Synced to Wine-1.5.4
reactos/dll/win32/initpki # Synced to Wine-1.5.19
reactos/dll/win32/inseng # Synced to Wine-1.5.4