Piotr Caban : oleaut32: Improve ICreateTypeInfo2 AddImplType implementation .
Alexandre Julliard
julliard at winehq.org
Thu Mar 18 11:19:29 CDT 2010
Module: wine
Branch: master
Commit: 15956152e559d8db116eb9e4f14679d1c84853c3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=15956152e559d8db116eb9e4f14679d1c84853c3
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Mar 17 22:05:53 2010 +0100
oleaut32: Improve ICreateTypeInfo2 AddImplType implementation.
---
dlls/oleaut32/typelib2.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c
index a6e12cd..71d725c 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -1853,6 +1853,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddImplType(
ref->flags = 0;
ref->oCustData = -1;
ref->onext = -1;
+ This->typeinfo->cImplTypes++;
} else if (This->typekind == TKIND_INTERFACE) {
if (This->typeinfo->cImplTypes && index==1)
return TYPE_E_BADMODULEKIND;
@@ -1860,14 +1861,18 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddImplType(
if( index != 0) return TYPE_E_ELEMENTNOTFOUND;
This->typeinfo->datatype1 = hRefType;
+ This->typeinfo->cImplTypes = 1;
} else if (This->typekind == TKIND_DISPATCH) {
- FIXME("dispatch case unhandled.\n");
+ if(index != 0) return TYPE_E_ELEMENTNOTFOUND;
+
+ /* FIXME: Check if referenced typeinfo is IDispatch */
+ This->typeinfo->flags |= TYPEFLAG_FDISPATCHABLE;
+ This->typeinfo->cImplTypes = 1;
} else {
FIXME("AddImplType unsupported on typekind %d\n", This->typekind);
return E_OUTOFMEMORY;
}
- This->typeinfo->cImplTypes++;
return S_OK;
}
More information about the wine-cvs
mailing list