Commit 664e7938 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

oleaut32: Improve TYPEDESC encoding for unknown VARTYPEs.

It's not worth printing a FIXME for every VARTYPE we don't happen to list in the switch statement.
parent b9292833
......@@ -9142,41 +9142,6 @@ static DWORD WMSFT_append_typedesc(TYPEDESC *desc, WMSFT_TLBFile *file, DWORD *o
out_size = &junk2;
vt = desc->vt & VT_TYPEMASK;
switch(vt){
case VT_INT:
subtype = VT_I4;
break;
case VT_UINT:
subtype = VT_UI4;
break;
case VT_VOID:
subtype = VT_EMPTY;
break;
default:
subtype = vt;
break;
}
switch(vt){
case VT_INT:
case VT_UINT:
case VT_I1:
case VT_UI1:
case VT_I2:
case VT_UI2:
case VT_I4:
case VT_UI4:
case VT_BOOL:
case VT_R4:
case VT_ERROR:
case VT_BSTR:
case VT_HRESULT:
case VT_CY:
case VT_VOID:
case VT_VARIANT:
*out_mix = subtype;
return 0x80000000 | (subtype << 16) | desc->vt;
}
if(vt == VT_PTR || vt == VT_SAFEARRAY){
DWORD mix;
......@@ -9193,9 +9158,25 @@ static DWORD WMSFT_append_typedesc(TYPEDESC *desc, WMSFT_TLBFile *file, DWORD *o
encoded[1] = desc->u.hreftype;
*out_mix = 0x7FFF; /* FIXME: Should get TYPEKIND of the hreftype, e.g. TKIND_ENUM => VT_I4 */
}else{
FIXME("Don't know what to do! VT: 0x%x\n", desc->vt);
*out_mix = desc->vt;
return 0x80000000 | (desc->vt << 16) | desc->vt;
TRACE("Mixing in-place, VT: 0x%x\n", desc->vt);
switch(vt){
case VT_INT:
subtype = VT_I4;
break;
case VT_UINT:
subtype = VT_UI4;
break;
case VT_VOID:
subtype = VT_EMPTY;
break;
default:
subtype = vt;
break;
}
*out_mix = subtype;
return 0x80000000 | (subtype << 16) | desc->vt;
}
data = file->typdesc_seg.data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment