Commit 26ffca49 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Reverted last VT_USERDEFINED patch (was broken).

Marshal TKIND_DISPATCH interfaces just like TKIND_INTERFACE.
parent 561a1a8d
...@@ -508,6 +508,7 @@ serialize_param( ...@@ -508,6 +508,7 @@ serialize_param(
} }
ITypeInfo_GetTypeAttr(tinfo2,&tattr); ITypeInfo_GetTypeAttr(tinfo2,&tattr);
switch (tattr->typekind) { switch (tattr->typekind) {
case TKIND_DISPATCH:
case TKIND_INTERFACE: case TKIND_INTERFACE:
if (writeit) if (writeit)
hres=_marshal_interface(buf,&(tattr->guid),(LPUNKNOWN)arg); hres=_marshal_interface(buf,&(tattr->guid),(LPUNKNOWN)arg);
...@@ -556,25 +557,11 @@ serialize_param( ...@@ -556,25 +557,11 @@ serialize_param(
if (debugout) MESSAGE("}"); if (debugout) MESSAGE("}");
break; break;
} }
default: { default:
TYPEDESC tdesc2; FIXME("Unhandled typekind %d\n",tattr->typekind);
hres = E_FAIL;
if (debugout) MESSAGE("U{");
memset(&tdesc2,0,sizeof(tdesc2));
tdesc2.vt = tattr->typekind;
hres = serialize_param(
tinfo2,
writeit,
debugout,
dealloc,
&tdesc2,
arg,
buf
);
if (debugout) MESSAGE("}");
break; break;
} }
}
ITypeInfo_Release(tinfo2); ITypeInfo_Release(tinfo2);
return hres; return hres;
} }
...@@ -878,6 +865,7 @@ deserialize_param( ...@@ -878,6 +865,7 @@ deserialize_param(
if (alloc) if (alloc)
*arg = (DWORD)HeapAlloc(GetProcessHeap(),0,tattr->cbSizeInstance); *arg = (DWORD)HeapAlloc(GetProcessHeap(),0,tattr->cbSizeInstance);
switch (tattr->typekind) { switch (tattr->typekind) {
case TKIND_DISPATCH:
case TKIND_INTERFACE: case TKIND_INTERFACE:
if (readit) if (readit)
hres = _unmarshal_interface(buf,&(tattr->guid),(LPUNKNOWN*)arg); hres = _unmarshal_interface(buf,&(tattr->guid),(LPUNKNOWN*)arg);
...@@ -910,25 +898,11 @@ deserialize_param( ...@@ -910,25 +898,11 @@ deserialize_param(
if (debugout) MESSAGE("}"); if (debugout) MESSAGE("}");
break; break;
} }
default: { default:
TYPEDESC tdesc2; ERR("Unhandled typekind %d\n",tattr->typekind);
hres = E_FAIL;
if (debugout) MESSAGE("U{");
memset(&tdesc2,0,sizeof(tdesc2));
tdesc2.vt = tattr->typekind;
hres = deserialize_param(
tinfo2,
readit,
debugout,
alloc,
&tdesc2,
(DWORD*)*arg,
buf
);
if (debugout) MESSAGE("}");
break; break;
} }
}
} }
if (hres) if (hres)
FIXME("failed to stuballoc in TKIND_RECORD.\n"); FIXME("failed to stuballoc in TKIND_RECORD.\n");
......
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