Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/rpcrt4/ndr_typelib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index c90c60c7b8..c2eb660cc1 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -811,7 +811,7 @@ static size_t write_type_tfs(ITypeInfo *typeinfo, unsigned char *str, case TKIND_INTERFACE: case TKIND_DISPATCH: case TKIND_COCLASS: - assert(0); + off = write_pointer_tfs(refinfo, str, len, &attr->tdescAlias, toplevel, onstack); break; case TKIND_ALIAS: off = write_type_tfs(refinfo, str, len, &attr->tdescAlias, toplevel, onstack);
Hello Dmitry,
On 3/18/20 9:46 PM, Dmitry Timoshkov wrote:
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru
dlls/rpcrt4/ndr_typelib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c index c90c60c7b8..c2eb660cc1 100644 --- a/dlls/rpcrt4/ndr_typelib.c +++ b/dlls/rpcrt4/ndr_typelib.c @@ -811,7 +811,7 @@ static size_t write_type_tfs(ITypeInfo *typeinfo, unsigned char *str, case TKIND_INTERFACE: case TKIND_DISPATCH: case TKIND_COCLASS:
assert(0);
off = write_pointer_tfs(refinfo, str, len, &attr->tdescAlias, toplevel, onstack); break; case TKIND_ALIAS: off = write_type_tfs(refinfo, str, len, &attr->tdescAlias, toplevel, onstack);
I did some deeper testing, and I don't think this is correct.
tdescAlias is only set for TKIND_DISPATCH, and it points to VT_DISPATCH (presumably because any dispatchable interface doubles as IDispatch itself). For TKIND_INTERFACE and TKIND_COCLASS it's clear, and that will result in write_pointer_tfs trying to write VT_EMPTY.
Instead, I think we just want to duplicate the contents of write_pointer_tfs here, i.e. write "desc" as if it were a pointer. Does the attached patch work for you?
Zebediah Figura z.figura12@gmail.com wrote:
I did some deeper testing, and I don't think this is correct.
tdescAlias is only set for TKIND_DISPATCH, and it points to VT_DISPATCH (presumably because any dispatchable interface doubles as IDispatch itself). For TKIND_INTERFACE and TKIND_COCLASS it's clear, and that will result in write_pointer_tfs trying to write VT_EMPTY.
Instead, I think we just want to duplicate the contents of write_pointer_tfs here, i.e. write "desc" as if it were a pointer. Does the attached patch work for you?
Yes, it does. Thank you!