From: Dmitry Timoshkov dmitry@baikal.ru
It looks like the lowest bit in the param name offset actually indicates whether type description follows the name, and since the name offsets are always aligned that makes sense.
This makes oleview.exe from PSDK running under Windows7 correctly show mix of different very complex and relatively simple type descriptions generated by widl's SLTG generator.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- tools/widl/write_sltg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c index 96a557a3966..c168a76adf0 100644 --- a/tools/widl/write_sltg.c +++ b/tools/widl/write_sltg.c @@ -1240,7 +1240,6 @@ static int add_func_desc(struct sltg_typelib *typelib, struct sltg_data *data, v short name, type_offset;
name = base_offset != -1 ? add_name(&typelib->name_table, arg->name) : -1; - append_data(data, &name, sizeof(name));
if (arg_data[i].size > sizeof(short)) { @@ -1248,8 +1247,12 @@ static int add_func_desc(struct sltg_typelib *typelib, struct sltg_data *data, v arg_offset += arg_data[i].size; } else + { + name |= 1; type_offset = *(short *)arg_data[i].data; + }
+ append_data(data, &name, sizeof(name)); append_data(data, &type_offset, sizeof(type_offset));
if (base_offset != -1)