oleaut32: Improve ITypeInfo2 GetRefTypeOfImplType implementation.

This commit is contained in:
Piotr Caban 2010-03-17 22:06:11 +01:00 committed by Alexandre Julliard
parent 15956152e5
commit 926d3a88e7
1 changed files with 6 additions and 5 deletions

View File

@ -3016,17 +3016,18 @@ static HRESULT WINAPI ITypeInfo2_fnGetRefTypeOfImplType(
if(!pRefType) if(!pRefType)
return E_INVALIDARG; return E_INVALIDARG;
if(index == -1) { if(This->typeinfo->flags&TYPEFLAG_FDUAL) {
if((This->typeinfo->typekind&0xf)==TKIND_DISPATCH if(index == -1) {
&& (This->typeinfo->flags&TYPEFLAG_FDUAL)) {
*pRefType = -2; *pRefType = -2;
return S_OK; return S_OK;
} }
return TYPE_E_ELEMENTNOTFOUND; if(This->typekind == TKIND_DISPATCH)
return ITypeInfo2_GetRefTypeOfImplType((ITypeInfo2*)&This->dual->lpVtblTypeInfo2,
index, pRefType);
} }
if(index >= This->typeinfo->cImplTypes) if(index>=This->typeinfo->cImplTypes)
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
if(This->typekind == TKIND_INTERFACE) { if(This->typekind == TKIND_INTERFACE) {