Nikolay Sivov : inetcomm: Implemented IMimeBody::GetClassID().

Alexandre Julliard julliard at winehq.org
Tue Jun 6 15:23:26 CDT 2017


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Jun  6 08:47:25 2017 +0300

inetcomm: Implemented IMimeBody::GetClassID().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/inetcomm/mimeole.c       | 11 ++++++++---
 dlls/inetcomm/tests/mimeole.c |  8 ++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/dlls/inetcomm/mimeole.c b/dlls/inetcomm/mimeole.c
index e27c5c6..f0e186c 100644
--- a/dlls/inetcomm/mimeole.c
+++ b/dlls/inetcomm/mimeole.c
@@ -971,10 +971,15 @@ static HRESULT WINAPI MimeBody_GetClassID(
                                  CLSID* pClassID)
 {
     MimeBody *This = impl_from_IMimeBody(iface);
-    FIXME("(%p)->(%p) stub\n", This, pClassID);
-    return E_NOTIMPL;
-}
 
+    TRACE("(%p)->(%p)\n", This, pClassID);
+
+    if(!pClassID)
+        return E_INVALIDARG;
+
+    *pClassID = IID_IMimeBody;
+    return S_OK;
+}
 
 static HRESULT WINAPI MimeBody_IsDirty(
                               IMimeBody* iface)
diff --git a/dlls/inetcomm/tests/mimeole.c b/dlls/inetcomm/tests/mimeole.c
index 13b7aba..4915f99 100644
--- a/dlls/inetcomm/tests/mimeole.c
+++ b/dlls/inetcomm/tests/mimeole.c
@@ -197,10 +197,18 @@ static void test_CreateBody(void)
     MIMEPARAMINFO *param_info;
     IMimeAllocator *alloc;
     BODYOFFSETS offsets;
+    CLSID clsid;
 
     hr = CoCreateInstance(&CLSID_IMimeBody, NULL, CLSCTX_INPROC_SERVER, &IID_IMimeBody, (void**)&body);
     ok(hr == S_OK, "ret %08x\n", hr);
 
+    hr = IMimeBody_GetClassID(body, NULL);
+    ok(hr == E_INVALIDARG, "ret %08x\n", hr);
+
+    hr = IMimeBody_GetClassID(body, &clsid);
+    ok(hr == S_OK, "ret %08x\n", hr);
+    ok(IsEqualGUID(&clsid, &IID_IMimeBody), "got %s\n", wine_dbgstr_guid(&clsid));
+
     hr = IMimeBody_GetHandle(body, &handle);
     ok(hr == MIME_E_NO_DATA, "ret %08x\n", hr);
     ok(handle == NULL, "handle %p\n", handle);




More information about the wine-cvs mailing list