Implement coercion to VT_UNKNOWN from VT_DISPATCH.

This commit is contained in:
Ove Kaaven 2001-10-04 16:14:24 +00:00 committed by Alexandre Julliard
parent 77f8e5fef2
commit 54c8fee942

View File

@ -1567,6 +1567,18 @@ static HRESULT Coerce( VARIANTARG* pd, LCID lcid, ULONG dwFlags, VARIANTARG* ps,
}
break;
case( VT_UNKNOWN ):
if (vtFrom == VT_DISPATCH)
{
res = IDispatch_QueryInterface(V_DISPATCH(ps), &IID_IUnknown, (LPVOID*)&V_UNKNOWN(pd));
}
else
{
res = DISP_E_TYPEMISMATCH;
FIXME("Coercion from %d to %d\n", vtFrom, vt );
}
break;
default:
res = DISP_E_TYPEMISMATCH;
FIXME("Coercion from %d to %d\n", vtFrom, vt );