Piotr Caban : oleaut32: Add ICreateTypeLib2::SetCustData implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 28 10:06:45 CST 2016


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Jan 27 13:04:29 2016 +0100

oleaut32: Add ICreateTypeLib2::SetCustData implementation.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/typelib.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index af477d5..517e515 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -9984,7 +9984,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSaveAllChanges(ICreateTypeLib2 *iface)
     else
         file.header.NameOffset = -1;
 
-    file.header.CustomDataOffset = -1; /* TODO SetCustData not impl yet */
+    file.header.CustomDataOffset = WMSFT_compile_custdata(&This->custdata_list, &file);
 
     if(This->guid)
         file.header.posguid = This->guid->offset;
@@ -10134,8 +10134,16 @@ static HRESULT WINAPI ICreateTypeLib2_fnSetCustData(ICreateTypeLib2 *iface,
         REFGUID guid, VARIANT *varVal)
 {
     ITypeLibImpl *This = impl_from_ICreateTypeLib2(iface);
-    FIXME("%p %s %p - stub\n", This, debugstr_guid(guid), varVal);
-    return E_NOTIMPL;
+    TLBGuid *tlbguid;
+
+    TRACE("%p %s %p\n", This, debugstr_guid(guid), varVal);
+
+    if (!guid || !varVal)
+        return E_INVALIDARG;
+
+    tlbguid = TLB_append_guid(&This->guid_list, guid, -1);
+
+    return TLB_set_custdata(&This->custdata_list, tlbguid, varVal);
 }
 
 static HRESULT WINAPI ICreateTypeLib2_fnSetHelpStringContext(ICreateTypeLib2 *iface,




More information about the wine-cvs mailing list