From 43958866a300183d8b93aee1871ad214c85eaee4 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 12 Feb 2008 14:20:37 +0000 Subject: [PATCH] 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 6f24f6919be..98f04c8c09a 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 d268e9d0505..1c82a2aa5fe 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);