Huw Davies : inetcomm: Stub IMime{Message, Body}_GetCharset to return a NULL charset.

Alexandre Julliard julliard at winehq.org
Wed Feb 13 10:40:07 CST 2008


Module: wine
Branch: master
Commit: 43958866a300183d8b93aee1871ad214c85eaee4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=43958866a300183d8b93aee1871ad214c85eaee4

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Feb 12 14:20:37 2008 +0000

inetcomm: Stub IMime{Message, Body}_GetCharset to return a NULL charset.

---

 dlls/inetcomm/mimeole.c       |    6 ++++--
 dlls/inetcomm/tests/mimeole.c |   10 ++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c
index 6f24f69..98f04c8 100644
--- a/dlls/inetcomm/mimeole.c
+++ b/dlls/inetcomm/mimeole.c
@@ -715,7 +715,8 @@ static HRESULT WINAPI MimeBody_GetCharset(
                                  LPHCHARSET phCharset)
 {
     FIXME("stub\n");
-    return E_NOTIMPL;
+    *phCharset = NULL;
+    return S_OK;
 }
 
 static HRESULT WINAPI MimeBody_SetCharset(
@@ -2023,7 +2024,8 @@ static HRESULT WINAPI MimeMessage_GetCharset(
     LPHCHARSET phCharset)
 {
     FIXME("(%p)->(%p)\n", iface, phCharset);
-    return E_NOTIMPL;
+    *phCharset = NULL;
+    return S_OK;
 }
 
 static HRESULT WINAPI MimeMessage_SetCharset(
diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c
index d268e9d..1c82a2a 100644
--- a/dlls/inetcomm/tests/mimeole.c
+++ b/dlls/inetcomm/tests/mimeole.c
@@ -215,6 +215,7 @@ static void test_CreateMessage(void)
     BODYOFFSETS offsets;
     ULONG count;
     FINDBODY find_struct;
+    HCHARSET hcs;
     char text[] = "text";
     HBODY *body_list;
     PROPVARIANT prop;
@@ -268,6 +269,11 @@ static void test_CreateMessage(void)
     ok(offsets.cbHeaderStart == 428, "got %d\n", offsets.cbHeaderStart);
     ok(offsets.cbBodyStart == 518, "got %d\n", offsets.cbBodyStart);
     ok(offsets.cbBodyEnd == 523, "got %d\n", offsets.cbBodyEnd);
+
+    hr = IMimeBody_GetCharset(body, &hcs);
+    ok(hr == S_OK, "ret %08x\n", hr);
+    ok(hcs == NULL, "ret %p\n", hcs);
+
     IMimeBody_Release(body);
 
     hr = IMimeMessage_GetBody(msg, IBL_NEXT, hbody, &hbody);
@@ -299,6 +305,10 @@ static void test_CreateMessage(void)
     ok(count == 2, "got %d\n", count);
     CoTaskMemFree(body_list);
 
+    hr = IMimeMessage_GetCharset(body, &hcs);
+    ok(hr == S_OK, "ret %08x\n", hr);
+    ok(hcs == NULL, "ret %p\n", hcs);
+
     IMimeMessage_Release(msg);
 
     ref = IStream_AddRef(stream);




More information about the wine-cvs mailing list